Compare commits
21 Commits
release/re
...
feature/10
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b686a8272 | ||
|
|
1699f61d3f | ||
|
|
a0eec00749 | ||
|
|
f5365b4a3a | ||
|
|
8b9aa1c454 | ||
|
|
9a4d7e87ec | ||
|
|
b434329fc4 | ||
|
|
72998f04c6 | ||
|
|
23db164452 | ||
|
|
1f11d188c1 | ||
|
|
5106768330 | ||
|
|
6c0d9486fc | ||
|
|
211d74d9ff | ||
|
|
6134ac3b4c | ||
|
|
85c24e3d94 | ||
|
|
106945fba7 | ||
|
|
8ea72198ea | ||
|
|
41cd76ad14 | ||
|
|
e20510bc4f | ||
|
|
1d14ab27af | ||
|
|
fd55abec72 |
@@ -402,3 +402,11 @@ class MachiningAccuracy(models.Model):
|
|||||||
name = fields.Char('一般公差', index=True)
|
name = fields.Char('一般公差', index=True)
|
||||||
standard_tolerance = fields.Char(string="标准公差")
|
standard_tolerance = fields.Char(string="标准公差")
|
||||||
sync_id = fields.Char('同步ID')
|
sync_id = fields.Char('同步ID')
|
||||||
|
|
||||||
|
|
||||||
|
class ReSaleOrder(models.Model):
|
||||||
|
_inherit = 'sale.order'
|
||||||
|
|
||||||
|
person_of_delivery = fields.Char('收货人')
|
||||||
|
telephone_of_delivery = fields.Char('电话号码')
|
||||||
|
address_of_delivery = fields.Char('联系地址')
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
<data>
|
||||||
<record id="group_quality" model="res.groups">
|
<record id="group_quality" model="res.groups">
|
||||||
<field name="name">质检岗</field>
|
<field name="name">质检岗</field>
|
||||||
<field name="category_id" ref="base.module_category_manufacturing_quality"/>
|
<field name="category_id" ref="base.module_category_manufacturing_quality"/>
|
||||||
</record>
|
</record>
|
||||||
@@ -46,6 +46,11 @@
|
|||||||
<field name="category_id" ref="base.module_category_manufacturing_manufacturing"/>
|
<field name="category_id" ref="base.module_category_manufacturing_manufacturing"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record id="group_production_engineer" model="res.groups">
|
||||||
|
<field name="name">工艺工程师</field>
|
||||||
|
<field name="implied_ids" eval="[(4, ref('group_sf_mrp_user'))]"/>
|
||||||
|
<field name="category_id" ref="base.module_category_manufacturing_manufacturing"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record model="ir.module.category" id="module_category_plan">
|
<record model="ir.module.category" id="module_category_plan">
|
||||||
<field name="name">计划</field>
|
<field name="name">计划</field>
|
||||||
@@ -65,7 +70,7 @@
|
|||||||
<record id="group_plan_dispatch" model="res.groups">
|
<record id="group_plan_dispatch" model="res.groups">
|
||||||
<field name="name">计划调度岗</field>
|
<field name="name">计划调度岗</field>
|
||||||
<field name="category_id" ref="module_category_plan"/>
|
<field name="category_id" ref="module_category_plan"/>
|
||||||
<!-- <field name="implied_ids" eval="[(4, ref('base.group_user'))]"/> -->
|
<!-- <field name="implied_ids" eval="[(4, ref('base.group_user'))]"/> -->
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="group_plan_director" model="res.groups">
|
<record id="group_plan_director" model="res.groups">
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
<field name="inherit_id" ref="stock.view_picking_form"/>
|
<field name="inherit_id" ref="stock.view_picking_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//form//sheet//notebook//page[@name='operations']" position="after">
|
<xpath expr="//form//sheet//notebook//page[@name='operations']" position="after">
|
||||||
<page string="发货信息" name="tracking">
|
<page string="发货信息" name="tracking" attrs="{'invisible': [('picking_type_code', '!=', 'outgoing')]}">
|
||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="senderNickName" attrs="{'invisible': [('check_out', '!=', 'OUT')]}"/>
|
<field name="senderNickName" attrs="{'invisible': [('check_out', '!=', 'OUT')]}"/>
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
<field name='categ_id' class="custom_required" attrs="{'readonly': [('id', '!=', False)]}"/>
|
<field name='categ_id' class="custom_required" attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||||
<field name='is_bfm' invisible="1"/>
|
<field name='is_bfm' invisible="1"/>
|
||||||
<field name='categ_type' invisible="1"/>
|
<field name='categ_type' invisible="1"/>
|
||||||
|
<field name='part_name' attrs="{'invisible': [('categ_type', '!=', '成品')]}"/>
|
||||||
<field name='part_number' attrs="{'invisible': [('categ_type', '!=', '成品')]}"/>
|
<field name='part_number' attrs="{'invisible': [('categ_type', '!=', '成品')]}"/>
|
||||||
<field name='manual_quotation' attrs="{'invisible':[('upload_model_file', '=', [])]}"/>
|
<field name='manual_quotation' attrs="{'invisible':[('upload_model_file', '=', [])]}"/>
|
||||||
<field name="upload_model_file"
|
<field name="upload_model_file"
|
||||||
@@ -110,13 +111,13 @@
|
|||||||
</attribute>
|
</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//sheet//notebook" position="inside">
|
<xpath expr="//sheet//notebook" position="inside">
|
||||||
<page string="2D加工图纸">
|
<page string="2D加工图纸" attrs="{'invisible': [('categ_type', '!=', '成品')]}">
|
||||||
<field name='machining_drawings' attrs="{'invisible': [('categ_type', '!=', '成品')]}"
|
<field name='machining_drawings' attrs="{'invisible': [('categ_type', '!=', '成品')]}"
|
||||||
widget="adaptive_viewer"/>
|
widget="adaptive_viewer"/>
|
||||||
</page>
|
</page>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//sheet//notebook" position="inside">
|
<xpath expr="//sheet//notebook" position="inside">
|
||||||
<page string="质检标准">
|
<page string="质检标准" attrs="{'invisible': [('categ_type', '!=', '成品')]}">
|
||||||
<field name='quality_standard' attrs="{'invisible': [('categ_type', '!=', '成品')]}"
|
<field name='quality_standard' attrs="{'invisible': [('categ_type', '!=', '成品')]}"
|
||||||
widget="adaptive_viewer"/>
|
widget="adaptive_viewer"/>
|
||||||
|
|
||||||
|
|||||||
@@ -62,22 +62,22 @@ class SfMaintenanceEquipmentOEE(models.Model):
|
|||||||
("封存(报废)", "封存(报废)")],
|
("封存(报废)", "封存(报废)")],
|
||||||
default='正常', string="机床状态", related='equipment_id.state')
|
default='正常', string="机床状态", related='equipment_id.state')
|
||||||
|
|
||||||
online_time = fields.Char('开机时长(小时)', reaonly='True')
|
online_time = fields.Char('开机时长(小时)', readonly='True')
|
||||||
|
|
||||||
offline_time = fields.Char('关机时长(小时)', reaonly='True')
|
offline_time = fields.Char('关机时长(小时)', readonly='True')
|
||||||
idle_nums = fields.Integer('待机次数', reaonly='True')
|
idle_nums = fields.Integer('待机次数', readonly='True')
|
||||||
# 待机时长
|
# 待机时长
|
||||||
|
|
||||||
idle_time = fields.Char('待机时长(小时)', reaonly='True')
|
idle_time = fields.Char('待机时长(小时)', readonly='True')
|
||||||
|
|
||||||
# 待机率
|
# 待机率
|
||||||
idle_rate = fields.Char('待机率(%)', reaonly='True')
|
idle_rate = fields.Char('待机率(%)', readonly='True')
|
||||||
|
|
||||||
work_time = fields.Char('加工时长(小时)', reaonly='True')
|
work_time = fields.Char('加工时长(小时)', readonly='True')
|
||||||
work_rate = fields.Char('可用率(%)', reaonly='True')
|
work_rate = fields.Char('可用率(%)', readonly='True')
|
||||||
fault_time = fields.Char('故障时长(小时)', reaonly='True')
|
fault_time = fields.Char('故障时长(小时)', readonly='True')
|
||||||
fault_rate = fields.Char('故障率(%)', reaonly='True')
|
fault_rate = fields.Char('故障率(%)', readonly='True')
|
||||||
fault_nums = fields.Integer('故障次数', reaonly='True')
|
fault_nums = fields.Integer('故障次数', readonly='True')
|
||||||
|
|
||||||
# 设备故障日志
|
# 设备故障日志
|
||||||
sf_maintenance_logs_ids = fields.One2many('sf.maintenance.logs', 'maintenance_equipment_oee_id', '设备故障日志',
|
sf_maintenance_logs_ids = fields.One2many('sf.maintenance.logs', 'maintenance_equipment_oee_id', '设备故障日志',
|
||||||
@@ -367,25 +367,25 @@ class SfMaintenanceEquipmentOEELog(models.Model):
|
|||||||
[("ZXJGZX", "钻铣加工中心"), ("CXJGZX", "车削加工中心"), ("FHJGZX", "复合加工中心")],
|
[("ZXJGZX", "钻铣加工中心"), ("CXJGZX", "车削加工中心"), ("FHJGZX", "复合加工中心")],
|
||||||
default="", string="功能类型")
|
default="", string="功能类型")
|
||||||
machine_tool_picture = fields.Binary('设备图片')
|
machine_tool_picture = fields.Binary('设备图片')
|
||||||
type_id = fields.Many2one('sf.machine_tool.type', '品牌型号', reaonly='True')
|
type_id = fields.Many2one('sf.machine_tool.type', '品牌型号', readonly='True')
|
||||||
state = fields.Selection([("加工", "加工"), ("关机", "关机"), ("待机", "待机"), ("故障", "故障"),
|
state = fields.Selection([("加工", "加工"), ("关机", "关机"), ("待机", "待机"), ("故障", "故障"),
|
||||||
("检修", "检修"), ("保养", "保养")], default="", string="实时状态")
|
("检修", "检修"), ("保养", "保养")], default="", string="实时状态")
|
||||||
online_time = fields.Char('开机时长', reaonly='True')
|
online_time = fields.Char('开机时长', readonly='True')
|
||||||
|
|
||||||
offline_time = fields.Char('关机时长', reaonly='True')
|
offline_time = fields.Char('关机时长', readonly='True')
|
||||||
offline_nums = fields.Integer('关机次数', reaonly='True')
|
offline_nums = fields.Integer('关机次数', readonly='True')
|
||||||
# 待机时长
|
# 待机时长
|
||||||
|
|
||||||
idle_time = fields.Char('待机时长', reaonly='True')
|
idle_time = fields.Char('待机时长', readonly='True')
|
||||||
|
|
||||||
# 待机率
|
# 待机率
|
||||||
idle_rate = fields.Char('待机率', reaonly='True')
|
idle_rate = fields.Char('待机率', readonly='True')
|
||||||
|
|
||||||
work_time = fields.Char('加工时长', reaonly='True')
|
work_time = fields.Char('加工时长', readonly='True')
|
||||||
work_rate = fields.Char('可用率', reaonly='True')
|
work_rate = fields.Char('可用率', readonly='True')
|
||||||
fault_time = fields.Char('故障时长', reaonly='True')
|
fault_time = fields.Char('故障时长', readonly='True')
|
||||||
fault_rate = fields.Char('故障率', reaonly='True')
|
fault_rate = fields.Char('故障率', readonly='True')
|
||||||
fault_nums = fields.Integer('故障次数', reaonly='True')
|
fault_nums = fields.Integer('故障次数', readonly='True')
|
||||||
|
|
||||||
detail_ids = fields.One2many('maintenance.equipment.oee.log.detail', 'log_id', string='日志详情')
|
detail_ids = fields.One2many('maintenance.equipment.oee.log.detail', 'log_id', string='日志详情')
|
||||||
|
|
||||||
|
|||||||
@@ -139,7 +139,7 @@
|
|||||||
<field name="name">维保计划</field>
|
<field name="name">维保计划</field>
|
||||||
<field name="res_model">maintenance.request</field>
|
<field name="res_model">maintenance.request</field>
|
||||||
<field name="view_mode">tree,kanban,form,pivot,graph,calendar</field>
|
<field name="view_mode">tree,kanban,form,pivot,graph,calendar</field>
|
||||||
<field name="view_id" ref="maintenance.hr_equipment_request_view_kanban"/>
|
<field name="view_id" ref="sf_maintenance.maintenance_request_view_tree_sf"/>
|
||||||
<field name="context">{'default_user_id': uid}</field>
|
<field name="context">{'default_user_id': uid}</field>
|
||||||
<field name="help" type="html">
|
<field name="help" type="html">
|
||||||
<p class="o_view_nocontent_smiling_face">
|
<p class="o_view_nocontent_smiling_face">
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
'views/production_line_view.xml',
|
'views/production_line_view.xml',
|
||||||
'views/mrp_workcenter_views.xml',
|
'views/mrp_workcenter_views.xml',
|
||||||
'views/mrp_workorder_view.xml',
|
'views/mrp_workorder_view.xml',
|
||||||
|
'views/stock_picking_view.xml',
|
||||||
'views/model_type_view.xml',
|
'views/model_type_view.xml',
|
||||||
'views/agv_setting_views.xml',
|
'views/agv_setting_views.xml',
|
||||||
'views/sf_maintenance_equipment.xml',
|
'views/sf_maintenance_equipment.xml',
|
||||||
|
|||||||
@@ -148,6 +148,8 @@ class MrpProduction(models.Model):
|
|||||||
|
|
||||||
quality_standard = fields.Binary('质检标准', related='product_id.quality_standard', readonly=True)
|
quality_standard = fields.Binary('质检标准', related='product_id.quality_standard', readonly=True)
|
||||||
|
|
||||||
|
part_name = fields.Char(string='零件名称', related='product_id.part_name', readonly=True)
|
||||||
|
|
||||||
@api.depends('product_id.manual_quotation')
|
@api.depends('product_id.manual_quotation')
|
||||||
def _compute_manual_quotation(self):
|
def _compute_manual_quotation(self):
|
||||||
for item in self:
|
for item in self:
|
||||||
|
|||||||
@@ -228,6 +228,7 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
part_number = fields.Char(related='production_id.part_number', string='零件图号')
|
part_number = fields.Char(related='production_id.part_number', string='零件图号')
|
||||||
machining_drawings = fields.Binary('2D加工图纸', related='production_id.part_drawing', readonly=True)
|
machining_drawings = fields.Binary('2D加工图纸', related='production_id.part_drawing', readonly=True)
|
||||||
quality_standard = fields.Binary('质检标准', related='production_id.quality_standard', readonly=True)
|
quality_standard = fields.Binary('质检标准', related='production_id.quality_standard', readonly=True)
|
||||||
|
part_name = fields.Char(related='production_id.part_name', string='零件名称')
|
||||||
|
|
||||||
# 工序状态
|
# 工序状态
|
||||||
process_state = fields.Selection([
|
process_state = fields.Selection([
|
||||||
|
|||||||
@@ -141,11 +141,11 @@ class ResProductMo(models.Model):
|
|||||||
cutting_tool_coarse_medium_fine = fields.Selection(related='cutting_tool_model_id.integral_coarse_medium_fine', string='粗/中/精')
|
cutting_tool_coarse_medium_fine = fields.Selection(related='cutting_tool_model_id.integral_coarse_medium_fine', string='粗/中/精')
|
||||||
# cutting_tool_model_id.integral_coarse_medium_fine
|
# cutting_tool_model_id.integral_coarse_medium_fine
|
||||||
# cutting_tool_run_out_accuracy_max = fields.Float('端跳精度max', digits=(6, 1))
|
# cutting_tool_run_out_accuracy_max = fields.Float('端跳精度max', digits=(6, 1))
|
||||||
cutting_tool_run_out_accuracy_max = fields.Char(related='cutting_tool_model_id.integral_run_out_accuracy_max', string='端跳精度max', digits=(6, 1))
|
cutting_tool_run_out_accuracy_max = fields.Char(related='cutting_tool_model_id.integral_run_out_accuracy_max', string='端跳精度max')
|
||||||
# cutting_tool_model_id.integral_run_out_accuracy_max
|
# cutting_tool_model_id.integral_run_out_accuracy_max
|
||||||
# cutting_tool_run_out_accuracy_min = fields.Float('端跳精度min', digits=(6, 1))
|
# cutting_tool_run_out_accuracy_min = fields.Float('端跳精度min', digits=(6, 1))
|
||||||
cutting_tool_run_out_accuracy_min = fields.Char(related='cutting_tool_model_id.integral_run_out_accuracy_min',
|
cutting_tool_run_out_accuracy_min = fields.Char(related='cutting_tool_model_id.integral_run_out_accuracy_min',
|
||||||
string='端跳精度min', digits=(6, 1))
|
string='端跳精度min')
|
||||||
# cutting_tool_model_id.integral_run_out_accuracy_min
|
# cutting_tool_model_id.integral_run_out_accuracy_min
|
||||||
# cutting_tool_blade_tip_working_size = fields.Char('刀尖倒角度(°)', size=20)
|
# cutting_tool_blade_tip_working_size = fields.Char('刀尖倒角度(°)', size=20)
|
||||||
cutting_tool_blade_tip_working_size = fields.Char(related='specification_id.blade_tip_working_size',
|
cutting_tool_blade_tip_working_size = fields.Char(related='specification_id.blade_tip_working_size',
|
||||||
@@ -777,6 +777,7 @@ class ResProductMo(models.Model):
|
|||||||
part_number = fields.Char(string='零件图号', readonly=True)
|
part_number = fields.Char(string='零件图号', readonly=True)
|
||||||
machining_drawings = fields.Binary('2D加工图纸', readonly=True)
|
machining_drawings = fields.Binary('2D加工图纸', readonly=True)
|
||||||
quality_standard = fields.Binary('质检标准', readonly=True)
|
quality_standard = fields.Binary('质检标准', readonly=True)
|
||||||
|
part_name = fields.Char(string='零件名称', readonly=True)
|
||||||
|
|
||||||
@api.constrains('tool_length')
|
@api.constrains('tool_length')
|
||||||
def _check_tool_length_size(self):
|
def _check_tool_length_size(self):
|
||||||
@@ -884,6 +885,7 @@ class ResProductMo(models.Model):
|
|||||||
'machining_drawings': '' if not item['machining_drawings'] else base64.b64decode(
|
'machining_drawings': '' if not item['machining_drawings'] else base64.b64decode(
|
||||||
item['machining_drawings']),
|
item['machining_drawings']),
|
||||||
'quality_standard': '' if not item['quality_standard'] else base64.b64decode(item['quality_standard']),
|
'quality_standard': '' if not item['quality_standard'] else base64.b64decode(item['quality_standard']),
|
||||||
|
'part_name': item['part_name'],
|
||||||
}
|
}
|
||||||
tax_id = self.env['account.tax'].sudo().search(
|
tax_id = self.env['account.tax'].sudo().search(
|
||||||
[('type_tax_use', '=', 'sale'), ('amount', '=', item.get('tax')), ('price_include', '=', 'True')])
|
[('type_tax_use', '=', 'sale'), ('amount', '=', item.get('tax')), ('price_include', '=', 'True')])
|
||||||
|
|||||||
@@ -548,6 +548,42 @@ class StockPicking(models.Model):
|
|||||||
_inherit = 'stock.picking'
|
_inherit = 'stock.picking'
|
||||||
|
|
||||||
surface_technics_parameters_id = fields.Many2one('sf.production.process.parameter', string="表面工艺可选参数")
|
surface_technics_parameters_id = fields.Many2one('sf.production.process.parameter', string="表面工艺可选参数")
|
||||||
|
person_of_delivery = fields.Char('收货人', compute='_compute_move_ids', store=True)
|
||||||
|
telephone_of_delivery = fields.Char('电话号码', compute='_compute_move_ids', store=True)
|
||||||
|
address_of_delivery = fields.Char('联系地址', compute='_compute_move_ids', store=True)
|
||||||
|
|
||||||
|
retrospect_ref = fields.Char('追溯参考', compute='_compute_move_ids', store=True)
|
||||||
|
|
||||||
|
@api.depends('move_ids')
|
||||||
|
def _compute_move_ids(self):
|
||||||
|
for item in self:
|
||||||
|
if item.move_ids:
|
||||||
|
if item.picking_type_id.sequence_code == 'DL':
|
||||||
|
sale_name = item.move_ids[0].product_id.name.split('-')[1]
|
||||||
|
if 'S' in sale_name:
|
||||||
|
sale_id = self.env['sale.order'].sudo().search([('name', '=', sale_name)])
|
||||||
|
item.person_of_delivery = sale_id.person_of_delivery
|
||||||
|
item.telephone_of_delivery = sale_id.telephone_of_delivery
|
||||||
|
item.address_of_delivery = sale_id.address_of_delivery
|
||||||
|
else:
|
||||||
|
raise ValidationError('坯料名称格式错误,正确格式为[R-S???-?]!!!')
|
||||||
|
move_ids = []
|
||||||
|
for move_id in item.move_ids:
|
||||||
|
move_ids.append(move_id.product_id.id)
|
||||||
|
boms = self.env['mrp.bom'].sudo().search([('bom_line_ids.product_id', 'in', move_ids)])
|
||||||
|
default_codes = ''
|
||||||
|
if boms:
|
||||||
|
for bom in boms:
|
||||||
|
code = bom.product_tmpl_id.default_code.split('-')[-1]
|
||||||
|
default_code = bom.product_tmpl_id.default_code.split(f'-{code}')[0]
|
||||||
|
if default_code not in default_codes:
|
||||||
|
if default_codes == '':
|
||||||
|
default_codes = default_code
|
||||||
|
else:
|
||||||
|
default_codes = default_codes + ',' + default_code
|
||||||
|
item.retrospect_ref = default_codes
|
||||||
|
elif item.picking_type_id.sequence_code in ['INT', 'PC']:
|
||||||
|
pass
|
||||||
|
|
||||||
# 设置外协出入单的名称
|
# 设置外协出入单的名称
|
||||||
def _get_name_Res(self, rescode):
|
def _get_name_Res(self, rescode):
|
||||||
@@ -741,6 +777,8 @@ class ReStockMove(models.Model):
|
|||||||
self.next_serial = self.env['stock.lot']._get_next_serial(self.company_id, self.product_id)
|
self.next_serial = self.env['stock.lot']._get_next_serial(self.company_id, self.product_id)
|
||||||
elif self.product_id.tracking == "lot":
|
elif self.product_id.tracking == "lot":
|
||||||
self._put_tool_lot(self.company_id, self.product_id, self.origin)
|
self._put_tool_lot(self.company_id, self.product_id, self.origin)
|
||||||
|
if not self.move_line_nosuggest_ids:
|
||||||
|
self._generate_serial_numbers()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'name': _('Detailed Operations'),
|
'name': _('Detailed Operations'),
|
||||||
|
|||||||
@@ -168,4 +168,3 @@ access_sf_agv_scheduling_group_sf_equipment_user,sf_agv_scheduling_group_sf_equi
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
|
@@ -97,6 +97,7 @@
|
|||||||
<xpath expr="//field[@name='user_id']" position="after">
|
<xpath expr="//field[@name='user_id']" position="after">
|
||||||
<field name="production_line_id" readonly="1"/>
|
<field name="production_line_id" readonly="1"/>
|
||||||
<!-- <field name="production_line_state" readonly="1"/>-->
|
<!-- <field name="production_line_state" readonly="1"/>-->
|
||||||
|
<field name="part_name"/>
|
||||||
<field name="part_number" string="成品的零件图号"/>
|
<field name="part_number" string="成品的零件图号"/>
|
||||||
<field name="tool_state"/>
|
<field name="tool_state"/>
|
||||||
<field name="tool_state_remark" string="备注" attrs="{'invisible': [('tool_state', '!=', '1')]}"/>
|
<field name="tool_state_remark" string="备注" attrs="{'invisible': [('tool_state', '!=', '1')]}"/>
|
||||||
|
|||||||
@@ -197,7 +197,7 @@
|
|||||||
<!-- attrs="{'invisible': ['|', '|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '!=', 'blocked'),('state','=','done')]}"/> -->
|
<!-- attrs="{'invisible': ['|', '|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '!=', 'blocked'),('state','=','done')]}"/> -->
|
||||||
<!-- <button name="button_workpiece_delivery" type="object" string="工件配送" class="btn-primary"-->
|
<!-- <button name="button_workpiece_delivery" type="object" string="工件配送" class="btn-primary"-->
|
||||||
<!-- attrs="{'invisible': ['|','|','|','|',('routing_type','!=','装夹预调'),('is_delivery','=',True),('state','!=','done'),('is_rework','=',True),'&',('rfid_code','in',['',False]),('state','=','done')]}"/>-->
|
<!-- attrs="{'invisible': ['|','|','|','|',('routing_type','!=','装夹预调'),('is_delivery','=',True),('state','!=','done'),('is_rework','=',True),'&',('rfid_code','in',['',False]),('state','=','done')]}"/>-->
|
||||||
<button name="button_rework_pre" type="object" string="返工"
|
<button name="button_rework_pre" type="object" string="异常反馈"
|
||||||
class="btn-primary"
|
class="btn-primary"
|
||||||
attrs="{'invisible': ['|','|',('routing_type','!=','装夹预调'),('state','!=','progress'),('is_rework','=',True)]}"/>
|
attrs="{'invisible': ['|','|',('routing_type','!=','装夹预调'),('state','!=','progress'),('is_rework','=',True)]}"/>
|
||||||
<button name="unbind_tray" type="object" string="解绑托盘"
|
<button name="unbind_tray" type="object" string="解绑托盘"
|
||||||
@@ -281,6 +281,7 @@
|
|||||||
<label for="material_height" string="高"/>
|
<label for="material_height" string="高"/>
|
||||||
<field name="material_height" class="o_address_zip"/>
|
<field name="material_height" class="o_address_zip"/>
|
||||||
</div>
|
</div>
|
||||||
|
<field name="part_name"/>
|
||||||
<field name="part_number" string="成品的零件图号"/>
|
<field name="part_number" string="成品的零件图号"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//label[1]" position="attributes">
|
<xpath expr="//label[1]" position="attributes">
|
||||||
|
|||||||
@@ -1,22 +1,51 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
<data>
|
||||||
<record id="view_stock_move_operations_inherit_sf" model="ir.ui.view">
|
<!-- <record id="view_stock_move_operations_inherit_sf" model="ir.ui.view">-->
|
||||||
<field name="name">stock.move.operations.form.inherit.sf</field>
|
<!-- <field name="name">stock.move.operations.form.inherit.sf</field>-->
|
||||||
<field name="model">stock.move</field>
|
<!-- <field name="model">stock.move</field>-->
|
||||||
<field name="inherit_id" ref="stock.view_stock_move_operations"/>
|
<!-- <field name="inherit_id" ref="stock.view_stock_move_operations"/>-->
|
||||||
<field name="arch" type="xml">
|
<!-- <field name="arch" type="xml">-->
|
||||||
<xpath expr="//button[@name='action_assign_serial_show_details']" position="after">
|
<!-- <xpath expr="//button[@name='action_assign_serial_show_details']" position="after">-->
|
||||||
<button name="print_serial_numbers" string="序列号打印" type="object"/>
|
<!-- <button name="print_serial_numbers" string="序列号打印" type="object"/>-->
|
||||||
</xpath>
|
<!-- </xpath>-->
|
||||||
</field>
|
<!-- </field>-->
|
||||||
</record>
|
<!-- </record>-->
|
||||||
|
|
||||||
<record model="ir.ui.view" id="view_picking_form_inherit_sf">
|
<record model="ir.ui.view" id="view_picking_form_inherit_sf_1">
|
||||||
<field name="name">stock.picking.form.inherit.sf</field>
|
<field name="name">stock.picking.form.inherit.sf</field>
|
||||||
<field name="model">stock.picking</field>
|
<field name="model">stock.picking</field>
|
||||||
<field name="inherit_id" ref="stock.view_picking_form"/>
|
<field name="inherit_id" ref="stock.view_picking_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='user_id']" position="after">
|
||||||
|
<field name="retrospect_ref"/>
|
||||||
|
<field name="person_of_delivery"/>
|
||||||
|
<field name="telephone_of_delivery"/>
|
||||||
|
<field name="address_of_delivery"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="sf_vpicktree_1" model="ir.ui.view">
|
||||||
|
<field name="name">sf.vpicktree.1</field>
|
||||||
|
<field name="model">stock.picking</field>
|
||||||
|
<field name="inherit_id" ref="stock.vpicktree"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='origin']" position="after">
|
||||||
|
<field name="retrospect_ref"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="view_picking_internal_search_sf" model="ir.ui.view">
|
||||||
|
<field name="name">stock.picking.search</field>
|
||||||
|
<field name="model">stock.picking</field>
|
||||||
|
<field name="inherit_id" ref="stock.view_picking_internal_search"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//filter[@name='picking_type']" position="after">
|
||||||
|
<filter string="追溯参考" name="retrospect_ref" domain="[]"
|
||||||
|
context="{'group_by': 'retrospect_ref'}"/>
|
||||||
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ class SfQualityCncTest(models.Model):
|
|||||||
|
|
||||||
machining_drawings = fields.Binary('2D加工图纸', related='workorder_id.machining_drawings', readonly=True)
|
machining_drawings = fields.Binary('2D加工图纸', related='workorder_id.machining_drawings', readonly=True)
|
||||||
quality_standard = fields.Binary('质检标准', related='workorder_id.quality_standard', readonly=True)
|
quality_standard = fields.Binary('质检标准', related='workorder_id.quality_standard', readonly=True)
|
||||||
|
part_name = fields.Char(related='workorder_id.part_name', string='零件名称')
|
||||||
|
|
||||||
def submit_pass(self):
|
def submit_pass(self):
|
||||||
if self.test_results in ['返工', '报废']:
|
if self.test_results in ['返工', '报废']:
|
||||||
|
|||||||
@@ -89,6 +89,7 @@
|
|||||||
<field name="model_file" widget="Viewer3D"/>
|
<field name="model_file" widget="Viewer3D"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
|
<field name="part_name"/>
|
||||||
<field name="part_number"/>
|
<field name="part_number"/>
|
||||||
<field name="processing_panel"/>
|
<field name="processing_panel"/>
|
||||||
</group>
|
</group>
|
||||||
|
|||||||
@@ -228,6 +228,7 @@ class QuickEasyOrder(models.Model):
|
|||||||
'quality_standard_mimetype': '',
|
'quality_standard_mimetype': '',
|
||||||
'machining_drawings': item.machining_drawings,
|
'machining_drawings': item.machining_drawings,
|
||||||
'quality_standard': '',
|
'quality_standard': '',
|
||||||
|
'part_name': '',
|
||||||
})
|
})
|
||||||
# res['bfm_process_order_list'] = json.dumps(res['bfm_process_order_list'])
|
# res['bfm_process_order_list'] = json.dumps(res['bfm_process_order_list'])
|
||||||
product_id = self.env.ref('sf_dlm.product_template_sf').sudo()
|
product_id = self.env.ref('sf_dlm.product_template_sf').sudo()
|
||||||
|
|||||||
@@ -32,9 +32,9 @@ class ReSaleOrder(models.Model):
|
|||||||
tracking=3,
|
tracking=3,
|
||||||
default='draft')
|
default='draft')
|
||||||
deadline_of_delivery = fields.Date('订单交期', tracking=True)
|
deadline_of_delivery = fields.Date('订单交期', tracking=True)
|
||||||
person_of_delivery = fields.Char('交货人')
|
# person_of_delivery = fields.Char('收货人')
|
||||||
telephone_of_delivery = fields.Char('交货人电话号码')
|
# telephone_of_delivery = fields.Char('电话号码')
|
||||||
address_of_delivery = fields.Char('交货人地址')
|
# address_of_delivery = fields.Char('联系地址')
|
||||||
payments_way = fields.Selection([('现结', '现结'), ('月结', '月结')], '结算方式', default='现结', tracking=True)
|
payments_way = fields.Selection([('现结', '现结'), ('月结', '月结')], '结算方式', default='现结', tracking=True)
|
||||||
pay_way = fields.Selection([('转账', '转账'), ('微信', '微信'), ('支付宝', '支付宝')], '支付方式')
|
pay_way = fields.Selection([('转账', '转账'), ('微信', '微信'), ('支付宝', '支付宝')], '支付方式')
|
||||||
check_status = fields.Selection([('pending', '待审核'), ('approved', '已审核'), ('fail', '不通过')], '审核状态')
|
check_status = fields.Selection([('pending', '待审核'), ('approved', '已审核'), ('fail', '不通过')], '审核状态')
|
||||||
@@ -208,6 +208,8 @@ class RePurchaseOrder(models.Model):
|
|||||||
compute='_compute_user_id',
|
compute='_compute_user_id',
|
||||||
store=True)
|
store=True)
|
||||||
|
|
||||||
|
purchase_type = fields.Selection([('standard', '标准采购'), ('consignment', '委外加工')], string='采购类型', default='standard')
|
||||||
|
|
||||||
@api.depends('partner_id')
|
@api.depends('partner_id')
|
||||||
def _compute_user_id(self):
|
def _compute_user_id(self):
|
||||||
if not self.user_id:
|
if not self.user_id:
|
||||||
|
|||||||
@@ -158,6 +158,11 @@
|
|||||||
<attribute name="attrs">{'readonly': [('state', 'in', ['purchase'])]}
|
<attribute name="attrs">{'readonly': [('state', 'in', ['purchase'])]}
|
||||||
</attribute>
|
</attribute>
|
||||||
</field>
|
</field>
|
||||||
|
|
||||||
|
<!-- 添加采购类型字段 -->
|
||||||
|
<field name="partner_ref" position="after">
|
||||||
|
<field name="purchase_type" string="采购类型" readonly="1"/>
|
||||||
|
</field>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|||||||
@@ -96,8 +96,8 @@
|
|||||||
</field>
|
</field>
|
||||||
<field name="payment_term_id" position="after">
|
<field name="payment_term_id" position="after">
|
||||||
<field name="deadline_of_delivery" readonly="0"/>
|
<field name="deadline_of_delivery" readonly="0"/>
|
||||||
<field name="payments_way" attrs="{'readonly': [('state', 'in', ('sale','cancel'))]}"/>
|
<field name="payments_way" invisible="1"/>
|
||||||
<field name="pay_way" attrs="{'readonly': [('state', 'in', ('sale','cancel'))]}"/>
|
<field name="pay_way" invisible="1"/>
|
||||||
<!-- <field name="schedule_status" readonly="1"/> -->
|
<!-- <field name="schedule_status" readonly="1"/> -->
|
||||||
</field>
|
</field>
|
||||||
<xpath expr="//field[@name='order_line']/tree/field[@name='name']" position="before">
|
<xpath expr="//field[@name='order_line']/tree/field[@name='name']" position="before">
|
||||||
@@ -181,17 +181,27 @@
|
|||||||
<attribute name="string">下单日期</attribute>
|
<attribute name="string">下单日期</attribute>
|
||||||
</field>
|
</field>
|
||||||
<field name="sale_order_template_id" position="after">
|
<field name="sale_order_template_id" position="after">
|
||||||
<field name="person_of_delivery" string="交货人"
|
|
||||||
attrs="{'readonly': [('state', 'in', ('sale','cancel'))]}"/>
|
|
||||||
<field name="telephone_of_delivery" string="交货人联系方式"
|
|
||||||
attrs="{'readonly': [('state', 'in', ('sale','cancel'))]}"/>
|
|
||||||
<field name="address_of_delivery" string="交货人地址"
|
|
||||||
attrs="{'readonly': [('state', 'in', ('sale','cancel'))]}"/>
|
|
||||||
<field name="remark" attrs="{'readonly': [('state', 'in', ('sale','cancel'))]}"/>
|
<field name="remark" attrs="{'readonly': [('state', 'in', ('sale','cancel'))]}"/>
|
||||||
</field>
|
</field>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record model="ir.ui.view" id="view_order_form_inherit_sale_stock_sf">
|
||||||
|
<field name="name">view_order_form_inherit_sale_stock.sf</field>
|
||||||
|
<field name="model">sale.order</field>
|
||||||
|
<field name="inherit_id" ref="sale_stock.view_order_form_inherit_sale_stock"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='picking_policy']" position="before">
|
||||||
|
<field name="person_of_delivery" string="收货人"
|
||||||
|
attrs="{'readonly': [('state', 'in', ('sale','cancel'))]}"/>
|
||||||
|
<field name="telephone_of_delivery" string="电话号码"
|
||||||
|
attrs="{'readonly': [('state', 'in', ('sale','cancel'))]}"/>
|
||||||
|
<field name="address_of_delivery" string="联系地址"
|
||||||
|
attrs="{'readonly': [('state', 'in', ('sale','cancel'))]}"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record id="view_quotation_with_onboarding_tree_inherit_sf" model="ir.ui.view">
|
<record id="view_quotation_with_onboarding_tree_inherit_sf" model="ir.ui.view">
|
||||||
<field name="name">sale.order.quotation.tree.inherit.sf</field>
|
<field name="name">sale.order.quotation.tree.inherit.sf</field>
|
||||||
<field name="model">sale.order</field>
|
<field name="model">sale.order</field>
|
||||||
|
|||||||
@@ -450,7 +450,7 @@
|
|||||||
<field name="production_line_name_id" optional="hide"/>
|
<field name="production_line_name_id" optional="hide"/>
|
||||||
<field name="machine_tool_name_id" optional="hide"/>
|
<field name="machine_tool_name_id" optional="hide"/>
|
||||||
<field name="applicant" optional="hide"/>
|
<field name="applicant" optional="hide"/>
|
||||||
<field name="apply_time"/>
|
<field name="create_date" string="申请时间"/>
|
||||||
<field name="assemble_status" widget='badge'
|
<field name="assemble_status" widget='badge'
|
||||||
decoration-info="assemble_status == '0'"
|
decoration-info="assemble_status == '0'"
|
||||||
decoration-warning="assemble_status == '01'"
|
decoration-warning="assemble_status == '01'"
|
||||||
|
|||||||
@@ -1119,6 +1119,8 @@ class SfPickingType(models.Model):
|
|||||||
action = super(SfPickingType, self)._get_action(action_xmlid)
|
action = super(SfPickingType, self)._get_action(action_xmlid)
|
||||||
if not self.env.user.has_group('base.group_system'):
|
if not self.env.user.has_group('base.group_system'):
|
||||||
action['context']['create'] = False
|
action['context']['create'] = False
|
||||||
|
if self.sequence_code in ['DL', 'INT', 'PC']:
|
||||||
|
action['context']['search_default_retrospect_ref'] = 1
|
||||||
return action
|
return action
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user