@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
- Boekhouding
- Voorraad
- PoS
- Project
- MRP
Deze vraag is gerapporteerd
5773
Weergaven
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
Aanmelden