Add more information on stock move form
issue11768 review439591003
This commit is contained in:
@@ -7,6 +7,7 @@ from trytond.model import ModelView, Workflow, fields
|
||||
from trytond.modules.product import price_digits, round_price
|
||||
from trytond.modules.stock_shipment_cost import ShipmentCostMixin
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
from trytond.pyson import Eval
|
||||
|
||||
|
||||
class ShipmentIn(ShipmentCostMixin, metaclass=PoolMeta):
|
||||
@@ -110,8 +111,11 @@ class ShipmentIn(ShipmentCostMixin, metaclass=PoolMeta):
|
||||
|
||||
class Move(metaclass=PoolMeta):
|
||||
__name__ = 'stock.move'
|
||||
unit_shipment_cost = fields.Numeric('Unit Shipment Cost',
|
||||
digits=price_digits, readonly=True)
|
||||
unit_shipment_cost = fields.Numeric(
|
||||
"Unit Shipment Cost", digits=price_digits, readonly=True,
|
||||
states={
|
||||
'invisible': ~Eval('unit_shipment_cost'),
|
||||
})
|
||||
|
||||
def _compute_unit_price(self, unit_price):
|
||||
if self.unit_shipment_cost:
|
||||
|
||||
@@ -3,6 +3,12 @@
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="stock_move_view_form">
|
||||
<field name="model">stock.move</field>
|
||||
<field name="inherit" ref="stock.move_view_form"/>
|
||||
<field name="name">stock_move_form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="shipment_in_view_form">
|
||||
<field name="model">stock.shipment.in</field>
|
||||
<field name="type" eval="None"/>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath expr="//field[@name='shipment_out_cost_price']" position="after">
|
||||
<label name="unit_shipment_cost"/>
|
||||
<field name="unit_shipment_cost"/>
|
||||
</xpath>
|
||||
</data>
|
||||
Reference in New Issue
Block a user