parent
bc33c13e56
commit
b05f060b8a
|
@ -42,8 +42,6 @@
|
|||
<tree string="Fiscal Position">
|
||||
<field name="name"/>
|
||||
<field name="company_id"/>
|
||||
<field name="account_tax"/>
|
||||
<field name="account_supplier_tax"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -1000,25 +1000,11 @@ class mrp_procurement(osv.osv):
|
|||
'notes':product.description_purchase,
|
||||
}
|
||||
|
||||
taxes = self.pool.get('account.tax').browse(cr, uid,
|
||||
[x.id for x in procurement.product_id.product_tmpl_id.supplier_taxes_id])
|
||||
taxep = None
|
||||
if partner_id:
|
||||
taxep = partner.property_account_position and partner.property_account_position.account_supplier_tax
|
||||
if not taxep or not taxep.id:
|
||||
taxes_ids = [x.id for x in procurement.product_id.product_tmpl_id.supplier_taxes_id]
|
||||
else:
|
||||
res5 = [taxep.id]
|
||||
for t in taxes:
|
||||
if not t.tax_group==taxep.tax_group:
|
||||
res5.append(t.id)
|
||||
taxes_ids = res5
|
||||
|
||||
taxes_ids = procurement.product_id.product_tmpl_id.supplier_taxes_id
|
||||
self.pool.get('account.fiscal.position').map_tax(cr, uid, partner, taxes)
|
||||
line.update({
|
||||
'taxes_id':[(6,0,taxes_ids)]
|
||||
})
|
||||
|
||||
|
||||
purchase_id = self.pool.get('purchase.order').create(cr, uid, {
|
||||
'origin': procurement.origin,
|
||||
'partner_id': partner_id,
|
||||
|
|
Loading…
Reference in New Issue