← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~camptocamp/account-invoicing/7.0-write-off-refund-date-mdh into lp:account-invoicing

 

Matthieu Dietrich @ camptocamp has proposed merging lp:~camptocamp/account-invoicing/7.0-write-off-refund-date-mdh into lp:account-invoicing.

Commit message:
[FIX] use refund's date in write-off

Requested reviews:
  Account Core Editors (account-core-editors)

For more details, see:
https://code.launchpad.net/~camptocamp/account-invoicing/7.0-write-off-refund-date-mdh/+merge/202888

Found in a client: if you use the refund wizard on an invoice with the 2nd or 3rd option, and there is a write-off due to the reconciliation of the invoice and the refund, the date is set to today instead of taking the refund's.
This can lead to some issues, since the period is however the one from the refund.
-- 
https://code.launchpad.net/~camptocamp/account-invoicing/7.0-write-off-refund-date-mdh/+merge/202888
Your team Account Core Editors is requested to review the proposed merge of lp:~camptocamp/account-invoicing/7.0-write-off-refund-date-mdh into lp:account-invoicing.
=== modified file 'invoice_validation_wkfl/invoice.py'
--- invoice_validation_wkfl/invoice.py	2013-05-13 08:30:34 +0000
+++ invoice_validation_wkfl/invoice.py	2014-01-23 16:20:36 +0000
@@ -161,8 +161,8 @@
                         account_m_line_obj.reconcile(cr, uid, to_reconcile_ids[account],
                                         writeoff_period_id=period,
                                         writeoff_journal_id = inv.journal_id.id,
-                                        writeoff_acc_id=inv.account_id.id
-                                        )
+                                        writeoff_acc_id=inv.account_id.id,
+                                        context={'date_p': date})
                     if mode == 'modify':
                         invoice = inv_obj.read(cr, uid, [inv.id],
                                     ['name', 'type', 'number', 'reference',


Follow ups