Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/工单消息提醒添加已排过滤
This commit is contained in:
@@ -16,6 +16,12 @@ from OCC.Extend.DataExchange import write_stl_file
|
||||
class ResProductMo(models.Model):
|
||||
_inherit = 'product.template'
|
||||
|
||||
def _get_machining_precision(self):
|
||||
machinings = self.env['sf.machining.accuracy'].sudo().search([])
|
||||
|
||||
list = [(m.sync_id, m.name) for m in machinings]
|
||||
return list
|
||||
|
||||
model_file = fields.Binary('模型文件')
|
||||
categ_type = fields.Selection(string='产品的类别', related='categ_id.type', store=True)
|
||||
model_name = fields.Char('模型名称')
|
||||
@@ -23,12 +29,7 @@ class ResProductMo(models.Model):
|
||||
model_width = fields.Float('模型宽(mm)', digits=(16, 3))
|
||||
model_height = fields.Float('模型高(mm)', digits=(16, 3))
|
||||
model_volume = fields.Float('模型体积(m³)')
|
||||
model_machining_precision = fields.Selection([
|
||||
('0.10', '±0.10mm'),
|
||||
('0.05', '±0.05mm'),
|
||||
('0.03', '±0.03mm'),
|
||||
('0.02', '±0.02mm'),
|
||||
('0.01', '±0.01mm')], string='加工精度')
|
||||
model_machining_precision = fields.Selection(selection=_get_machining_precision, string='加工精度')
|
||||
model_processing_panel = fields.Char('模型加工面板')
|
||||
model_remark = fields.Char('模型备注说明')
|
||||
length = fields.Float('长(mm)', digits=(16, 3))
|
||||
|
||||
@@ -467,6 +467,15 @@
|
||||
<field name='X_deviation_angle' readonly="1"/>
|
||||
</group>
|
||||
</page>
|
||||
|
||||
<page string="2D加工图纸" attrs="{'invisible': [('routing_type','!=','装夹预调')]}">
|
||||
<field name="machining_drawings" widget="adaptive_viewer"/>
|
||||
</page>
|
||||
|
||||
<page string="质检标准" attrs="{'invisible': [('routing_type','!=','装夹预调')]}">
|
||||
<field name="quality_standard" widget="adaptive_viewer"/>
|
||||
</page>
|
||||
|
||||
<page string="工件配送"
|
||||
attrs="{'invisible': [('routing_type','!=','装夹预调')]}">
|
||||
<field name="workpiece_delivery_ids">
|
||||
@@ -520,6 +529,13 @@
|
||||
<!-- attrs='{"invisible": ["|","|",("state","!=","progress"),("user_permissions","=",False),("results","=","合格")]}'/>-->
|
||||
<!-- </div>-->
|
||||
</page>
|
||||
<page string="2D加工图纸" attrs='{"invisible": [("routing_type","!=","CNC加工")]}'>
|
||||
<field name="machining_drawings" widget="adaptive_viewer"/>
|
||||
</page>
|
||||
|
||||
<page string="质检标准" attrs='{"invisible": [("routing_type","!=","CNC加工")]}'>
|
||||
<field name="quality_standard" widget="adaptive_viewer"/>
|
||||
</page>
|
||||
</xpath>
|
||||
<xpath expr="//page[1]" position="before">
|
||||
<page string="CNC程序" attrs='{"invisible": [("routing_type","!=","CNC加工")]}'>
|
||||
@@ -590,18 +606,6 @@
|
||||
mrp.group_mrp_manager,sf_base.group_sf_mrp_manager,sf_base.group_sf_equipment_user,sf_base.group_sf_order_user
|
||||
</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//sheet//notebook" position="inside">
|
||||
<page string="2D加工图纸">
|
||||
<field name="machining_drawings" widget="adaptive_viewer"
|
||||
attrs="{'invisible': [('routing_type', '!=', 'CNC加工')]}"/>
|
||||
</page>
|
||||
</xpath>
|
||||
<xpath expr="//sheet//notebook" position="inside">
|
||||
<page string="质检标准">
|
||||
<field name="quality_standard" widget="adaptive_viewer"
|
||||
attrs="{'invisible': [('routing_type', '!=', 'CNC加工')]}"/>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -97,11 +97,12 @@ class SFMessageWork(models.Model):
|
||||
|
||||
def request_url(self):
|
||||
url = self.env['ir.config_parameter'].get_param('web.base.url')
|
||||
action_id = self.env.ref('sf_message.mrp_workorder_action_notify').id
|
||||
action_id = self.env.ref('sf_message.mrp_workorder_issued_action').id
|
||||
menu_id = self.env['ir.model.data'].search([('name', '=', 'module_stock_dropshipping')]).id
|
||||
active_id = self.env['mrp.workcenter'].search([('name', '=', '工件装夹中心')]).id
|
||||
# 查询参数
|
||||
params = {'menu_id': menu_id, 'action': action_id, 'model': 'mrp.workorder',
|
||||
'view_type': 'list', 'active_id': 1}
|
||||
'view_type': 'list', 'active_id': active_id}
|
||||
# 拼接查询参数
|
||||
query_string = urlencode(params)
|
||||
# 拼接URL
|
||||
|
||||
@@ -30,5 +30,36 @@
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.actions.act_window" id="mrp_workorder_issued_action">
|
||||
<field name="name">工单</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.workorder</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('mrp.mrp_production_workorder_tree_editable_view')}) ]"/>
|
||||
<!-- (0, 0, {'view_mode': 'kanban', 'view_id': ref('mrp.workcenter_line_kanban')})-->
|
||||
<!-- <field name="target">fullscreen</field>-->
|
||||
<field name="target">current</field>
|
||||
<field name="domain">[('state', '!=', 'cancel'),('schedule_state', '=', '已排')]</field>
|
||||
<field name="context">{'search_default_product': 1, 'search_default_workcenter_id':
|
||||
active_id,'search_default_ready': 1, 'search_default_progress': 1}
|
||||
</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_workorder">
|
||||
没有工单要做!
|
||||
</p>
|
||||
<p>
|
||||
工作订单是作为制造订单的一部分执行的操作。
|
||||
工序在物料清单中定义或直接添加到制造订单中。
|
||||
</p>
|
||||
<p>
|
||||
使用工作台工作中心控制面板直接登记车间中的操作.
|
||||
平板电脑为您的工人提供工作表,并允许他们报废产品,跟踪时间,
|
||||
发起维护请求,执行质量测试等.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -20,6 +20,12 @@ class QuickEasyOrder(models.Model):
|
||||
_description = '简易下单'
|
||||
_order = 'id desc'
|
||||
|
||||
def _get_machining_precision(self):
|
||||
machinings = self.env['sf.machining.accuracy'].sudo().search([])
|
||||
|
||||
list = [(m.sync_id, m.name) for m in machinings]
|
||||
return list
|
||||
|
||||
name = fields.Char('订单编号', default=lambda self: self.env['ir.sequence'].next_by_code('quick.easy.order'))
|
||||
model_length = fields.Float('长(mm)', digits=(16, 3))
|
||||
model_width = fields.Float('宽(mm)', digits=(16, 3))
|
||||
@@ -27,12 +33,7 @@ class QuickEasyOrder(models.Model):
|
||||
model_volume = fields.Float('体积(mm³)', digits=(16, 3))
|
||||
model_processing_side = fields.Char('加工面', default='A')
|
||||
model_feature = fields.Char('特征')
|
||||
machining_precision = fields.Selection([
|
||||
('0.10', '±0.10mm'),
|
||||
('0.05', '±0.05mm'),
|
||||
('0.03', '±0.03mm'),
|
||||
('0.02', '±0.02mm'),
|
||||
('0.01', '±0.01mm')], string='加工精度', default='0.10')
|
||||
model_machining_precision = fields.Selection(selection=_get_machining_precision, string='加工精度')
|
||||
material_id = fields.Many2one('sf.production.materials', '材料', tracking=True)
|
||||
material_model_id = fields.Many2one('sf.materials.model', '型号', domain="[('materials_id', '=', material_id)]",
|
||||
tracking=True)
|
||||
|
||||
Reference in New Issue
Block a user