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

Proposed by jftempo
Status: Merged
Merged at revision: 4755
Proposed branch: lp:~julie-w/unifield-server/US-4035
Merge into: lp:unifield-server
Diff against target: 36 lines (+7/-0)
2 files modified
bin/addons/analytic_override/analytic_line.py (+2/-0)
bin/addons/register_accounting/account_direct_invoice_wizard.py (+5/-0)
To merge this branch: bzr merge lp:~julie-w/unifield-server/US-4035
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+338553@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/analytic_override/analytic_line.py'
2--- bin/addons/analytic_override/analytic_line.py 2018-02-05 16:01:14 +0000
3+++ bin/addons/analytic_override/analytic_line.py 2018-02-22 14:29:23 +0000
4@@ -153,6 +153,8 @@
5 context = {}
6 if not 'account_id' in vals:
7 raise osv.except_osv(_('Error'), _('No account_id found in given values!'))
8+ if context.get('skip_ad_date_check', False):
9+ return True
10
11 account_obj = self.pool.get('account.analytic.account')
12
13
14=== modified file 'bin/addons/register_accounting/account_direct_invoice_wizard.py'
15--- bin/addons/register_accounting/account_direct_invoice_wizard.py 2018-01-16 16:06:47 +0000
16+++ bin/addons/register_accounting/account_direct_invoice_wizard.py 2018-02-22 14:29:23 +0000
17@@ -183,6 +183,9 @@
18 """
19 Take information from wizard in order to create an invoice, invoice lines and to post a register line that permit to reconcile the invoice.
20 """
21+ if context is None:
22+ context = {}
23+
24 self.check_analytic_distribution(cr, uid, ids)
25
26 # Prepare some value
27@@ -264,7 +267,9 @@
28 vals_copy = vals.copy()
29 # invoice lines are processed just after
30 vals_copy.pop('invoice_line')
31+ context.update({'skip_ad_date_check': True})
32 inv_obj.write(cr, uid, [inv_id], vals_copy, context)
33+ del context['skip_ad_date_check']
34
35 # get line id list
36 invl_id_list = [x.id for x in wiz_obj.browse(cr, uid, ids,

Subscribers

People subscribed via source and target branches