mrs为名的更改为sf
This commit is contained in:
@@ -5,7 +5,7 @@ from odoo.addons.resource.models.resource import Intervals
|
||||
|
||||
class ResWorkcenter(models.Model):
|
||||
_inherit = "mrp.workcenter"
|
||||
machine_tool_id = fields.Many2one('mrs.machine_tool', '机床')
|
||||
machine_tool_id = fields.Many2one('sf.machine_tool', '机床')
|
||||
|
||||
equipment_ids = fields.One2many(
|
||||
'maintenance.equipment', 'workcenter_id', string="Maintenance Equipment",
|
||||
@@ -13,7 +13,7 @@ class ResWorkcenter(models.Model):
|
||||
|
||||
def action_work_order(self):
|
||||
if not self.env.context.get('desktop_list_view', False):
|
||||
action = self.env["ir.actions.actions"]._for_xml_id("sf_route_workcenter.mrp_workorder_action_tablet")
|
||||
action = self.env["ir.actions.actions"]._for_xml_id("sf_manufacturing.mrp_workorder_action_tablet")
|
||||
return action
|
||||
else:
|
||||
return super(MrpWorkcenter, self).action_work_order()
|
||||
|
||||
@@ -199,9 +199,9 @@ class ResMrpWorkOrder(models.Model):
|
||||
def fetchCNC(self):
|
||||
res = [{'model_code': self.product_id.barcode, 'production_no': self.production_id.name,
|
||||
'machine_tool_code': self.workcenter_id.machine_tool_id.code,
|
||||
'material_code': self.env['mrs.production.materials'].search(
|
||||
'material_code': self.env['sf.production.materials'].search(
|
||||
[('id', '=', self.product_id.materials_id.id)]).materials_no,
|
||||
'material_type_code': self.env['mrs.materials.model'].search(
|
||||
'material_type_code': self.env['sf.materials.model'].search(
|
||||
[('id', '=', self.product_id.materials_type_id.id)]).materials_no,
|
||||
'embryo_long': self.product_id.bom_ids.bom_line_ids.product_id.long,
|
||||
'embryo_height': self.product_id.bom_ids.bom_line_ids.product_id.height,
|
||||
@@ -209,9 +209,9 @@ class ResMrpWorkOrder(models.Model):
|
||||
# 'factory_code': self.env.user.company_id.partner_id.
|
||||
}]
|
||||
configsettings = self.env['res.config.settings'].get_values()
|
||||
config_header = Common.get_headers(self, configsettings['token'], configsettings['mrs_secret_key'])
|
||||
config_header = Common.get_headers(self, configsettings['token'], configsettings['sf_secret_key'])
|
||||
url = '/api/intelligent_programming/create'
|
||||
config_url = configsettings['mrs_url'] + url
|
||||
config_url = configsettings['sf_url'] + url
|
||||
res_str = json.dumps(res)
|
||||
ret = requests.post(config_url, json={"result": res_str}, data=None, headers=config_header)
|
||||
ret = ret.json()
|
||||
|
||||
Reference in New Issue
Block a user