'currency': fields.many2one('res.currency', string="Currency", help="Currency in which Unit cost is expressed", ondelete='CASCADE'),
'linked_move_operation_ids': fields.one2many('stock.move.operation.link', 'operation_id', string='Linked Moves', readonly=True, help='Moves impacted by this operation for the computation of the remaining quantities'),
'remaining_qty': fields.function(_get_remaining_qty, type='float', string='Remaining Qty'),
- 'location_id': fields.many2one('stock.location', 'Location From'),
- 'location_dest_id': fields.many2one('stock.location', 'Location To'),
+ 'location_id': fields.many2one('stock.location', 'Location From', required=True),
+ 'location_dest_id': fields.many2one('stock.location', 'Location To', required=True),
+ 'processed': fields.selection([('true','Yes'), ('false','No')],'Has been processed?', required=True),
}
_defaults = {
<button name="recheck_availability" string="Recheck Availability" type="object" attrs="{'invisible': ['|',('pack_operation_exist', '=', False),('state','not in',('assigned', 'partially_available'))]}" groups="stock.group_stock_user" class="oe_link oe_right oe_inline"/>
</group>
</group>
- <field name="pack_operation_ids" attrs="{'invisible': [('pack_operation_exist', '=', False)]}" context="{'default_owner_id': owner_id}">
+ <field name="pack_operation_ids" attrs="{'invisible': [('pack_operation_exist', '=', False)]}" context="{'default_owner_id': owner_id, 'default_location_id': location_id, 'default_location_dest_id': location_dest_id}">
- <tree editable="top">
+ <tree editable="top" colors="grey:processed=='true'">
+ <field name="processed" invisible="1"/>
<field name="location_id"/>
<field name="product_id" on_change='product_id_change(product_id, product_uom_id, product_qty, context)'/>
<field name="product_uom_id" groups="product.group_uom" on_change='on_change_tests(product_id, product_uom_id, product_qty, context)'/>