@@ -115,7 +115,10 @@ class account_analytic_line(osv.osv):
|
||||
else:
|
||||
price = 0.0
|
||||
|
||||
taxes = product.taxes_id
|
||||
if product.taxes_id:
|
||||
taxes = product.taxes_id
|
||||
else:
|
||||
taxes = product.categ_id.taxes_id
|
||||
tax = fiscal_pos_obj.map_tax(cr, uid, account.partner_id.property_account_position, taxes)
|
||||
account_id = product.product_tmpl_id.property_account_income.id or product.categ_id.property_account_income_categ.id
|
||||
if not account_id:
|
||||
|
||||
@@ -1108,7 +1108,10 @@ class pos_order_line(osv.osv):
|
||||
account_tax_obj = self.pool.get('account.tax')
|
||||
cur_obj = self.pool.get('res.currency')
|
||||
for line in self.browse(cr, uid, ids, context=context):
|
||||
taxes = line.product_id.taxes_id
|
||||
if line.product_id.taxes_id:
|
||||
taxes = line.product_id.taxes_id
|
||||
else:
|
||||
taxes = line.product_id.categ_id.taxes_id
|
||||
price = line.price_unit * (1 - (line.discount or 0.0) / 100.0)
|
||||
taxes = account_tax_obj.compute_all(cr, uid, line.product_id.taxes_id, price, line.qty, product=line.product_id, partner=line.order_id.partner_id or False)
|
||||
|
||||
|
||||
+4
-1
@@ -1382,7 +1382,10 @@ class sale_order_line(osv.osv):
|
||||
fpos = fiscal_position and self.pool.get('account.fiscal.position').browse(cr, uid, fiscal_position) or False
|
||||
if update_tax: #The quantity only have changed
|
||||
result['delay'] = (product_obj.sale_delay or 0.0)
|
||||
result['tax_id'] = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, product_obj.taxes_id)
|
||||
if product_obj.taxes_id:
|
||||
result['tax_id'] = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, product_obj.taxes_id)
|
||||
else:
|
||||
result['tax_id'] = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, product_obj.categ_id.taxes_id)
|
||||
result.update({'type': product_obj.procure_method})
|
||||
|
||||
if not flag:
|
||||
|
||||
@@ -915,9 +915,16 @@ class stock_picking(osv.osv):
|
||||
@return: Taxes Ids for the move line
|
||||
"""
|
||||
if type in ('in_invoice', 'in_refund'):
|
||||
taxes = move_line.product_id.supplier_taxes_id
|
||||
if product_id.supplier_taxes_id:
|
||||
taxes = move_line.product_id.supplier_taxes_id
|
||||
else:
|
||||
taxes = move_line.product_id.categ_id.supplier_taxes_id
|
||||
else:
|
||||
taxes = move_line.product_id.taxes_id
|
||||
if product_id.taxes_id:
|
||||
taxes = move_line.product_id.taxes_id
|
||||
else:
|
||||
taxes = move_line.product_id.categ_id.taxes_id
|
||||
|
||||
|
||||
if move_line.picking_id and move_line.picking_id.partner_id and move_line.picking_id.partner_id.id:
|
||||
return self.pool.get('account.fiscal.position').map_tax(
|
||||
|
||||
Reference in New Issue
Block a user