@api.depends('calculate')
def _compute_amount(self):
"""
Compute the amounts of the SO line.
"""
for line in self:
linePrice = line.price_unit * (1 - (0.0) / 100.0)
if line.calculate:
if line.calculate=='product_pcs':
taxes = line.tax_ids.compute_all(linePrice,line.order_id.currency_id, line.product_pcs)
elif line.calculate=='gross_weight':
taxes = line.tax_ids.compute_all(linePrice, line.order_id.currency_id, line.gross_weight)
elif line.calculate=='measure':
taxes = line.tax_ids.compute_all(linePrice, line.order_id.currency_id, line.measure)
else:
taxes={
'total_included':0,
'total_excluded':0
}
for tax in taxes:
price_tax=tax['total_included'] - tax['total_excluded'],
# getting error after this line
price_total=tax['total_included'],
price=tax['total_excluded']
else:
price_tax = False
price_total = False
price = False
line.update({
'price_tax': price_tax,
'price_total':price_total,
'price': price
})
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Buchhaltung
- Lager
- PoS
- Projekte
- MRP
Diese Frage wurde gekennzeichnet
5849
Ansichten
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!
Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!
Registrieren