This question has been flagged
1 Reply
300 Views
Good morning,
I created a discount in %, discount in VAT with studio in the repair
create calculation formulas
after constact the base field under total does not take into account the normal result I had to create another subtotal by applying a new calculation formula:
for record in self:
  record['x_studio_sous_total']=record. price_unit-record.x_studio_prix_remis.
THE AMOUNT excluding VAT by default of the repair estimate does not take into account the subtotal result but that of the price of the item
how to apply a formula for the default field of the amount excluding tax to take into account the result of the subtotal
These fields are created on the repair line.
but the amount excluding tax is based on the repair order model.
i have odoo ERP v15 online standard


Avatar
Discard
Best Answer

Hi,

To apply a formula for the default field of the amount excluding tax to take into account the result of the subtotal calculated on the repair line, you can follow these steps:

  1. Navigate to the Studio app in Odoo and open the Repair module.
  2. Go to the Repair Order Line model and locate the field for the amount excluding tax.
  3. Edit the field and customize its computation method to include the subtotal calculated on the repair line.
  4. Here's an example of how you can adjust the computation method:
    depends: price_unit, x_studio_prix_remis
    for line in self:
            line.x_studio_sous_total = line.price_unit - line.x_studio_prix_remis
            # Adjust the computation of amount excluding tax to include the subtotal
            line.amount_excluding_tax = line.product_qty * (line.price_unit - line.x_studio_prix_remis)

It may vary from your specific logic, but you can refer to this as a guide to troubleshooting yours.


Hope it helps

Avatar
Discard