Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
514 Ansichten

dear supporter 

i have a question about the unbild digit I changed in  Decimal Accuracy and unit of measure to 5 digit 
but when unbilled, the mo system calculates just two digits how to solve it? 

in XML, I changed, and in the view, the field changed, but it did not work can you help me

Avatar
Verwerfen
Beste Antwort

Hello 

You can change the view using the studio by setting the decimal number you want

but if you want it to affect in the code you will need some python development to edit the field

I hope this mhelps

Avatar
Verwerfen
Autor

<list sample="1">
<field name="name" decoration-bf="1"/>
<field name="product_id" readonly="state == 'done'"/>
<field name="bom_id" readonly="state == 'done'"/>
<field name="mo_id" readonly="state == 'done'"/>
<field name="lot_id" groups="stock.group_production_lot"/>
<field name="product_qty" readonly="state == 'done'" widget="float" options="{&quot;precision&quot;: 5}"/>
<field name="product_uom_id" groups="uom.group_uom" readonly="state == 'done'"/>
<field name="location_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations" readonly="state == 'done'"/>
<field name="activity_exception_decoration" widget="activity_exception"/>
<field name="company_id" groups="base.group_multi_company" readonly="state == 'done'"/>
<field name="state" widget="badge" decoration-success="state == 'done'" decoration-info="state == 'draft'"/>
</list>

___________________________________
and in form

<form string="Unbuild Orders">
<field name="company_id" invisible="1" readonly="state == 'done'"/>
<header>
<button name="action_validate" string="Unbuild" type="object" invisible="state != 'draft'" class="oe_highlight" data-hotkey="v"/>
<field name="state" widget="statusbar" statusbar_visible="draft,done"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button class="oe_stat_button" name="678" type="action" icon="fa-exchange" invisible="state != 'done'">
<div class="o_stat_info">
<span class="o_stat_text">Product Moves</span>
</div>
</button>
</div>
<div class="oe_title">
<h1><field name="name" placeholder="Unbuild Order" nolabel="1"/></h1>
</div>
<group>
<group>
<field name="product_id" readonly="mo_id or state == 'done'" force_save="1"/>
<field name="mo_bom_id" invisible="1"/>
<field name="bom_id" invisible="mo_id and not mo_bom_id" readonly="mo_id or state == 'done'" required="not mo_id" force_save="1"/>
<!-- Corrected field for 5 decimal places -->
<field name="product_qty" readonly="has_tracking == 'serial' or state == 'done'" widget="float" options="{&quot;precision&quot;: 5}"/>
<field name="product_uom_id" options="{&quot;no_open&quot;: true, &quot;no_create&quot;: true}" groups="uom.group_uom" readonly="mo_id or state == 'done'" force_save="1"/>
</group>
<group>
<field name="mo_id" readonly="state == 'done'"/>
<field name="location_id" options="{&quot;no_create&quot;: true}" groups="stock.group_stock_multi_locations" readonly="state == 'done'"/>
<field name="location_dest_id" options="{&quot;no_create&quot;: true}" groups="stock.group_stock_multi_locations" readonly="state == 'done'"/>
<field name="has_tracking" invisible="1"/>
<field name="lot_id" invisible="has_tracking == 'none'" readonly="mo_id or state == 'done'" required="has_tracking != 'none'" groups="stock.group_production_lot" force_save="1"/>
<field name="company_id" groups="base.group_multi_company" readonly="state == 'done'"/>
</group>
</group>
</sheet>
<chatter/>
</form>

can you fix my code ?

it needs to be coded from the python not the xml

Verknüpfte Beiträge Antworten Ansichten Aktivität
1
März 23
3795
2
Nov. 20
2908
2
Nov. 20
7508
0
Sept. 24
140
1
März 25
2858