优化刀具弹窗
This commit is contained in:
@@ -830,10 +830,8 @@ class ProductProduct(models.Model):
|
|||||||
new_time = datetime.strptime(str(fields.Date.today()), "%Y-%m-%d").strftime("%Y%m%d")
|
new_time = datetime.strptime(str(fields.Date.today()), "%Y-%m-%d").strftime("%Y%m%d")
|
||||||
code += str(new_time) + '-'
|
code += str(new_time) + '-'
|
||||||
stock_lot_id = self.env['stock.lot'].sudo().search(
|
stock_lot_id = self.env['stock.lot'].sudo().search(
|
||||||
[('name', 'like', new_time), ('product_id.name', '=', '功能刀具')],
|
[('name', 'like', new_time), ('product_id.categ_type', '=', '功能刀具'),
|
||||||
limit=1,
|
('product_id.tracking', '=', 'serial')], limit=1, order="id desc")
|
||||||
order="id desc"
|
|
||||||
)
|
|
||||||
if not stock_lot_id:
|
if not stock_lot_id:
|
||||||
num = "%03d" % 1
|
num = "%03d" % 1
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user