1、添加权限;2、设备的设备检修标准字段关闭创建功能;3、解决 销售经理创建报价单选择产品后没有把模型和价格带过去 的bug;4、关闭仓库创建按钮
This commit is contained in:
@@ -139,7 +139,7 @@ class ReSaleOrder(models.Model):
|
||||
class ResaleOrderLine(models.Model):
|
||||
_inherit = 'sale.order.line'
|
||||
|
||||
model_glb_file = fields.Binary('模型的glb文件')
|
||||
model_glb_file = fields.Binary('模型的glb文件', compute='_compute_model_glb_file', store=True)
|
||||
# product_template_id = fields.Many2one(
|
||||
# string="产品",
|
||||
# comodel_name='product.template',
|
||||
@@ -152,18 +152,14 @@ class ResaleOrderLine(models.Model):
|
||||
# domain=[('sale_ok', '=', True), ('categ_type', '=', '成品')])
|
||||
check_status = fields.Selection(related='order_id.check_status')
|
||||
|
||||
@api.onchange('product_template_id')
|
||||
@api.depends('product_template_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,
|
||||
})
|
||||
line.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,
|
||||
})
|
||||
line.price_unit = line.product_id.product_tmpl_id.list_price
|
||||
|
||||
|
||||
class ProductTemplate(models.Model):
|
||||
|
||||
Reference in New Issue
Block a user