Commit Graph

365 Commits

Author SHA1 Message Date
Martin Trigaux f572b27ec8 [IMP] account_voucher: make the field tax_amount always readonly
The field tax_amount is fieled with onchanges and the compute_tax method. Setting a different value than the one computed by the system may lead to unbalanced move (which is obviously wrong).
In the future, handeling these operations by setting the correct value to the tax accounts would be better.
2014-08-18 17:59:17 +02:00
Martin Trigaux 85b08a75f6 [FIX] account_voucher: avoid error if no partner
The field partner_id is not required on an account.voucher but the validation was failing if none was set (opw 611663).
This patch makes a fallback on the account of the voucher if neither a partner nor a writeoff account is specified.
2014-08-18 17:50:32 +02:00
Martin Trigaux 02f0caf1b8 [FIX] account_voucher: validation of refund in multicurrency
Fixing several issues for refunds in multicurrency mode that prevented the moves to be balanced.
The amount_currency needs to use the absolute value, as a refund will have a negative amount.
The sign for currency_rate_difference needs to use the line instead of the voucher as they can have different value. e.g. a voucher of 1000$ with invoice of 1200$ and refund of 200$ will have two lines and their currency_rate_difference should have different signs.
Avoids doubling the value in foreign_currency_diff
Fixes #1490, opw 607118 & 611580
2014-08-06 16:45:00 +02:00
Ravi Gohil 8f0392b490 [FIX] account_voucher: avoid trying unreconcile a move twice
When we cancel a voucher, we may be trying to unlink a reconciliation that was already removed on another move (just looking at the version in cache). In such cases, the unlink would fail with traceback. opw 610287
2014-07-30 15:56:19 +02:00
Ravi Gohil (OpenERP) 210adf77cb [FIX] account_voucher: Fixed wrong writeoff(Payment Difference) calculation by recompute_voucher_lines(...). (Maintenance Case: 605632)
bzr revid: rgo@tinyerp.com-20140423070139-ielwafap3zcupglx
2014-04-23 12:31:39 +05:30
Amit Dodiya e270940c5f [FIX] account_voucher & account_move_line: while we have partial payment and we cancel one payment it also unlink the reconcile/partial reconcile tag from other payment entries also
bzr revid: ado@tinyerp.com-20140422101128-ugudle2s7ysc6n1p
2014-04-22 15:41:28 +05:30
Ravi Gohil (OpenERP) 246b57c997 [FIX] account_voucher: Fixed wrong writeoff(Payment Difference) calculation by recompute_voucher_lines(...). (Maintenance Case: 605632)
bzr revid: rgo@tinyerp.com-20140421112339-36q7ifaplea40r56
2014-04-21 16:53:39 +05:30
Amit Dodiya d50a5c7efc [FIX] account_voucher & account_move_line: while we have partial payment and we cancel one payment it also unlink the reconcile/partial reconcile tag from other payment entries also
bzr revid: ado@tinyerp.com-20140410095132-wx29csixtxsf6gdv
2014-04-10 15:21:32 +05:30
Denis Ledoux e8775beded [FIX] account_voucher: it is authorized to enter invoice with negative amount, therefore the check amount constraint must take that into account
bzr revid: dle@openerp.com-20140402083713-tayk4r76bmrp9luf
2014-04-02 10:37:13 +02:00
Amit Dodiya 26f807fa02 [FIX] account_voucher: forward port of 6.0 revision: 5094, for issue cancel_voucher method is unlinking the whole account_move_reconciliation record
bzr revid: ado@tinyerp.com-20140325054743-opywyna9w1toyjp8
2014-03-25 11:17:43 +05:30
Denis Ledoux 98ca1ab200 [FIX] account_voucher: bank statement reconciliation for refund invoices
bzr revid: dle@openerp.com-20140324144518-pnjtlxpuz63bq6ig
2014-03-24 15:45:18 +01:00
Denis Ledoux 1e21c3ea11 [FIX]account_voucher: do not set account_id to False during onchanges
bzr revid: dle@openerp.com-20140212173711-nvx2gt1bboyey4qg
2014-02-12 18:37:11 +01:00
Denis Ledoux 4818a83f26 [FIX] point_of_sale: validate and closing pos sessoin handle multi company
When the user who validated and closed the pos session was not the same user who created the session, and if this user was not in the same company, it wasnt possible to validate and close the pos session.

