Merge pull request #3433 from expsa/younes_dev_odex25_purchase

IMP module
This commit is contained in:
kchyounes19 2025-06-04 16:00:54 +01:00 committed by GitHub
commit 9dd81db44b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 19 additions and 4 deletions

View File

@ -21,6 +21,11 @@ msgstr ""
msgid " No budget for this service "
msgstr ""
#. module: purchase_requisition_custom
#: model:res.groups,name:purchase_requisition_custom.group_select_recommended_offer
msgid "Select Recommended Offer"
msgstr "اختيار العرض الموصى به"
#. module: purchase_requisition_custom
#: model:ir.actions.report,print_report_name:purchase_requisition_custom.action_report_committee_meeting_minutes
msgid "'Committee Meeting Minutes - %s' % (object.name)"

View File

@ -33,6 +33,11 @@ msgstr "إعتماد الإدارة الفنية"
msgid " No budget for this service "
msgstr "لا توجد ميزانية لهذا البند"
#. module: purchase_requisition_custom
#: model:res.groups,name:purchase_requisition_custom.group_select_recommended_offer
msgid "Select Recommended Offer"
msgstr "اختيار العرض الموصى به"
#. module: purchase_requisition_custom
#: model:ir.actions.report,print_report_name:purchase_requisition_custom.action_report_committee_meeting_minutes
msgid "'Committee Meeting Minutes - %s' % (object.name)"

View File

@ -101,7 +101,7 @@ class PurchaseOrderCustom(models.Model):
category_ids = fields.Many2many('product.category', string='Categories')
committe_members = fields.One2many('committe.member', inverse_name='po_id')
no_of_approve = fields.Integer("No. of Votes", compute="_compute_no_approve")
request_id = fields.Many2one('purchase.request', 'Request Ref.')
request_id = fields.Many2one('purchase.request', 'Request Ref.', copy=False)
employee_id = fields.Many2one('hr.employee', related="request_id.employee_id")
purchase_cost = fields.Selection(
[('department', 'Department'), ('default', 'Default Cost Center'), ('product_line', 'Product Line'),
@ -606,7 +606,7 @@ class PurchaseOrderCustom(models.Model):
for order in orders:
order.action_unsign()
for rec in self.order_line:
if rec.price_unit <= 0 and rec.choosen:
if not rec.display_type and rec.price_unit <= 0 and rec.choosen:
raise ValidationError(_("Unit Price can't be Zero Or less"))
if self.amount_total == 0:
raise ValidationError(_("Total Amount Can't be Zero"))

View File

@ -75,7 +75,7 @@ class PurchaseRequisitionCustom(models.Model):
min_approve = fields.Integer('No. of Selections')
min_vote = fields.Integer('No. of Vots')
actual_vote = fields.Integer('No. of Vots')
request_id = fields.Many2one('purchase.request', 'Request Ref.')
request_id = fields.Many2one('purchase.request', 'Request Ref.', copy=False)
purchase_cost = fields.Selection(
[('department', 'Department'), ('default', 'Default Cost Center'), ('product_line', 'Product Line'),
('project', 'Project')], string='Purchase Cost', default='department')

View File

@ -88,6 +88,11 @@
<field name="menu_access" eval="[(4,ref('purchase.menu_purchase_root'))]"/>
</record>
<record id="group_select_recommended_offer" model="res.groups">
<field name="name">Select Recommended Offer</field>
<field name="category_id" ref="purchase_requisition_custom.module_category_purchase_requisition_custom"/>
</record>
<record id="purchase_rfq_send_to_committee" model="res.groups">
<field name="name">Send to the Committee</field>
<field name="category_id" ref="purchase_requisition_custom.module_category_purchase_requisition_custom"/>

View File

@ -152,7 +152,7 @@
<button type="object" name="action_refuse" groups="purchase_requisition_custom.committe_member"
attrs="{'invisible':['|',('state','in',['done','purchase','waiting','cancel']),('already_voted','=',True)]}"
string="Refuse"/>
<button type="object" name="action_recommend"
<button type="object" name="action_recommend" groups="purchase_requisition_custom.group_select_recommended_offer"
confirm="Are you sure you want to process ?"
attrs="{'invisible':['|',
('recommendation_order','=', True),('purchase_commitee', '=', False)]}" string="Recommended"/>