Skip to Content
Menu
This question has been flagged
2 Replies
2561 Views

Hello,


I'm in the process of making my own module to customize some aspect of Odoo, one of the mods I made is changing the columns in sale order view, i.e. Price Unit comes now before Quantity. 

I've also activated the Customize sale order and invoices option.

The problem is in a sale order line when I enter Price Unit first and then change the Quantity, as soon as I get out of the Quantity field Price Unit goes back to 1.000.


How can I avoid this behavior ? I suppose I have to inherit a _on_change method from sale.py, but I don't know which one neither how to do that.

Thanks for your help

Regards

Vart

Avatar
Discard
Author Best Answer

Hum... And how do I implement javascript in my module ? Can I inherit javascript ?

Let me precise that our products are unique, i.e. I don't need to create a product each time I sell one as I would never sell the same again. Perhaps that's the part I don't get.

Any option to avoid having to create a product ?

Avatar
Discard
Best Answer

if you don't have prices set for the product, it is normal.

since checking the amount is available in stock same time you move next field.

to modify this behavior, look into javascript side, you will find it there. nothing to do in python side. 

Avatar
Discard