!11225 !11224 Merge branch 'dev' of <a href="https://gitee.com/jinan-pengyuse…

Merge pull request !11225 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2026-04-29 03:30:15 +00:00
committed by Gitee
2 changed files with 31 additions and 4 deletions
+4 -4
View File
@@ -249,10 +249,10 @@
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="message_ids"/>
</div>
<!-- <div class="oe_chatter">-->
<!-- <field name="message_follower_ids"/>-->
<!-- <field name="message_ids"/>-->
<!-- </div>-->
</form>
</field>
</record>
@@ -183,6 +183,15 @@
<xpath expr="//field[@name='order_line']//tree//field[@name='product_id']" position="after">
<field name="brand_spec" string="品牌/规格" optional="show"/>
</xpath>
<!-- 隐藏采购历史按钮原位置(已在 price_subtotal 后重新插入) -->
<xpath expr="//field[@name='order_line']//tree//button[@name='action_purchase_history']" position="replace"/>
<!-- 将 product_packaging_qty 和 product_packaging_id 移到 product_qty 前面 -->
<xpath expr="//field[@name='order_line']//tree//field[@name='product_packaging_qty']" position="replace"/>
<xpath expr="//field[@name='order_line']//tree//field[@name='product_packaging_id']" position="replace"/>
<xpath expr="//field[@name='order_line']//tree//field[@name='product_qty']" position="before">
<field name="product_packaging_qty" invisible="not product_id or not product_packaging_id" groups="product.group_stock_packaging" optional="show"/>
<field name="product_packaging_id" invisible="not product_id" context="{'default_product_id': product_id, 'tree_view_ref':'product.product_packaging_tree_view', 'form_view_ref':'product.product_packaging_form_view'}" groups="product.group_stock_packaging" optional="show"/>
</xpath>
<!-- <xpath expr="//field[@name='order_line']" position="attributes">-->
<!-- <attribute name="context">{'default_category_id': category_id}</attribute>-->
<!-- </xpath>-->
@@ -218,4 +227,22 @@
<field name="res_model">purchase.order</field>
<field name="context">{'default_order': 'display_end_time desc'}</field>
</record>
<!-- 重新排列明细行按钮:继承 purchase_stock 的视图,将按钮移到金额后面 -->
<record id="inherit_purchase_order_form_move_buttons" model="ir.ui.view">
<field name="name">purchase.order.form.move.buttons</field>
<field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase_stock.purchase_order_view_form_inherit"/>
<field name="arch" type="xml">
<!-- 移除预估报表按钮原位置 -->
<xpath expr="//field[@name='order_line']//tree//button[@name='action_product_forecast_report'][1]" position="replace"/>
<xpath expr="//field[@name='order_line']//tree//button[@name='action_product_forecast_report'][1]" position="replace"/>
<!-- 在 price_subtotal 后插入按钮 -->
<xpath expr="//field[@name='order_line']//tree//field[@name='price_subtotal']" position="after">
<button name="action_purchase_history" type="object" icon="fa-history" title="采购历史" invisible="not id"/>
<button type="object" name="action_product_forecast_report" title="预估报表" icon="fa-area-chart" invisible="not id or not forecasted_issue or product_type != 'product'" class="text-danger"/>
<button type="object" name="action_product_forecast_report" title="预估报表" icon="fa-area-chart" invisible="not id or forecasted_issue or product_type != 'product'"/>
</xpath>
</field>
</record>
</odoo>