Skip to content

Commit

Permalink
[FIX]
Browse files Browse the repository at this point in the history
  • Loading branch information
legalsylvain committed May 27, 2015
1 parent b02b620 commit 89d9031
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
11 changes: 7 additions & 4 deletions integrated_trade_account/model/account_invoice_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,13 @@ def create(self, cr, uid, vals, context=None):
# pp_obj = self.pool['product.product']
# psi_obj = self.pool['product.supplierinfo']

ai = ai_obj.browse(cr, uid, vals['invoice_id'], context=context)
create_account_invoice_line = (
not context.get('integrated_trade_do_not_propagate', False) and
ai.integrated_trade)
if vals.get('invoice_id', False):
ai = ai_obj.browse(cr, uid, vals['invoice_id'], context=context)
create_account_invoice_line = (
not context.get('integrated_trade_do_not_propagate', False) and
ai.integrated_trade)
else:
create_account_invoice_line = False

# Call Super: Create
res = super(AccountInvoiceLine, self).create(
Expand Down
6 changes: 4 additions & 2 deletions integrated_trade_base/demo/res_company.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@
street2: Télédoc 136 Cedex 12
zip: 75572
city: Paris
country_id: base.fr
required: True
# country_id: base.fr

- !record {model: res.company, id: supplier_company}:
name: French Ministry of Agriculture SUPPLIER
street: 78, rue de Varenne
street2: SP 07
zip: 75349
city: Paris
country_id: base.fr
required: True
# country_id: base.fr

0 comments on commit 89d9031

Please sign in to comment.