Merge pull request #5282 from expsa/khazraji_account

scope product
This commit is contained in:
mohammed-alkhazrji 2025-11-09 00:31:54 -08:00 committed by GitHub
commit 708a0508a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -371,7 +371,7 @@ class PurchaseRequestLine(models.Model):
account_id = fields.Many2one(related='request_id.department_id.analytic_account_id', copy=False)
request_id = fields.Many2one(comodel_name='purchase.request', string='Request Ref.')
product_id = fields.Many2one(comodel_name='product.product', string='Item')
product_id = fields.Many2one(comodel_name='product.product', string='Item', domain="[('purchase_ok', '=', True) | ('asset_ok', '=', True)]")
description = fields.Char("Description")
qty = fields.Integer(string='Qty')
uom_id = fields.Many2one('uom.uom',

View File

@ -95,7 +95,7 @@
<field name="line_ids" attrs="{'readonly':[('state' , '!=' , 'draft')]}">
<tree editable="bottom">
<field name="product_id"
domain="[('purchase_ok', '=', True)]"
domain="[('purchase_ok', '=', True) | ('asset_ok', '=', True)]"
options="{'no_create' : True , 'no_edit' : True ,'no_open' : True}"
optional="show"
required="1"/>