Merge lp:~julie-w/unifield-server/US-2317 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 4180
Proposed branch: lp:~julie-w/unifield-server/US-2317
Merge into: lp:unifield-server
Diff against target: 39 lines (+6/-5)
2 files modified
bin/addons/account/invoice.py (+5/-1)
bin/addons/analytic_distribution/invoice.py (+1/-4)
To merge this branch: bzr merge lp:~julie-w/unifield-server/US-2317
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+316108@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/addons/account/invoice.py'
2--- bin/addons/account/invoice.py 2017-01-02 08:59:17 +0000
3+++ bin/addons/account/invoice.py 2017-02-01 13:16:26 +0000
4@@ -1213,7 +1213,7 @@
5 return False
6 return data
7
8- def refund(self, cr, uid, ids, date=None, period_id=None, description=None, journal_id=None):
9+ def refund(self, cr, uid, ids, date=None, period_id=None, description=None, journal_id=None, document_date=None):
10 invoices = self.read(cr, uid, ids, self._hook_fields_for_refund(cr, uid))
11 obj_invoice_line = self.pool.get('account.invoice.line')
12 obj_invoice_tax = self.pool.get('account.invoice.tax')
13@@ -1257,6 +1257,10 @@
14 invoice.update({
15 'period_id': period_id,
16 })
17+ if document_date:
18+ invoice.update({
19+ 'document_date': document_date,
20+ })
21 if description:
22 invoice.update({
23 'name': description,
24
25=== modified file 'bin/addons/analytic_distribution/invoice.py'
26--- bin/addons/analytic_distribution/invoice.py 2017-01-17 13:31:02 +0000
27+++ bin/addons/analytic_distribution/invoice.py 2017-02-01 13:16:26 +0000
28@@ -156,10 +156,7 @@
29 raise osv.except_osv(_('Error'), _("Posting date for the refund is before the invoice's posting date!"))
30 if document_date and document_date < inv.document_date:
31 raise osv.except_osv(_('Error'), _("Document date for the refund is before the invoice's document date!"))
32- new_ids = super(account_invoice, self).refund(cr, uid, ids, date, period_id, description, journal_id)
33- # add document date
34- if document_date:
35- self.write(cr, uid, new_ids, {'document_date': document_date})
36+ new_ids = super(account_invoice, self).refund(cr, uid, ids, date, period_id, description, journal_id, document_date)
37 return new_ids
38
39 def line_get_convert(self, cr, uid, x, part, date, context=None):

Subscribers

People subscribed via source and target branches