Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
120 Представления

I developed a Odoo18 Modulo to permit the user to change the UOM in POS, it is almos ready, the unique issue is taht a odoo validation to say : You cannot change the unit of measure as there are already stock moves for this product ... do you have any idea, to resolve this... 

Аватар
Отменить
Автор Лучший ответ

i tried bypassed adding a product model but it isnot work, do you have a code example for that?

Аватар
Отменить
Лучший ответ

Yeah, that’s a common one — Odoo blocks the UoM change if there are stock moves linked to the product. Easiest workaround is not to touch the main UoM but use a separate field or handle the conversion in POS directly. Otherwise, you’ll need to bypass that constraint in code, but do it carefully to avoid messing up inventory consistency.


Аватар
Отменить
Автор

i tried bypassed adding a product model but it isnot work, do you have a code example for that?