Merge pull request !4785 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2025-08-27 08:48:45 +00:00
committed by Gitee
9 changed files with 76 additions and 4 deletions
+2
View File
@@ -9,6 +9,8 @@
'depends': ['base', 'soong_workflow', 'hr', 'product', 'documents', 'purchase'],
'data': [
'security/ir.model.access.csv',
'views/inherit_product_product_views.xml',
'views/inherit_purchase_order_views.xml',
'views/purchase_workflow_views.xml',
],
'installable': True,
+1
View File
@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
from . import inherit_purchase_order
from . import purchase_workflow
from . import inherit_product_product
@@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
from odoo import api, fields, models
class InheritProductProduct(models.Model):
_inherit = 'product.product'
brand = fields.Char(string="品牌")
specs = fields.Char(string="规格")
+2 -2
View File
@@ -150,8 +150,8 @@ class PurchaseLowLine(models.Model):
_description = '低值易耗采购明细'
purchase_id = fields.Many2one('purchase.workflow', string="关联采购工作流")
product_id = fields.Many2one('product.product', string="物品名称")
brand = fields.Char(string="品牌")
specs = fields.Char(string="规格")
brand = fields.Char(related="product_id.brand", string="品牌")
specs = fields.Char(related="product_id.specs", string="规格")
name = fields.Text(string="描述")
product_packaging_id = fields.Many2one('product.packaging', string="包装")
taxes_id = fields.Many2one('account.tax', string='税项')
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="inherit_product_product_form_view" model="ir.ui.view">
<field name="name">product.product.form.inherit</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='uom_po_id']" position="after">
<field name="brand"/>
<field name="specs"/>
</xpath>
</field>
</record>
</odoo>
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="inherit_purchase_order_tree" model="ir.ui.view">
<field name="name">purchase.order.tree</field>
<field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase.purchase_order_view_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='partner_ref']" position="attributes">
<attribute name="column_invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='activity_ids']" position="attributes">
<attribute name="column_invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='amount_untaxed']" position="attributes">
<attribute name="column_invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='invoice_status']" position="attributes">
<attribute name="column_invisible">1</attribute>
</xpath>
</field>
</record>
</odoo>
+2 -1
View File
@@ -6,9 +6,10 @@
'category': 'zhou',
'version': '0.1',
'license': 'LGPL-3',
'depends': ['base', 'stock', 'documents'],
'depends': ['base', 'stock', 'documents', 'maintenance'],
'data': [
'security/ir.model.access.csv',
'views/menu.xml',
'views/inherit_stock_picking.xml',
],
'installable': True,
+16 -1
View File
@@ -20,8 +20,23 @@
<xpath expr="//field[@name='partner_id']" position="before">
<field name="origin"/>
</xpath>
<xpath expr="//field[@name='name']" position="attributes">
<attribute name="string">编号</attribute>
</xpath>
<xpath expr="//field[@name='location_dest_id']" position="attributes">
<attribute name="string">标题</attribute>
<attribute name="string">目的位置</attribute>
</xpath>
<xpath expr="//field[@name='scheduled_date']" position="attributes">
<attribute name="column_invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='products_availability']" position="attributes">
<attribute name="column_invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='date_deadline']" position="attributes">
<attribute name="column_invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='backorder_id']" position="attributes">
<attribute name="column_invisible">1</attribute>
</xpath>
</field>
</record>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<menuitem id="purchase_assets_equipment_root"
name="固定资产"
parent="stock.menu_stock_inventory_control"
action="maintenance.hr_equipment_action"
sequence="5"/>
</odoo>