This explanation if also valid if the user who created the pos session changed of company in his preferences between the creation and the validation.

bzr revid: dle@openerp.com-20140206163444-ckcmurcwk2vhi5vp
2014-02-06 17:34:44 +01:00
Martin Trigaux a27251fbda [MERGE] [FIX] account_voucher: forward port of fixes from 6.1 (rev 6966)
When importing invoices to a bank statement the bank statement lines are created with statement date instead of today
Set the date on the created voucher in the same wizard to the statement date instead of invoice date (problematic if different period)
When creating the account moves (at bank statement confirmation), make sur the date and period of the vouncher are synchronised

bzr revid: mat@openerp.com-20140129172009-vbp5n1nco51kaly8
2014-01-29 18:20:09 +01:00
Martin Trigaux 08e0003177 [FIX] account_voucher: in fields_view_get overwrite, also add the 'default_supplier/customer' properity in context.
With this the 'create and edit' menu will initiate the partner as a supplier.

bzr revid: mat@openerp.com-20140110134845-hvbob1mii4ofqjay
2014-01-10 14:48:45 +01:00
Quentin (OpenERP) fee10ac1fd [FIX] account_voucher: default value for float field is 0.0, not False. (That doesn't change the behavior but makes things more clear)
bzr revid: qdp-launchpad@openerp.com-20140108160719-9i8xhrat49cn9l5e
2014-01-08 17:07:19 +01:00
Denis Ledoux d1b4aa974d [FIX] account_voucher: computed writeoff and invoices selected were not right on partial invoice payment in account voucher wizard.
Due to the algorithm which did not handle the fact that an invoice could have several move lines

bzr revid: dle@openerp.com-20131224103535-rhtje7dnq1ie7jtb
2013-12-24 11:35:35 +01:00
Martin Trigaux c2dbe028a7 [FIX] account_voucher: generate empty context to avoid traceback
bzr revid: mat@openerp.com-20130821121714-5q5qa56suab0dehs
2013-08-21 14:17:14 +02:00
Foram Katharotiya (OpenERP) 39e5ec3b9a [IMP] improve code
bzr revid: fka@tinyerp.com-20130807064343-gifqjce1bewj0sk5
2013-08-07 12:13:43 +05:30
Foram Katharotiya (OpenERP) 1d2fefb203 [FIX] traceback from journal vouchers
bzr revid: fka@tinyerp.com-20130806125854-txgvpzvkpc928v09
2013-08-06 18:28:54 +05:30
Martin Trigaux 44f7a82281 [FIX] account_voucher: evaluate move line account with correct precision
This bug may have generated incorrect account_voucher_line when validating a voucher with amount less than 1. This patch will avoid reproducing the problem on new lines but not fix already existing vouchers. To do so apply the following steps:

1. apply this patch
2. do a manual reconciliation of the account.move.lines with amount less than 1 (use the manual reconciliation menu to see every line, included 0-0 lines)
3. execute the following SQL query

DELETE FROM account_voucher_line WHERE id IN (SELECT l.id FROM account_voucher_line AS l JOIN account_voucher AS v ON (v.id = l.voucher_id) JOIN account_move_line AS ml ON (l.move_line_id = ml.id) WHERE l.amount = 0 AND v.state = 'draft' AND ml.debit = ml.credit AND ml.credit = 0);

that will remove account voucher lines from draft vouchers linked to an empty move lines

bzr revid: mat@openerp.com-20130802120311-oh64d47t8x6t1wf9
2013-08-02 14:03:11 +02:00
Martin Trigaux 30f07ee98d [FIX] account_voucher: better voucher payment screen
revert commit 9310 with incorrect writeoff amount
hide writeoff reconcilation fields when no price difference
hide analytic_id (Write-Off Analytic Account) when not with_writeoff

bzr revid: mat@openerp.com-20130724094023-fbd1hqwe9hdh28id
2013-07-24 11:40:23 +02:00
Martin Trigaux 3b61eb8627 [FIX] account_voucher: writeoff amount on unreconciled amount instead of price to allow negative writeoff (eg: negative currency change rate difference) (opw #593977)
bzr revid: mat@openerp.com-20130723141734-8wtbyn4ubz8rwfj1
2013-07-23 16:17:34 +02:00
Martin Trigaux 90350b5618 [FIX] account_voucher: while canceling avoid removing twice the same reconciled move
bzr revid: mat@openerp.com-20130710082743-mfimnve33j06hgu0
2013-07-10 10:27:43 +02:00
Christophe Matthieu 9d9e3d2ef8 [IMP] Improve typos in warning (Grammar mistake, Capitalize title, Typos)
bzr revid: chm@openerp.com-20130607113829-1mi6jk18c2v3jjhn
2013-06-07 13:38:29 +02:00
Niels Huylebroeck eb8fb7c16d [MERGE] Merged in the fix from 6.0 which overwrites the voucher date and period in case the on_change was not executed
bzr revid: nh@agaplan.eu-20130515135805-6z71j8k3yrzfh42q
2013-05-15 15:58:05 +02:00
Rifakat f085de4787 [FIX] account_voucher: implemented on_change to set voucher date based on statement line
bzr revid: rha@tinyerp.com-20130515105728-u4zh5jb4biphx1h8
2013-05-15 16:27:28 +05:30
Quentin (OpenERP) 5a367b4c9a [IMP] account_voucher, usability: added currency_help_label to help at the understanding when using the payment rate fields
bzr revid: qdp-launchpad@openerp.com-20130514115213-cklf7s6r889ahen7
2013-05-14 13:52:13 +02:00
Quentin (OpenERP) 9b01552b79 [IMP] account_voucher, usability: reset the amount to 0 in the 'pay invoice wizard' if the currency is not the same than the invoice currency to avoid a common mistake
bzr revid: qdp-launchpad@openerp.com-20130513142116-wyuud8n9fcnafc7l
2013-05-13 16:21:16 +02:00
Quentin (OpenERP) 0b7b321310 [FIX] account_voucher: display the multi-currency options each time needed
bzr revid: qdp-launchpad@openerp.com-20130513132422-q78dopdnnyd2x8dy
2013-05-13 15:24:22 +02:00
Somesh Khare (OpenERP) 21047bc3f6 [FIX] account_voucher : Wrong payment date when invoice is paid from bank statement (Ref : Case 592393)
bzr revid: skh@openerp.com-20130508061841-mmpytzw9rk7v90ly
2013-05-08 11:48:41 +05:30
Quentin (OpenERP) 65713a5dc9 [FIX] account_voucher: post accounting entry related to a currency rate difference in all cases
bzr revid: qdp-launchpad@openerp.com-20130507130520-3zndk5mt7mlvv3i7
2013-05-07 15:05:20 +02:00
Quentin (OpenERP) 976b8f6d33 [FIX] account_voucher: display the payment_rate_currency_id field when needed
bzr revid: qdp-launchpad@openerp.com-20130507124513-2st24rthgg8dlcv0
2013-05-07 14:45:13 +02:00
Quentin (OpenERP) e02c15ed61 [FIX] account_voucher: typo
bzr revid: qdp-launchpad@openerp.com-20130503115711-bm693r6yjjsvspz5
2013-05-03 13:57:11 +02:00
Quentin (OpenERP) 709fc0ca29 [FIX] account_voucher: complete fixing of vouchers in multi-currency.
*uniformized the computation in multi-currency in order to always use res_currency.compute()
*make sure to pass the right conversion rate to _current_rate() function using the context if it is specified on the voucher and, in this function, used the info from the context instead of the computed one if relevant. (This involves an ugly overwriting of the 'rate' field that will disappear in trunk: to stay backward compatible and avoid any update of 'base' module it has to be done this way).
*replace the currency_id field on the voucher by a fields.function (was a fields.related) in order to always have a currency, even if it's a voucher in the company currency. (makes the treatment easier and more consistent. Less error prone)
*misc code reaftoring

bzr revid: qdp-launchpad@openerp.com-20130502225937-ya45q2wvgqy7zo1c
2013-05-03 00:59:37 +02:00
Quentin (OpenERP) b507941664 [FIX] account_voucher: usability improvement related to multi currency
bzr revid: qdp-launchpad@openerp.com-20130425124404-t22dzpv0rtohoh9y
2013-04-25 14:44:04 +02:00
Quentin (OpenERP) 11ac47133e [FIX] account_voucher: pay invoice 'wizard' now displays 1) the monetary widget even if the journal is in the company currency and 2) the writeoff fields
bzr revid: qdp-launchpad@openerp.com-20130425121815-nbooi3hpah8wqdxc
2013-04-25 14:18:15 +02:00
Cedric Snauwaert 630f1eb42d [FIX]account_voucher: change payment view to add some field and currency when it is the same than company.
Also add some missing field in account voucher sale form

