parent
1995c347b6
commit
1ac94db8e8
|
@ -747,7 +747,7 @@ class account_move_line(osv.osv):
|
|||
tax_ids = res.tax_ids
|
||||
if tax_ids and partner_id:
|
||||
part = partner_obj.browse(cr, uid, partner_id, context=context)
|
||||
tax_id = fiscal_pos_obj.map_tax(cr, uid, part and part.property_account_position or False, tax_ids)[0]
|
||||
tax_id = fiscal_pos_obj.map_tax(cr, uid, part and part.property_account_position or False, tax_ids, context=context)[0]
|
||||
else:
|
||||
tax_id = tax_ids and tax_ids[0].id or False
|
||||
val['account_tax_id'] = tax_id
|
||||
|
|
|
@ -717,7 +717,7 @@ class account_analytic_account(osv.osv):
|
|||
account_id = fpos_obj.map_account(cr, uid, fiscal_position, account_id)
|
||||
|
||||
taxes = res.taxes_id or False
|
||||
tax_id = fpos_obj.map_tax(cr, uid, fiscal_position, taxes)
|
||||
tax_id = fpos_obj.map_tax(cr, uid, fiscal_position, taxes, context=context)
|
||||
values = {
|
||||
'name': line.name,
|
||||
'account_id': account_id,
|
||||
|
|
|
@ -400,7 +400,7 @@ class account_voucher(osv.osv):
|
|||
|
||||
tax = [tax_pool.browse(cr, uid, voucher.tax_id.id, context=context)]
|
||||
partner = partner_pool.browse(cr, uid, voucher.partner_id.id, context=context) or False
|
||||
taxes = position_pool.map_tax(cr, uid, partner and partner.property_account_position or False, tax)
|
||||
taxes = position_pool.map_tax(cr, uid, partner and partner.property_account_position or False, tax, context=context)
|
||||
tax = tax_pool.browse(cr, uid, taxes, context=context)
|
||||
|
||||
total = voucher_amount
|
||||
|
@ -451,7 +451,7 @@ class account_voucher(osv.osv):
|
|||
tax = [tax_pool.browse(cr, uid, tax_id, context=context)]
|
||||
if partner_id:
|
||||
partner = partner_pool.browse(cr, uid, partner_id, context=context) or False
|
||||
taxes = position_pool.map_tax(cr, uid, partner and partner.property_account_position or False, tax)
|
||||
taxes = position_pool.map_tax(cr, uid, partner and partner.property_account_position or False, tax, context=context)
|
||||
tax = tax_pool.browse(cr, uid, taxes, context=context)
|
||||
|
||||
if not tax[0].price_include:
|
||||
|
|
|
@ -79,7 +79,7 @@ class sale_order(osv.Model):
|
|||
|
||||
taxes = grid.carrier_id.product_id.taxes_id.filtered(lambda t: t.company_id.id == order.company_id.id)
|
||||
fpos = order.fiscal_position or False
|
||||
taxes_ids = acc_fp_obj.map_tax(cr, uid, fpos, taxes)
|
||||
taxes_ids = acc_fp_obj.map_tax(cr, uid, fpos, taxes, context=context)
|
||||
price_unit = grid_obj.get_price(cr, uid, grid.id, order, time.strftime('%Y-%m-%d'), context)
|
||||
if order.company_id.currency_id.id != order.pricelist_id.currency_id.id:
|
||||
price_unit = currency_obj.compute(cr, uid, order.company_id.currency_id.id, order.pricelist_id.currency_id.id,
|
||||
|
|
|
@ -110,7 +110,7 @@ class stock_picking(osv.osv):
|
|||
fp = invoice.fiscal_position or partner.property_account_position
|
||||
if partner:
|
||||
account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, fp, account_id)
|
||||
taxes_ids = self.pool.get('account.fiscal.position').map_tax(cr, uid, fp, taxes)
|
||||
taxes_ids = self.pool.get('account.fiscal.position').map_tax(cr, uid, fp, taxes, context=context)
|
||||
else:
|
||||
taxes_ids = [x.id for x in taxes]
|
||||
|
||||
|
|
|
@ -221,7 +221,7 @@ class account_analytic_line(osv.osv):
|
|||
if not general_account:
|
||||
raise osv.except_osv(_('Error!'), _("Configuration Error!") + '\n' + _("Please define income account for product '%s'.") % product.name)
|
||||
taxes = product.taxes_id or general_account.tax_ids
|
||||
tax = self.pool['account.fiscal.position'].map_tax(cr, uid, account.partner_id.property_account_position, taxes)
|
||||
tax = self.pool['account.fiscal.position'].map_tax(cr, uid, account.partner_id.property_account_position, taxes, context=context)
|
||||
curr_invoice_line.update({
|
||||
'invoice_line_tax_id': [(6, 0, tax)],
|
||||
'name': factor_name,
|
||||
|
|
|
@ -1259,7 +1259,7 @@ class purchase_order_line(osv.osv):
|
|||
else:
|
||||
taxes = product.supplier_taxes_id
|
||||
fpos = fiscal_position_id and account_fiscal_position.browse(cr, uid, fiscal_position_id, context=context) or False
|
||||
taxes_ids = account_fiscal_position.map_tax(cr, uid, fpos, taxes)
|
||||
taxes_ids = account_fiscal_position.map_tax(cr, uid, fpos, taxes, context=context)
|
||||
price = self.pool['account.tax']._fix_tax_included_price(cr, uid, price, product.supplier_taxes_id, taxes_ids)
|
||||
res['value'].update({'price_unit': price, 'taxes_id': taxes_ids})
|
||||
|
||||
|
@ -1424,7 +1424,7 @@ class procurement_order(osv.osv):
|
|||
fiscal_position_id = po_obj.onchange_partner_id(cr, uid, None, partner.id, context=context)['value']['fiscal_position']
|
||||
if fiscal_position_id:
|
||||
fiscal_position = acc_pos_obj.browse(cr, uid, fiscal_position_id, context=context)
|
||||
taxes = acc_pos_obj.map_tax(cr, uid, fiscal_position, taxes_ids)
|
||||
taxes = acc_pos_obj.map_tax(cr, uid, fiscal_position, taxes_ids, context=context)
|
||||
name = product.display_name
|
||||
if product.description_purchase:
|
||||
name += '\n' + product.description_purchase
|
||||
|
|
|
@ -805,7 +805,7 @@ class sale_order(osv.osv):
|
|||
elif line[1]:
|
||||
prod = line_obj.browse(cr, uid, line[1], context=context).product_id
|
||||
if prod and prod.taxes_id:
|
||||
line[2]['tax_id'] = [[6, 0, fiscal_obj.map_tax(cr, uid, fpos, prod.taxes_id)]]
|
||||
line[2]['tax_id'] = [[6, 0, fiscal_obj.map_tax(cr, uid, fpos, prod.taxes_id, context=context)]]
|
||||
order_line.append(line)
|
||||
|
||||
# link (4, ID)
|
||||
|
@ -815,7 +815,7 @@ class sale_order(osv.osv):
|
|||
for line_id in line_ids:
|
||||
prod = line_obj.browse(cr, uid, line_id, context=context).product_id
|
||||
if prod and prod.taxes_id:
|
||||
order_line.append([1, line_id, {'tax_id': [[6, 0, fiscal_obj.map_tax(cr, uid, fpos, prod.taxes_id)]]}])
|
||||
order_line.append([1, line_id, {'tax_id': [[6, 0, fiscal_obj.map_tax(cr, uid, fpos, prod.taxes_id, context=context)]]}])
|
||||
else:
|
||||
order_line.append([4, line_id])
|
||||
else:
|
||||
|
@ -1147,7 +1147,7 @@ class sale_order_line(osv.osv):
|
|||
taxes = product_obj.taxes_id.filtered(lambda r: r.company_id.id == context['company_id'])
|
||||
else:
|
||||
taxes = product_obj.taxes_id
|
||||
result['tax_id'] = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, taxes)
|
||||
result['tax_id'] = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, taxes, context=context)
|
||||
|
||||
if not flag:
|
||||
result['name'] = self.pool.get('product.product').name_get(cr, uid, [product_obj.id], context=context_partner)[0][1]
|
||||
|
|
Loading…
Reference in New Issue