1、优化刀具采购入库,入库时自动生成批次号;2、优化货位看板
This commit is contained in:
@@ -452,8 +452,9 @@ class ShelfLocation(models.Model):
|
||||
# product_id = fields.Many2one('product.template', string='产品')
|
||||
product_id = fields.Many2one('product.product', string='产品', compute='_compute_product_id', store=True)
|
||||
product_sn_id = fields.Many2one('stock.lot', string='产品序列号')
|
||||
product_sn_ids = fields.Many2many('stock.lot', 'shelf_location_stock_lot', string='产品批次号')
|
||||
# 产品数量
|
||||
product_num = fields.Integer('数量')
|
||||
product_num = fields.Integer('总数量')
|
||||
|
||||
@api.depends('product_num')
|
||||
def _compute_product_num(self):
|
||||
|
||||
@@ -169,8 +169,14 @@
|
||||
<field name="name" readonly="1"/>
|
||||
<field name="shelf_id" readonly="1"/>
|
||||
<field name="location_id" readonly="1"/>
|
||||
<field name="product_sn_id" options="{'no_create': True}"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_sn_id" options="{'no_create': True}"/>
|
||||
<field name="product_sn_ids" readonly="1">
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
<field name="product_qty"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="product_num" readonly="1"/>
|
||||
<field name="location_status"/>
|
||||
<field name="storage_time" widget="datetime"/>
|
||||
|
||||
Reference in New Issue
Block a user