diff --git a/odex25_purchase/purchase_requisition_custom/i18n/ar_001.po b/odex25_purchase/purchase_requisition_custom/i18n/ar_001.po
index 2bb6c5f72..19d64c26e 100644
--- a/odex25_purchase/purchase_requisition_custom/i18n/ar_001.po
+++ b/odex25_purchase/purchase_requisition_custom/i18n/ar_001.po
@@ -1956,6 +1956,7 @@ msgid "Request id"
msgstr ""
#. module: purchase_requisition_custom
+#: model:ir.model.fields,field_description:purchase_requisition_custom.field_purchase_order__branch_name
#: model:ir.model.fields,field_description:purchase_requisition_custom.field_purchase_request__branch_id
msgid "Branch"
msgstr "الفرع"
diff --git a/odex25_purchase/purchase_requisition_custom/models/purchase_order.py b/odex25_purchase/purchase_requisition_custom/models/purchase_order.py
index b45a8bd57..c08184c62 100644
--- a/odex25_purchase/purchase_requisition_custom/models/purchase_order.py
+++ b/odex25_purchase/purchase_requisition_custom/models/purchase_order.py
@@ -124,13 +124,14 @@ class PurchaseOrderCustom(models.Model):
('budget_rejected', 'Rejected By Budget'),
('wait_for_send', 'Waiting For Send to Budget')], default='wait')
department_id = fields.Many2one('hr.department', compute="_compute_department_id", store=True, readonly=False)
- branch_id = fields.Many2one(
+ branch_name = fields.Many2one(
'hr.department',
string='Branch',
- compute='_compute_branch_id',
+ compute='_compute_branch_name',
store=True,
readonly=True
)
+
purpose = fields.Char()
category_ids = fields.Many2many('product.category', string='Categories')
committe_members = fields.One2many('committe.member', inverse_name='po_id')
@@ -195,14 +196,14 @@ class PurchaseOrderCustom(models.Model):
rec.department_id = rec.request_id.department_id
@api.depends('request_id.branch_id', 'department_id.branch_name')
- def _compute_branch_id(self):
+ def _compute_branch_name(self):
for rec in self:
branch = False
if rec.request_id and rec.request_id.branch_id:
branch = rec.request_id.branch_id
elif rec.department_id and rec.department_id.branch_name:
branch = rec.department_id.branch_name
- rec.branch_id = branch
+ rec.branch_name = branch
def _recompute_all_department_id(self):
for rec in self.sudo().search([('request_id', '!=', False), ('department_id', '=', False)]):
diff --git a/odex25_purchase/purchase_requisition_custom/views/purchase_requisition_custom.xml b/odex25_purchase/purchase_requisition_custom/views/purchase_requisition_custom.xml
index 0142c5773..a81701fc1 100644
--- a/odex25_purchase/purchase_requisition_custom/views/purchase_requisition_custom.xml
+++ b/odex25_purchase/purchase_requisition_custom/views/purchase_requisition_custom.xml
@@ -98,7 +98,7 @@
-
+
@@ -308,7 +308,7 @@
-
+