Refine trade line form layout

This commit is contained in:
2026-07-27 21:46:11 +02:00
parent f8edbed1eb
commit c62cee33af
3 changed files with 41 additions and 28 deletions

View File

@@ -2865,6 +2865,10 @@ class Line(metaclass=PoolMeta):
def default_finished(cls):
return False
@classmethod
def default_delivery_date_edit(cls):
return True
@property
def report_fixing_rule(self):
pricing_rule = ''

View File

@@ -21,7 +21,7 @@ this repository contains the full copyright notices and license terms. -->
col_widths="1fr,1fr,1fr,1fr,1fr,1fr,1fr,1fr,1fr,1fr,1fr,1fr">
<group id="identity" colspan="12" col="12" panel="summary"
xalign="0" yalign="0"
col_widths="min-content,2fr,min-content,1.2fr,min-content,1fr,min-content,120px,min-content,120px,min-content,min-content">
col_widths="min-content,2fr,min-content,1.6fr,min-content,1fr,min-content,130px,min-content,130px,min-content,130px">
<label name="product"/>
<field name="product"
view_ids="purchase.product_view_list_purchase_line"/>
@@ -40,8 +40,7 @@ this repository contains the full copyright notices and license terms. -->
<field name="specification" colspan="3"/>
<label id="delivery_date" string="Delivery Date:"/>
<field name="delivery_date" width="120" xexpand="0" xfill="0"/>
<label string="" id="delivery_date_edit_label"/>
<field name="delivery_date_edit" xexpand="0" xfill="0" xalign="0"/>
<field name="delivery_date_edit" invisible="1"/>
</group>
<group id="quantities" string="Quantities &amp; Unit"
colspan="12" col="12" panel="card" icon="tryton-archive"
@@ -64,9 +63,9 @@ this repository contains the full copyright notices and license terms. -->
xalign="0" yalign="0"
col_widths="1fr">
<group id="coffee_packing" string="Packing &amp; Tolerance"
colspan="1" col="6" panel="card" icon="tryton-archive"
colspan="1" col="4" panel="card" icon="tryton-archive"
xalign="0" yalign="0"
col_widths="min-content,130px,min-content,150px,min-content,130px">
col_widths="min-content,1fr,min-content,1fr">
<label name="coffee_packing_count"/>
<field name="coffee_packing_count" width="120" xexpand="0" xfill="0"/>
<label name="coffee_packing_unit"/>
@@ -76,18 +75,19 @@ this repository contains the full copyright notices and license terms. -->
<field name="inherit_tol"/>
<label name="inherit_cer"/>
<field name="inherit_cer"/>
<label name="certif"/>
<field name="certif"/>
<newline/>
<label name="tol_min"/>
<field name="tol_min"/>
<label name="tol_max"/>
<field name="tol_max"/>
<newline/>
<label name="certif"/>
<field name="certif" width="150" xexpand="0" xfill="0"/>
<label name="tolerance_used" string="Tol. used:"/>
<field name="tolerance_used" widget="tolerance_gauge"
min_field="tolerance_min" max_field="tolerance_max"
width="160" xexpand="0" xfill="0" xalign="0"/>
<newline/>
<label name="tol_min_v"/>
<field name="tol_min_v" width="90" xexpand="0" xfill="0"/>
<label name="tol_max_v"/>
@@ -100,9 +100,9 @@ this repository contains the full copyright notices and license terms. -->
xalign="0" yalign="0"
col_widths="1fr">
<group id="pricing_amounts" string="Pricing &amp; Amounts"
colspan="1" col="6" panel="card" icon="tryton-public"
colspan="1" col="4" panel="card" icon="tryton-public"
xalign="0" yalign="0"
col_widths="min-content,130px,min-content,150px,min-content,130px">
col_widths="min-content,1fr,min-content,1fr">
<label name="price_type"/>
<field name="price_type"/>
<label name="unit_price"/>
@@ -111,12 +111,16 @@ this repository contains the full copyright notices and license terms. -->
<label name="enable_linked_currency"/>
<field name="enable_linked_currency" xexpand="0" xfill="0"/>
<newline/>
<label name="linked_currency"/>
<field name="linked_currency" width="130" xexpand="0" xfill="0"/>
<label name="linked_unit"/>
<field name="linked_unit" width="130" xexpand="0" xfill="0"/>
<label name="linked_price"/>
<field name="linked_price" width="110" xexpand="0" xfill="0"/>
<group id="linked_currency_pricing" colspan="4" col="6"
xalign="0" yalign="0"
col_widths="min-content,95px,min-content,115px,min-content,100px">
<label name="linked_currency"/>
<field name="linked_currency" width="90" xexpand="0" xfill="0"/>
<label name="linked_unit"/>
<field name="linked_unit" width="105" xexpand="0" xfill="0"/>
<label name="linked_price"/>
<field name="linked_price" width="95" xexpand="0" xfill="0"/>
</group>
<newline/>
<label name="premium"/>
<field name="premium" width="120" xexpand="0" xfill="0"/>

