'code' : fields.char('Code', help="The code of the transport unit."),
'weight': fields.float('Total Package Weight',
help='The weight of a full package, pallet or box.'),
- 'weight_ul': fields.float('Empty Package Weight'),
- 'height': fields.float('Height', help='The height of the package'),
- 'width': fields.float('Width', help='The width of the package'),
- 'length': fields.float('Length', help='The length of the package'),
}
--
def _check_ean_key(self, cr, uid, ids, context=None):
for pack in self.browse(cr, uid, ids, context=context):
res = check_ean(pack.ean)
attrs="{'readonly': [('is_only_child', '=', False)]}"/>
</group>
</group>
-- <field name="packaging" groups="product.group_stock_packaging"
-- attrs="{'readonly': [('is_only_child', '=', False)]}">
++ <separator string="Packages" groups="product.group_stock_packaging"/>
++ <field name="packaging" groups="product.group_stock_packaging" attrs="{'readonly': [('is_only_child', '=', False)]}">
<form string="Packaging" version="7.0">
<group col="4">
<field name="ean"/>
<newline/>
<field name="qty"/>
<field name="ul"/>
- <field name="weight_ul"/>
<separator colspan="4" string="Palletization"/>
<field name="ul_qty"/>
- <field name="ul_container"/>
++ <field name="ul_container" domain="[('type', '=', 'pallet')]" context="{'default_type': 'pallet'}"/>
<field name="rows"/>
<field name="weight"/>
- <separator colspan="4" string="Pallet Dimension"/>
- <field name="height"/>
- <field name="width"/>
- <field name="length"/>
</group>
<separator colspan="4" string="Description"/>
<field name="name"/>
'complete_name': fields.function(_complete_name, type='char', string="Package Name",),
'parent_left': fields.integer('Left Parent', select=1),
'parent_right': fields.integer('Right Parent', select=1),
- 'packaging_id': fields.many2one('product.packaging', 'Type of Packaging'),
- 'packaging_id': fields.many2one('product.packaging', 'Packaging'),
++ 'packaging_id': fields.many2one('product.packaging', 'Packaging', help="This field should be completed only if everything inside the package share the same product, otherwise it doesn't really makes sense."),
+ 'ul_id': fields.many2one('product.ul', 'Logistic Unit'),
'location_id': fields.function(_get_package_info, type='many2one', relation='stock.location', string='Location', multi="package",
store={
'stock.quant': (_get_packages, ['location_id'], 10),