mrs为名的更改为sf

This commit is contained in:
jinling.yang
2022-11-22 10:20:18 +08:00
parent bf5f8fd326
commit 3cbd1140bb
8 changed files with 20 additions and 20 deletions

View File

@@ -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()