刀具标准库列表视图添加创建时间与修改时间

This commit is contained in:
liaodanlong
2025-01-21 16:23:34 +08:00
parent a9b4c5d91b
commit b604209df4
2 changed files with 6 additions and 4 deletions

View File

@@ -112,6 +112,8 @@
<field name="cutting_tool_material_id"/>
<field name="cutting_tool_type_id"/>
<field name="brand_id"/>
<field name="create_date" optional="hide"/>
<field name="write_date" string="修改时间" optional="hide"/>
</tree>
</field>
</record>

View File

@@ -2335,9 +2335,9 @@ class Cutting_tool_standard_library(models.Model):
'maintenance.equipment.image'].search(
[('name', '=', item['fit_blade_shape'])]).id,
"chuck_id": False if not item['chuck_code'] else self.search(
[('code', '=', item['chuck_code'].replace("JKM", result['factory_short_name']))]).id,
[('code', '=', item['chuck_code'])]).id,
"handle_id": False if not item['handle_code'] else self.search(
[('code', '=', item['handle_code'].replace("JKM", result['factory_short_name']))]).id,
[('code', '=', item['handle_code'])]).id,
"suitable_machining_method_ids": [(6, 0, [])] if not item.get(
'suitable_machining_method') else self.env['maintenance.equipment.image']._get_ids(
item['suitable_machining_method']),
@@ -2377,9 +2377,9 @@ class Cutting_tool_standard_library(models.Model):
'maintenance.equipment.image'].search(
[('name', '=', item['fit_blade_shape'])]).id,
"chuck_id": False if not item['chuck_code'] else self.search(
[('code', '=', item['chuck_code'].replace("JKM", result['factory_short_name']))]).id,
[('code', '=', item['chuck_code'])]).id,
"handle_id": False if not item['handle_code'] else self.search(
[('code', '=', item['handle_code'].replace("JKM", result['factory_short_name']))]).id,
[('code', '=', item['handle_code'])]).id,
"suitable_machining_method_ids": [(6, 0, [])] if not item.get(
'suitable_machining_methods') else self.env['maintenance.equipment.image']._get_ids(
item['suitable_machining_methods']),