Accept Merge Request #526: (feature/制造代码优化 -> develop)

Merge Request: 产品模板修改>>>增加“规格”字段specification_id

Created By: @马广威
Accepted By: @马广威
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/526?initial=true
This commit is contained in:
马广威
2023-11-16 17:03:24 +08:00
committed by Coding
3 changed files with 53 additions and 2 deletions

View File

@@ -32,8 +32,8 @@
'jikimo_frontend/static/src/scss/rowno_in_tree.scss',
# 'jikimo_frontend/static/src/views/list_nums/list_render.xml',
'jikimo_frontend/static/src/list/list_up_down_button.xml',
'jikimo_frontend/static/src/list/custom_import.js',
'jikimo_frontend/static/src/list/custom_width.js',
# 'jikimo_frontend/static/src/list/custom_import.js',
# 'jikimo_frontend/static/src/list/custom_width.js',
'jikimo_frontend/static/src/views/list_nums/extent_purchase.xml',
],

View File

@@ -39,6 +39,7 @@
],
},
'external_dependencies': {'python': ['opcua(使用pip install opcua -i https://pypi.tuna.tsinghua.edu.cn/simple)']},
'installable': True,
'application': True,

View File

@@ -104,5 +104,55 @@
<!-- <filter string="草稿" name="filter_draft" domain="[('state', '=', 'draft')]"/> -->
<!-- </xpath> -->
<!-- 产品模板修改>>>增加“规格”字段specification_id -->
<record id="custom_product_template_kanban_view" model="ir.ui.view">
<field name="name">custom.Product.template.product.kanban</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_kanban_view"/>
<field name="arch" type="xml">
<xpath expr="//kanban" position="replace">
<kanban sample="1" class="o_kanban_product_template">
<field name="id"/>
<field name="product_variant_count"/>
<field name="currency_id"/>
<field name="activity_state"/>
<progressbar field="activity_state" colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_card oe_kanban_global_click">
<div class="o_kanban_image me-1">
<img t-att-src="kanban_image('product.template', 'image_128', record.id.raw_value)" alt="Product" class="o_image_64_contain"/>
</div>
<div class="oe_kanban_details">
<div class="o_kanban_record_top mb-0">
<div class="o_kanban_record_headings">
<strong class="o_kanban_record_title">
<field name="name"/>
</strong>
</div>
<field name="priority" widget="priority"/>
</div>
<t t-if="record.default_code.value">[<field name="default_code"/>]</t>
<div t-if="record.product_variant_count.value &gt; 1" groups="product.group_product_variant">
<strong>
<t t-esc="record.product_variant_count.value"/> Variants
</strong>
</div>
<div name="product_lst_price" class="mt-1">
Price: <field name="list_price" widget="monetary" options="{'currency_field': 'currency_id', 'field_digits': True}"></field>
</div>
<div name="product_specification_id" class="mt-1">
规格: <field name="specification_id"></field>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</xpath>
</field>
</record>
</data>
</odoo>