bzr revid: csn@openerp.com-20130423152439-ixdfgasutdv1pj62
2013-04-23 17:24:39 +02:00
Quentin (OpenERP) 2bc4260c54 [FIX] account_voucher: fix in amount_currency computation when the rate is specified on the voucher and the voucher is in the company currency
bzr revid: qdp-launchpad@openerp.com-20130423135028-70887smme8mxv0tn
2013-04-23 15:50:28 +02:00
Quentin (OpenERP) c46929268d [FIX] account* modules: added 'account_period_prefer_normal':True in context when trying to find the period related to a date.
This patch will be forward ported in trunk by changing the behaviour of account_period.find() in order to fetch the normal periods by default (account_period_prefer_normal will be True by default) because there are no business case i could think of where you'd like to get the opening period (except in the closure but it's held in a different way there). On the other hand, it's pretty easy to forget to put that key in the context and introduce a new bug that will select the opening period instead of the wanted one

bzr revid: qdp-launchpad@openerp.com-20130418102433-t52uj23trkpr8vnb
2013-04-18 12:24:33 +02:00
Quentin (OpenERP) 57ac1b0f04 [MERGE] fix of lp bug 1076509
lp bug: https://launchpad.net/bugs/1076509 fixed

bzr revid: qdp-launchpad@openerp.com-20130213164157-6ojykbl1w1on8ng8
2013-02-13 17:41:57 +01:00
Quentin (OpenERP) b389ebdb1f [FIX] account_voucher: when picking the next move number, put the fiscalyear in context in case the sequence is dependant of it + period_id field is required on voucher
bzr revid: qdp-launchpad@openerp.com-20130205102314-y2giy53cr8vpv6yv
2013-02-05 11:23:14 +01:00
Quentin (OpenERP) 912533f1f3 [MERGE] payment of invoice with amount_total = 0 is a valid operation, and is now supported in account_voucher
bzr revid: qdp-launchpad@openerp.com-20121221163252-q0hi14lrdcnnz5wm
2012-12-21 17:32:52 +01:00
dle@openerp.com 9128ad1481 [MERGE]Latest trunk + [FIX]Useless id in account invoice and
bzr revid: dle@openerp.com-20121221151350-8o8xri9jk3zs0x2e
2012-12-21 16:13:50 +01:00
dle@openerp.com 31d8bdaa34 [FIX]payment/receipt of amount 0, not just invoices : )
bzr revid: dle@openerp.com-20121221143637-wqmjg91g185s1val
2012-12-21 15:36:37 +01:00
Quentin (OpenERP) e9f9e1191c [FIX] account_voucher: bug fixed in the supplier partial payment. There is no need to take care of the sign as the residual amount of account.move.line is already taking care of it
bzr revid: qdp-launchpad@openerp.com-20121221130302-23v55ygcqekdlywi
2012-12-21 14:03:02 +01:00
dle@openerp.com 84bef2751c [FIX]Wrong condition and message
bzr revid: dle@openerp.com-20121221124441-lklcl8b2bmp5wo27
2012-12-21 13:44:41 +01:00
dle@openerp.com 9b7b831608 [MERGE]Latest trunk
bzr revid: dle@openerp.com-20121221101215-8k320vze3pma2wjl
2012-12-21 11:12:15 +01:00
Quentin (OpenERP) 118316430a [FIX] account_voucher; when making a payment directly from an invoice, copy the invoice description as payment reference (instead of number, which should never be filled except by the voucher validation) + open a correct view with improved usability on partner_id field
bzr revid: qdp-launchpad@openerp.com-20121221095844-5029t8z6twv67dsc
2012-12-21 10:58:44 +01:00
Thibault Delavallée e3c31cab9e [IMP] track_visibility atribute: moved onto explicit strings.
bzr revid: tde@openerp.com-20121220114730-nip8qaaajr5mqw6s
2012-12-20 12:47:30 +01:00