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

Proposed by jftempo
Status: Needs review
Proposed branch: lp:~julie-w/unifield-server/US-9331
Merge into: lp:unifield-server
Diff against target: 41 lines (+7/-2)
2 files modified
bin/addons/account/invoice.py (+6/-2)
bin/addons/account_override/invoice.py (+1/-0)
To merge this branch: bzr merge lp:~julie-w/unifield-server/US-9331
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+413147@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 2021-11-17 13:08:21 +0000
3+++ bin/addons/account/invoice.py 2021-12-14 14:16:19 +0000
4@@ -758,11 +758,16 @@
5 'counterpart_inv_status': False,
6 'refunded_invoice_id': False,
7 })
8+ inv = self.browse(cr, uid, [id], fields_to_fetch=['analytic_distribution_id', 'doc_type'], context=context)[0]
9 if not context.get('from_split'): # some values are kept in case of inv. generated via the "Split" feature
10 default.update({
11 'from_supply': False,
12- 'synced': False,
13 })
14+ # Reset the sync tag, except in case of manual duplication of IVO/STV.
15+ if not context.get('from_copy_web') or inv.doc_type not in ('ivo', 'stv'):
16+ default.update({
17+ 'synced': False,
18+ })
19 if 'date_invoice' not in default:
20 default.update({
21 'date_invoice':False
22@@ -771,7 +776,6 @@
23 default.update({
24 'date_due':False
25 })
26- inv = self.browse(cr, uid, [id], fields_to_fetch=['analytic_distribution_id'], context=context)[0]
27 if inv.analytic_distribution_id:
28 default.update({'analytic_distribution_id': self.pool.get('analytic.distribution').copy(cr, uid, inv.analytic_distribution_id.id, {}, context=context)})
29
30
31=== modified file 'bin/addons/account_override/invoice.py'
32--- bin/addons/account_override/invoice.py 2021-11-16 15:07:34 +0000
33+++ bin/addons/account_override/invoice.py 2021-12-14 14:16:19 +0000
34@@ -687,6 +687,7 @@
35 """
36 if context is None:
37 context = {}
38+ context.update({'from_copy_web': True})
39 inv = self.browse(cr, uid, inv_id, fields_to_fetch=['partner_id', 'doc_type'], context=context)
40 if inv.partner_id.partner_type == 'section' and inv.doc_type in ('si', 'sr'):
41 new_doc_type = inv.doc_type == 'si' and _("an Intersection Supplier Invoice") or _("an Intersection Supplier Refund")

Subscribers

People subscribed via source and target branches