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
=== modified file 'bin/addons/account/invoice.py'
--- bin/addons/account/invoice.py 2017-01-02 08:59:17 +0000
+++ bin/addons/account/invoice.py 2017-02-01 13:16:26 +0000
@@ -1213,7 +1213,7 @@
1213 return False1213 return False
1214 return data1214 return data
12151215
1216 def refund(self, cr, uid, ids, date=None, period_id=None, description=None, journal_id=None):1216 def refund(self, cr, uid, ids, date=None, period_id=None, description=None, journal_id=None, document_date=None):
1217 invoices = self.read(cr, uid, ids, self._hook_fields_for_refund(cr, uid))1217 invoices = self.read(cr, uid, ids, self._hook_fields_for_refund(cr, uid))
1218 obj_invoice_line = self.pool.get('account.invoice.line')1218 obj_invoice_line = self.pool.get('account.invoice.line')
1219 obj_invoice_tax = self.pool.get('account.invoice.tax')1219 obj_invoice_tax = self.pool.get('account.invoice.tax')
@@ -1257,6 +1257,10 @@
1257 invoice.update({1257 invoice.update({
1258 'period_id': period_id,1258 'period_id': period_id,
1259 })1259 })
1260 if document_date:
1261 invoice.update({
1262 'document_date': document_date,
1263 })
1260 if description:1264 if description:
1261 invoice.update({1265 invoice.update({
1262 'name': description,1266 'name': description,
12631267
=== modified file 'bin/addons/analytic_distribution/invoice.py'
--- bin/addons/analytic_distribution/invoice.py 2017-01-17 13:31:02 +0000
+++ bin/addons/analytic_distribution/invoice.py 2017-02-01 13:16:26 +0000
@@ -156,10 +156,7 @@
156 raise osv.except_osv(_('Error'), _("Posting date for the refund is before the invoice's posting date!"))156 raise osv.except_osv(_('Error'), _("Posting date for the refund is before the invoice's posting date!"))
157 if document_date and document_date < inv.document_date:157 if document_date and document_date < inv.document_date:
158 raise osv.except_osv(_('Error'), _("Document date for the refund is before the invoice's document date!"))158 raise osv.except_osv(_('Error'), _("Document date for the refund is before the invoice's document date!"))
159 new_ids = super(account_invoice, self).refund(cr, uid, ids, date, period_id, description, journal_id)159 new_ids = super(account_invoice, self).refund(cr, uid, ids, date, period_id, description, journal_id, document_date)
160 # add document date
161 if document_date:
162 self.write(cr, uid, new_ids, {'document_date': document_date})
163 return new_ids160 return new_ids
164161
165 def line_get_convert(self, cr, uid, x, part, date, context=None):162 def line_get_convert(self, cr, uid, x, part, date, context=None):

Subscribers

People subscribed via source and target branches