Skip to Content
Menu
This question has been flagged
1 Reply
2925 Views

Hi,


I created to personalized fields to calculate sales commission for each line of the sales order.

The first field is the % of comission assigned to the line - field:  x_porcentaje_comision
The second field is the calculation of multiplying the price subtotal by the commission percentage.

The calculation is:

Calculated record: x_studio_calculo_comisiones

dependencies: price_subtotal, x_porcentaje_comision

for record in self:
  record[("x_studio_calculo_comisiones")] = record.price_subtotal * record.x_porcentaje_comision




The problem is that it is not making any calculation in the sales order line



I am using Odoo 14 with Studio, I am  new in this System, I wish that you can help me.


Thanks!!

Avatar
Discard
Best Answer

Hi Gromex,

You can follow the following steps
Create the following fields with Odoo Studio and add them to the sale.order.line model:

1. Field x_studio_comi_1 


2. Field x_studio__comisin_1

3. In the model sale.order.line declare the field x_studio__comisin_1
4. Generate the commission calculation in the sale.order model

Ready..

Regards. 

Avatar
Discard

Excellent Post. I need a similar solution in a Community V15 environment. Can I contact you to talk about this?