零件图号零件名称
This commit is contained in:
@@ -15,3 +15,4 @@ from . import sf_technology_design
|
||||
from . import sf_production_common
|
||||
from . import sale_order
|
||||
from . import quick_easy_order
|
||||
from . import purchase_order
|
||||
@@ -774,11 +774,10 @@ class ResProductMo(models.Model):
|
||||
|
||||
# bfm下单
|
||||
manual_quotation = fields.Boolean('人工编程', default=False, readonly=True)
|
||||
part_number = fields.Char(string='零件图号', readonly=True)
|
||||
machining_drawings = fields.Binary('2D加工图纸', readonly=True)
|
||||
quality_standard = fields.Binary('质检标准', readonly=True)
|
||||
part_name = fields.Char(string='零件名称', readonly=True)
|
||||
|
||||
part_number = fields.Char(string='零件图号', readonly=True)
|
||||
@api.constrains('tool_length')
|
||||
def _check_tool_length_size(self):
|
||||
if self.tool_length > 1000000:
|
||||
@@ -892,7 +891,7 @@ class ResProductMo(models.Model):
|
||||
'machining_drawings': '' if not item['machining_drawings'] else base64.b64decode(
|
||||
item['machining_drawings']),
|
||||
'quality_standard': '' if not item['quality_standard'] else base64.b64decode(item['quality_standard']),
|
||||
'part_name': item['part_name'],
|
||||
'part_name': item.get('part_name') or '',
|
||||
}
|
||||
tax_id = self.env['account.tax'].sudo().search(
|
||||
[('type_tax_use', '=', 'sale'), ('amount', '=', item.get('tax')), ('price_include', '=', 'True')])
|
||||
|
||||
7
sf_manufacturing/models/purchase_order.py
Normal file
7
sf_manufacturing/models/purchase_order.py
Normal file
@@ -0,0 +1,7 @@
|
||||
import logging
|
||||
from odoo import models, fields, api
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
class PurchaseOrderLine(models.Model):
|
||||
_inherit = 'purchase.order.line'
|
||||
part_number = fields.Char('零件图号', related='product_id.part_number', readonly=True)
|
||||
@@ -152,7 +152,7 @@ class SaleOrder(models.Model):
|
||||
|
||||
class SaleOrderLine(models.Model):
|
||||
_inherit = 'sale.order.line'
|
||||
|
||||
part_number = fields.Char('零件图号', related='product_id.part_number', readonly=True)
|
||||
# 供货方式
|
||||
supply_method = fields.Selection([
|
||||
('automation', "自动化产线加工"),
|
||||
|
||||
Reference in New Issue
Block a user