Help

1

Commission type

Avatar
erick edquiban


how can change the computation in commission type .

sample i want to change this

formula:

if line._name == 'sale.order.line':
result = 0
if line._name == 'account.invoice.line':
result = 0 


into this 

Quality of product * Linear unit * Linear Price = commission type

the scenario is , i have linear unit and linear price in product template form and i have quantity of the product in sale form 

i want to set the my commission type by getting the product of this three fields

Is it possible?


Avatar
Discard
1 Answer
0
Best Answer

Here's the sample code:

if line.product_id.x_fields_1 <= value (100):    

result = 1.00 * line.product_id.x_fields_1 * line.x_fields_2 

elif line.product_id.x_fields_1 >= value (101): 

result = 1.50 * line.product_id.x_fields_1 * line.x_fields_2 


This idea is same with salary rule of payroll module

Avatar
Discard