Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
9508 Lượt xem

I need to be able to create orders with inlines that have a different subtotal than the price unit * quantity. In my situation, very often the final price of one item is the result of a bargain and not a multiplication factor of the unit price. 

Is there a way to set the subtotal of one product to a custom value (for instance from the cost price field)? If possible, I'd like to use a solution that doesn't need custom development and that would be could be compatible with future Odoo versions.

I'm using Odoo 8.

Ảnh đại diện
Huỷ bỏ
Tác giả

Dear Ermin. Sorry I still can't reply to your answer. Thank you for your help (and thank you ayman too).

For your solution 2) is there a field for that? And is it the difference between the calculated price and the final price?

About solution 3), I saw that I could change the base price to cost price, but it didn't change anything, even by creating/importing a new order. Is there another option I should check in the pricelist?

Tác giả

Dear Ayman Mohammed Adam,

Thank you for your answer. If the only way is to change the source code, I can do it. I have to familiarize myself with it first, thought. I suppose there is a python class order.line where I have to do the change, right?

Solution 2)

Just define a product "Discount", define the proper VAT tax rate and give it a negative price of your choice

Solution 3)

You have to define a proper pricelist (cost price is something totally different). For that you have to activate different prices for products in the sales configuration and to define a corresponding pricelist.

Câu trả lời hay nhất

There are 3 possibilities out of the box:

- You can enable sales order line discounts in the Sales app configuration

- You can define discount product(s) if you need to define discount amounts instead of %

- You can define customer specific pricelists

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

dear Gourry Gabrief;

The subtotal field is computed fields that means user can not edit and change it's value. I think if you need to manual enter value on the subtotal field that is impossible but i recommend you to add another float field and put it on view then override the subtotal function to get the value from your new field. I think this will solve your problem.

I hope I helped you...

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 7 22
5925
1
thg 3 15
8424
0
thg 3 25
1340
0
thg 1 25
3430
1
thg 8 23
14759