View File

@@ -21,7 +21,7 @@ this repository contains the full copyright notices and license terms. -->
col_widths="1fr,1fr,1fr,1fr,1fr,1fr,1fr,1fr,1fr,1fr,1fr,1fr">
<group id="identity" colspan="12" col="10" panel="summary"
xalign="0" yalign="0"
col_widths="min-content,2fr,min-content,1.2fr,min-content,1fr,min-content,0.8fr,min-content,min-content">
col_widths="min-content,2fr,min-content,1.6fr,min-content,1fr,min-content,130px,min-content,130px">
<label name="product"/>
<field name="product"/>
<label name="del_period" string="Execution Period:"/>
@@ -61,9 +61,9 @@ this repository contains the full copyright notices and license terms. -->
xalign="0" yalign="0"
col_widths="1fr">
<group id="coffee_packing" string="Packing &amp; Tolerance"
colspan="1" col="6" panel="card" icon="tryton-archive"
colspan="1" col="4" panel="card" icon="tryton-archive"
xalign="0" yalign="0"
col_widths="min-content,130px,min-content,150px,min-content,130px">
col_widths="min-content,1fr,min-content,1fr">
<label name="coffee_packing_count"/>
<field name="coffee_packing_count" width="120" xexpand="0" xfill="0"/>
<label name="coffee_packing_unit"/>
@@ -73,18 +73,19 @@ this repository contains the full copyright notices and license terms. -->
<field name="inherit_tol"/>
<label name="inherit_cer"/>
<field name="inherit_cer"/>
<label name="certif"/>
<field name="certif"/>
<newline/>
<label name="tol_min"/>
<field name="tol_min"/>
<label name="tol_max"/>
<field name="tol_max"/>
<newline/>
<label name="certif"/>
<field name="certif" width="150" xexpand="0" xfill="0"/>
<label name="tolerance_used" string="Tol. used:"/>
<field name="tolerance_used" widget="tolerance_gauge"
min_field="tolerance_min" max_field="tolerance_max"
width="160" xexpand="0" xfill="0" xalign="0"/>
<newline/>
<label name="tol_min_v"/>
<field name="tol_min_v" width="90" xexpand="0" xfill="0"/>
<label name="tol_max_v"/>
@@ -97,9 +98,9 @@ this repository contains the full copyright notices and license terms. -->
xalign="0" yalign="0"
col_widths="1fr">
<group id="pricing_amounts" string="Pricing &amp; Amounts"
colspan="1" col="6" panel="card" icon="tryton-public"
colspan="1" col="4" panel="card" icon="tryton-public"
xalign="0" yalign="0"
col_widths="min-content,130px,min-content,150px,min-content,130px">
col_widths="min-content,1fr,min-content,1fr">
<label name="price_type"/>
<field name="price_type"/>
<label name="unit_price"/>
@@ -108,12 +109,16 @@ this repository contains the full copyright notices and license terms. -->
<label name="enable_linked_currency"/>
<field name="enable_linked_currency" xexpand="0" xfill="0"/>
<newline/>
<label name="linked_currency"/>
<field name="linked_currency" width="130" xexpand="0" xfill="0"/>
<label name="linked_unit"/>
<field name="linked_unit" width="130" xexpand="0" xfill="0"/>
<label name="linked_price"/>
<field name="linked_price" width="110" xexpand="0" xfill="0"/>
<group id="linked_currency_pricing" colspan="4" col="6"
xalign="0" yalign="0"
col_widths="min-content,95px,min-content,115px,min-content,100px">
<label name="linked_currency"/>
<field name="linked_currency" width="90" xexpand="0" xfill="0"/>
<label name="linked_unit"/>
<field name="linked_unit" width="105" xexpand="0" xfill="0"/>
<label name="linked_price"/>
<field name="linked_price" width="95" xexpand="0" xfill="0"/>
</group>
<newline/>
<label name="premium"/>
<field name="premium" width="120" xexpand="0" xfill="0"/>