add fields uom_id

This commit is contained in:
Mazen Abdo 2024-11-25 11:47:30 +02:00
parent c77d68b408
commit d32e095c34
3 changed files with 5 additions and 2 deletions

View File

@ -4,6 +4,7 @@
<record id="module_category_purchase_management" model="ir.module.category">
<field name="name">Purchase Management</field>
</record>
<!-- Purchase COC groups -->
<record id="group_coc_user" model="res.groups">
<field name="name">COC User</field>
@ -19,6 +20,5 @@
<field name="name">COC Menu</field>
<field name="category_id" ref="odex25_purchase_coc.module_category_purchase_management"/>
</record>
</data>
</odoo>

View File

@ -305,7 +305,8 @@ class PurchaseRequestLine(models.Model):
product_id = fields.Many2one(comodel_name='product.product', string='Item')
description=fields.Char("Description")
qty = fields.Integer(string='Qty')
uom_id = fields.Many2one(related='product_id.uom_id')
uom_id = fields.Many2one('uom.uom',
related='product_id.uom_po_id',readonly=True)
def _product_id_change(self):

View File

@ -100,6 +100,8 @@
options="{'no_create' : True , 'no_edit' : True ,'no_open' : True}"
optional="show"
required="1"/>
<field name="uom_id"/>
<field name="description"/>
<field name="qty"