1.修复销售岗位创建快速订单没有生成销售订单问题2.工件配送Tree视图默认上产线

This commit is contained in:
jinling.yang
2024-05-07 14:44:58 +08:00
parent ed41667477
commit b8196cc4a9
10 changed files with 53 additions and 12 deletions

View File

@@ -141,6 +141,19 @@ class ResaleOrderLine(models.Model):
model_glb_file = fields.Binary('模型的glb文件')
check_status = fields.Selection(related='order_id.check_status')
@api.onchange('product_id')
def _compute_model_glb_file(self):
for line in self:
if line.product_template_id:
if not line.model_glb_file:
line.update({
'model_glb_file': line.product_id.product_tmpl_id.model_file,
})
if not line.price_unit:
line.update({
'price_unit': line.product_id.product_tmpl_id.list_price,
})
class ProductTemplate(models.Model):
_inherit = 'product.template'