purchase state
This commit is contained in:
parent
2fb4132639
commit
4ce60527d2
|
|
@ -2530,3 +2530,172 @@ msgstr ""
|
|||
"</div>"
|
||||
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: code:addons/purchase_requisition_custom/models/purchase_request.py:0
|
||||
#, python-format
|
||||
msgid "Draft "
|
||||
msgstr "مسودة"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: code:addons/purchase_requisition_custom/models/purchase_request.py:0
|
||||
#, python-format
|
||||
msgid " Draft "
|
||||
msgstr "طلب عرض سعر"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: code:addons/purchase_requisition_custom/models/purchase_request.py:0
|
||||
#, python-format
|
||||
msgid "Ongoing "
|
||||
msgstr "جاري"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: code:addons/purchase_requisition_custom/models/purchase_request.py:0
|
||||
#, python-format
|
||||
msgid "Confirmed "
|
||||
msgstr "مؤكد"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: code:addons/purchase_requisition_custom/models/purchase_request.py:0
|
||||
#, python-format
|
||||
msgid "Committee "
|
||||
msgstr "اللجنة"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: code:addons/purchase_requisition_custom/models/purchase_request.py:0
|
||||
#, python-format
|
||||
msgid "Purchase Manager "
|
||||
msgstr "مدير المشتريات"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: code:addons/purchase_requisition_custom/models/purchase_request.py:0
|
||||
#, python-format
|
||||
msgid "Second Approval "
|
||||
msgstr "الموافقة الثانية"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: code:addons/purchase_requisition_custom/models/purchase_request.py:0
|
||||
#, python-format
|
||||
msgid "Legal Counsel "
|
||||
msgstr "المستشار القانوني"
|
||||
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: code:addons/purchase_requisition_custom/models/purchase_request.py:0
|
||||
#, python-format
|
||||
msgid "Third Approval "
|
||||
msgstr "الموافقة الثالثة"
|
||||
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: code:addons/purchase_requisition_custom/models/purchase_request.py:0
|
||||
#, python-format
|
||||
msgid "Accepted "
|
||||
msgstr "تمت الموافقة"
|
||||
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: code:addons/purchase_requisition_custom/models/purchase_request.py:0
|
||||
#, python-format
|
||||
msgid "Bid Selection "
|
||||
msgstr "طريقة الإختيار"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: code:addons/purchase_requisition_custom/models/purchase_request.py:0
|
||||
#, python-format
|
||||
msgid "Waiting For Budget Confirmation "
|
||||
msgstr "في إنتظار تصديق الموازنة"
|
||||
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: code:addons/purchase_requisition_custom/models/purchase_request.py:0
|
||||
#, python-format
|
||||
msgid "Waiting Approval "
|
||||
msgstr "في إنتظار الموافقة"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: code:addons/purchase_requisition_custom/models/purchase_request.py:0
|
||||
#, python-format
|
||||
msgid "Approved "
|
||||
msgstr "معتمدة"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: code:addons/purchase_requisition_custom/models/purchase_request.py:0
|
||||
#, python-format
|
||||
msgid "Done "
|
||||
msgstr "مغلق"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: code:addons/purchase_requisition_custom/models/purchase_request.py:0
|
||||
#, python-format
|
||||
msgid "Cancelled "
|
||||
msgstr "ملغي"
|
||||
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: code:addons/purchase_requisition_custom/models/purchase_request.py:0
|
||||
#, python-format
|
||||
msgid "Waiting To Be Signed "
|
||||
msgstr "مسودة"
|
||||
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: code:addons/purchase_requisition_custom/models/purchase_request.py:0
|
||||
#, python-format
|
||||
msgid "UnSign "
|
||||
msgstr "الغاء التوقيع"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: code:addons/purchase_requisition_custom/models/purchase_request.py:0
|
||||
#, python-format
|
||||
msgid "Sign "
|
||||
msgstr "تنفيذ عرض السعر"
|
||||
|
||||
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: code:addons/purchase_requisition_custom/models/purchase_request.py:0
|
||||
#, python-format
|
||||
msgid "RFQ "
|
||||
msgstr "امر شراء مبدئي/عرض سعر"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: code:addons/purchase_requisition_custom/models/purchase_request.py:0
|
||||
#, python-format
|
||||
msgid "RFQ Sent "
|
||||
msgstr "تم إرسال طلب عرض السعر"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: code:addons/purchase_requisition_custom/models/purchase_request.py:0
|
||||
#, python-format
|
||||
msgid "To Approve "
|
||||
msgstr "لل إعتماد"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: code:addons/purchase_requisition_custom/models/purchase_request.py:0
|
||||
#, python-format
|
||||
msgid "Purchase Order "
|
||||
msgstr "أمر الشراء"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: code:addons/purchase_requisition_custom/models/purchase_request.py:0
|
||||
#, python-format
|
||||
msgid "Locked "
|
||||
msgstr "مقفل"
|
||||
|
||||
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: code:addons/purchase_requisition_custom/models/purchase_request.py:0
|
||||
#, python-format
|
||||
msgid "Rejected By Budget "
|
||||
msgstr "مرفوضة حسب الميزانية"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: code:addons/purchase_requisition_custom/models/purchase_request.py:0
|
||||
#, python-format
|
||||
msgid "Waiting For Send to Budget "
|
||||
msgstr "في إنتظار تاكيد المزانية"
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -84,6 +84,57 @@ class PurchaseRequest(models.Model):
|
|||
select = fields.Boolean(string="Select")
|
||||
reject_reason = fields.Text(string='Reject Reson')
|
||||
|
||||
purchase_state_summary = fields.Char(
|
||||
string="Purchase State",
|
||||
compute="_compute_purchase_state_summary",
|
||||
store=False
|
||||
)
|
||||
|
||||
@api.depends('requisition_id_ids.state', 'purchase_ids.state')
|
||||
def _compute_purchase_state_summary(self):
|
||||
for rec in self:
|
||||
labels = []
|
||||
if rec.requisition_id_ids:
|
||||
selection = self.env['purchase.requisition']._fields['state'].selection
|
||||
custom_translation = {
|
||||
'draft': _(' Draft '),
|
||||
'ongoing': _('Ongoing '),
|
||||
'in_progress': _('Confirmed '),
|
||||
'committee': _('Committee '),
|
||||
'purchase_manager': _('Purchase Manager '),
|
||||
'second_approve': _('Second Approval '),
|
||||
'legal_counsel': _('Legal Counsel '),
|
||||
'third_approve': _('Third Approval '),
|
||||
'accept': _('Accepted '),
|
||||
'open': _('Bid Selection '),
|
||||
'waiting': _('Waiting For Budget Confirmation '),
|
||||
'checked': _('Waiting Approval '),
|
||||
'approve': _('Approved '),
|
||||
'done': _('Done '),
|
||||
'cancel': _('Cancelled '),
|
||||
}
|
||||
label_map = {key: custom_translation.get(key, label) for key, label in selection}
|
||||
labels = [label_map.get(req.state, req.state) for req in rec.requisition_id_ids]
|
||||
elif rec.purchase_ids:
|
||||
selection = self.env['purchase.order']._fields['state'].selection
|
||||
custom_translation = {
|
||||
'wait': _('Waiting To Be Signed '),
|
||||
'unsign': _('UnSign '),
|
||||
'sign': _('Sign '),
|
||||
'waiting': _('Waiting For Budget Confirmation '),
|
||||
'draft': _('RFQ '),
|
||||
'sent': _('RFQ Sent '),
|
||||
'to approve': _('To Approve '),
|
||||
'purchase': _('Purchase Order '),
|
||||
'done': _('Locked '),
|
||||
'cancel': _('Cancelled '),
|
||||
'budget_rejected': _('Rejected By Budget '),
|
||||
'wait_for_send': _('Waiting For Send to Budget '),
|
||||
}
|
||||
label_map = {key: custom_translation.get(key, label) for key, label in selection}
|
||||
labels = [label_map.get(po.state, po.state) for po in rec.purchase_ids]
|
||||
rec.purchase_state_summary = ', '.join(set(labels)) if labels else ''
|
||||
|
||||
@api.depends('line_ids.product_id')
|
||||
def _compute_product_category_ids(self):
|
||||
for rec in self:
|
||||
|
|
|
|||
|
|
@ -137,6 +137,7 @@
|
|||
<field name="department_id"/>
|
||||
<field name="product_category_ids" widget="many2many_tags"/>
|
||||
<field name="state"/>
|
||||
<field name="purchase_state_summary" optional="show"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
|||
Loading…
Reference in New Issue