Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2533 Zobrazení

Dear Community,


our problem is a very simple one: we got products that should be entered in integer form and others in decimal.

E.g. -> Unit is INT and Kilogram is Decimal


If we create a Sale Order the input of the quantity es equal the settings in Product Unit of Measure

So if we use INT it is not possible to enter a decimal at products with UoM Kilogram

If we set decimal precision it is allowed to enter decimal values at products with UoM Unit


So the global setting does not work for us.


We tried to manipulate SaleOrderLine -> modify the field -> bu at initiating the Class we do not know which field to use


Also it seems not possible to use an "if" statement in xml -> sale_view.xml  replace the input field -> we tried to use the integer widget if the product_uom === unit -> but if statements are not possible 


Our workaround is that we check the input on.change -> if UoM unit convert the input to integer


Does anybody know how to achieve this? Allow only integer input in SaleOrder if UoM is Unit and otherwise Decimal precision?


Thank you in advance,

best regards

Markus




Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
dub 22
2823
1
dub 21
3635
0
bře 20
2022
5
čvc 17
9032
2
dub 17
6386