Accept Merge Request #332: (feature/修改机床参数bug -> develop)

Merge Request: 设备改成维保

Created By: @龚启豪
Accepted By: @龚启豪
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/332?initial=true
This commit is contained in:
龚启豪
2023-08-21 10:28:46 +08:00
committed by Coding
3 changed files with 8 additions and 3 deletions

View File

@@ -92,6 +92,7 @@
<tree string="机床型号" create="0" delete="1" edit="0">
<field name="code"/>
<field name="name" string="名称"/>
<field name="machine_tool_category"/>
<field name="brand_id"/>
<field name="remark"/>
<field name="machine_tool_picture" widget="image"/>

View File

@@ -25,6 +25,13 @@
<field name="state" widget="statusbar" options="{'clickable': '1'}"/>
</header>
</xpath>
<xpath expr="//page[@name='maintenance']" position="attributes">
<attribute name="string">维保</attribute>
</xpath>
<xpath expr="//field[@name='maintenance_count']" position="attributes">
<attribute name="string">维保</attribute>
</xpath>
<!-- <field string="Maintenance" name="maintenance_count" widget="statinfo"/>-->
<xpath expr="//div[@name='button_box']" position="inside">
<button name="%(action_maintenance_logs)d"

View File

@@ -528,7 +528,6 @@ class MachineBrand(models.Model):
brand.name = item['name'],
brand.code = item['code'],
brand.image_brand = '' if not item['image_brand'] else base64.b64encode(item.image_brand),
brand.manufacturer_model_number = item['manufacturer_model_number'],
brand.active = item['active'],
brand.remark = item['remark'],
else:
@@ -537,7 +536,6 @@ class MachineBrand(models.Model):
"name": item['name'],
"code": item['code'],
"image_brand": '' if not item['image_brand'] else base64.b64encode(item.image_brand),
"manufacturer_model_number": item['manufacturer_model_number'],
"active": item['active'],
"remark": item['remark'],
@@ -567,7 +565,6 @@ class MachineBrand(models.Model):
"name": item['name'],
"code": item['code'],
"remark": item['remark'],
"manufacturer_model_number": item['manufacturer_model_number'],
"image_brand": '' if not item['image_brand'] else base64.b64encode(item.image_brand),
"tag_ids": self.env['sf.machine.brand.tags'].search(
[("name", 'in', item['tag_ids'])]).ids