Purchase design

This commit is contained in:
2026-06-08 20:47:22 +02:00
parent 745325eb20
commit c36c6a411f
2 changed files with 13 additions and 22 deletions

View File

@@ -744,7 +744,7 @@ class Purchase(metaclass=PoolMeta):
'rec_name', None)
if route_from or route_to:
shipped_routes.append(
'%s -> %s' % (route_from or '-', route_to or '-'))
'%s > %s' % (route_from or '-', route_to or '-'))
if not lot_qts:
for lot in line_lots:
@@ -767,11 +767,11 @@ class Purchase(metaclass=PoolMeta):
'rec_name', None)
if route_from or route_to:
shipped_routes.append(
'%s -> %s' % (route_from or '-', route_to or '-'))
'%s > %s' % (route_from or '-', route_to or '-'))
unit = getattr(getattr(line, 'unit', None), 'rec_name', '') or ''
product = getattr(getattr(line, 'product', None), 'rec_name', '') or ''
route = (shipped_routes[0] if shipped_routes else '%s -> %s' % (
route = (shipped_routes[0] if shipped_routes else '%s > %s' % (
getattr(getattr(self, 'from_location', None), 'rec_name', None)
or '-',
getattr(getattr(self, 'to_location', None), 'rec_name', None)

View File

@@ -77,26 +77,17 @@ this repository contains the full copyright notices and license terms. -->
</group>
<group id="purchase_tolerance" string="Tolerance"
colspan="1" col="3" panel="card" icon="tryton-switch"
colspan="1" col="6" panel="card" icon="tryton-switch"
xalign="0" yalign="0"
col_widths="250px,250px,350px">
<group id="purchase_tol_min_line" colspan="1" col="2"
xalign="0" yalign="0" col_widths="105px,130px">
<label name="tol_min"/>
<field name="tol_min" width="120" xexpand="0" xfill="0"/>
</group>
<group id="purchase_tol_max_line" colspan="1" col="2"
xalign="0" yalign="0" col_widths="105px,130px">
<label name="tol_max"/>
<field name="tol_max" width="120" xexpand="0" xfill="0"/>
</group>
<group id="purchase_tolerance_used_line" colspan="1" col="2"
xalign="0" yalign="0" col_widths="125px,180px">
<label name="tolerance_used"/>
<field name="tolerance_used" widget="tolerance_gauge"
min_field="tolerance_min" max_field="tolerance_max"
width="165" xexpand="0" xfill="0"/>
</group>
col_widths="115px,110px,115px,110px,135px,165px">
<label name="tol_min"/>
<field name="tol_min" width="100" xexpand="0" xfill="0"/>
<label name="tol_max"/>
<field name="tol_max" width="100" xexpand="0" xfill="0"/>
<label name="tolerance_used"/>
<field name="tolerance_used" widget="tolerance_gauge"
min_field="tolerance_min" max_field="tolerance_max"
width="150" xexpand="0" xfill="0"/>
<field name="tolerance_min" invisible="1"/>
<field name="tolerance_max" invisible="1"/>
</group>