v2-annual
This commit is contained in:
parent
16728984a4
commit
95cf14c9a7
|
|
@ -119,7 +119,15 @@ msgstr "طلب عرض أسعار سنوي"
|
||||||
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_purchase_order__annual_request_id
|
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_purchase_order__annual_request_id
|
||||||
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_purchase_requisition__annual_request_id
|
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_purchase_requisition__annual_request_id
|
||||||
msgid "Annual Request"
|
msgid "Annual Request"
|
||||||
msgstr "الطلب السنوي"
|
msgstr "المستند المصدر"
|
||||||
|
|
||||||
|
#. module: odex25_annual_purchase
|
||||||
|
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_request__line_ids
|
||||||
|
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_odx_annual_request_form
|
||||||
|
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_po_form_products_for_annual_committee
|
||||||
|
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_po_form_products_for_tech_committee
|
||||||
|
msgid "Products"
|
||||||
|
msgstr "الأصناف/الخدمات"
|
||||||
|
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: model:ir.actions.act_window,name:odex25_annual_purchase.action_odx_annual_request
|
#: model:ir.actions.act_window,name:odex25_annual_purchase.action_odx_annual_request
|
||||||
|
|
@ -179,8 +187,8 @@ msgstr "المحادثات"
|
||||||
|
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_odx_annual_request_form
|
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_odx_annual_request_form
|
||||||
msgid "Committee"
|
msgid "Committee "
|
||||||
msgstr "اللجنة"
|
msgstr "أعضاء لجنة المشتريات"
|
||||||
|
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: model:res.groups,name:odex25_annual_purchase.group_technical_committee
|
#: model:res.groups,name:odex25_annual_purchase.group_technical_committee
|
||||||
|
|
@ -195,7 +203,7 @@ msgstr "رئيس اللجنة"
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: model:ir.model.fields.selection,name:odex25_annual_purchase.selection__odx_annual_request__state__committee
|
#: model:ir.model.fields.selection,name:odex25_annual_purchase.selection__odx_annual_request__state__committee
|
||||||
msgid "Committee Review"
|
msgid "Committee Review"
|
||||||
msgstr "مراجعة اللجنة"
|
msgstr "اللجان"
|
||||||
|
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_request__committee_status
|
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_request__committee_status
|
||||||
|
|
@ -261,11 +269,7 @@ msgstr "وحدة القياس الافتراضية المستخدمة في أو
|
||||||
msgid "Department"
|
msgid "Department"
|
||||||
msgstr "الإدارة"
|
msgstr "الإدارة"
|
||||||
|
|
||||||
#. module: odex25_annual_purchase
|
|
||||||
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_addendum_line__description
|
|
||||||
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_request_line__description
|
|
||||||
msgid "Description"
|
|
||||||
msgstr "الوصف"
|
|
||||||
|
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_addendum__display_name
|
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_addendum__display_name
|
||||||
|
|
@ -333,7 +337,6 @@ msgstr "رفض المدير العام"
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: model:ir.model.fields.selection,name:odex25_annual_purchase.selection__odx_annual_addendum__state__gm
|
#: model:ir.model.fields.selection,name:odex25_annual_purchase.selection__odx_annual_addendum__state__gm
|
||||||
#: model:ir.model.fields.selection,name:odex25_annual_purchase.selection__odx_annual_request__state__gm
|
#: model:ir.model.fields.selection,name:odex25_annual_purchase.selection__odx_annual_request__state__gm
|
||||||
#: model:res.groups,name:odex25_annual_purchase.group_gm
|
|
||||||
msgid "General Manager"
|
msgid "General Manager"
|
||||||
msgstr "المدير العام"
|
msgstr "المدير العام"
|
||||||
|
|
||||||
|
|
@ -387,7 +390,7 @@ msgstr "لجنة فنية"
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_request__product_category_ids
|
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_request__product_category_ids
|
||||||
msgid "Items Categories"
|
msgid "Items Categories"
|
||||||
msgstr "فئات الأصناف"
|
msgstr "تصنيف الأصناف"
|
||||||
|
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_addendum____last_update
|
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_addendum____last_update
|
||||||
|
|
@ -498,7 +501,7 @@ msgstr "عدد الاختيارات لا يمكن أن يكون صفراً"
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_request__min_vote
|
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_request__min_vote
|
||||||
msgid "No. of Votes"
|
msgid "No. of Votes"
|
||||||
msgstr "عدد الأصوات"
|
msgstr "عدد الاختيارات/ التصويت"
|
||||||
|
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: model:ir.model.fields.selection,name:odex25_annual_purchase.selection__odx_annual_request__committee_status__none
|
#: model:ir.model.fields.selection,name:odex25_annual_purchase.selection__odx_annual_request__committee_status__none
|
||||||
|
|
@ -576,12 +579,7 @@ msgstr "يرجى تحديد المورد المختار."
|
||||||
msgid "Product"
|
msgid "Product"
|
||||||
msgstr "المنتج"
|
msgstr "المنتج"
|
||||||
|
|
||||||
#. module: odex25_annual_purchase
|
|
||||||
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_request__line_ids
|
|
||||||
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_odx_annual_request_form
|
|
||||||
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_purchase_order_form_annual_rfq_odx
|
|
||||||
msgid "Products"
|
|
||||||
msgstr "المنتجات"
|
|
||||||
|
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: model:ir.model.fields.selection,name:odex25_annual_purchase.selection__odx_annual_request__state__purchase
|
#: model:ir.model.fields.selection,name:odex25_annual_purchase.selection__odx_annual_request__state__purchase
|
||||||
|
|
@ -606,10 +604,7 @@ msgstr "تم إنشاء وربط اتفاقية الشراء."
|
||||||
msgid "Purchase Committee"
|
msgid "Purchase Committee"
|
||||||
msgstr "لجنة المشتريات"
|
msgstr "لجنة المشتريات"
|
||||||
|
|
||||||
#. module: odex25_annual_purchase
|
|
||||||
#: model:ir.model,name:odex25_annual_purchase.model_purchase_order
|
|
||||||
msgid "Purchase Order"
|
|
||||||
msgstr "أمر الشراء"
|
|
||||||
|
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: model:ir.model,name:odex25_annual_purchase.model_purchase_requisition
|
#: model:ir.model,name:odex25_annual_purchase.model_purchase_requisition
|
||||||
|
|
@ -619,14 +614,13 @@ msgstr "طلب شراء"
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: model:ir.model.fields.selection,name:odex25_annual_purchase.selection__odx_annual_request__state__procurement
|
#: model:ir.model.fields.selection,name:odex25_annual_purchase.selection__odx_annual_request__state__procurement
|
||||||
msgid "Purchasing"
|
msgid "Purchasing"
|
||||||
msgstr "المشتريات"
|
msgstr "إدارة المشتريات"
|
||||||
|
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_addendum__purpose
|
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_addendum__purpose
|
||||||
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_request__purpose
|
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_request__purpose
|
||||||
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_purchase_order__purpose
|
|
||||||
msgid "Purpose"
|
msgid "Purpose"
|
||||||
msgstr "الغرض"
|
msgstr "مبررات طلب الشراء (الغرض)"
|
||||||
|
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_addendum_line__quantity
|
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_addendum_line__quantity
|
||||||
|
|
@ -642,8 +636,8 @@ msgstr "طلب عرض أسعار"
|
||||||
|
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_odx_annual_request_form
|
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_odx_annual_request_form
|
||||||
msgid "RFQs / POs"
|
msgid "RFQs"
|
||||||
msgstr "طلبات عروض الأسعار / أوامر الشراء"
|
msgstr "طلبات عروض الأسعار "
|
||||||
|
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: code:addons/odex25_annual_purchase/models/annual_request.py:0
|
#: code:addons/odex25_annual_purchase/models/annual_request.py:0
|
||||||
|
|
@ -662,10 +656,6 @@ msgstr "طلبات عروض الأسعار/أوامر الشراء"
|
||||||
msgid "Reason/Justification"
|
msgid "Reason/Justification"
|
||||||
msgstr "السبب/التبرير"
|
msgstr "السبب/التبرير"
|
||||||
|
|
||||||
#. module: odex25_annual_purchase
|
|
||||||
#: model:ir.model.fields.selection,name:odex25_annual_purchase.selection__odx_annual_request__committee_status__recommended
|
|
||||||
msgid "Recommended"
|
|
||||||
msgstr "موصى به"
|
|
||||||
|
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_request__committee_recommended_vendor_id
|
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_request__committee_recommended_vendor_id
|
||||||
|
|
@ -745,7 +735,7 @@ msgstr "بطلب من"
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_request__committee_enabled
|
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_request__committee_enabled
|
||||||
msgid "Require Committee Review"
|
msgid "Require Committee Review"
|
||||||
msgstr "يتطلب مراجعة اللجنة"
|
msgstr "يحتاج لجنة"
|
||||||
|
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_addendum__activity_user_id
|
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_addendum__activity_user_id
|
||||||
|
|
@ -760,9 +750,9 @@ msgid "SMS Delivery error"
|
||||||
msgstr "خطأ في تسليم الرسائل القصيرة"
|
msgstr "خطأ في تسليم الرسائل القصيرة"
|
||||||
|
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_odx_annual_addendum_form
|
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_request__ssd_approve
|
||||||
msgid "SSD Approve"
|
msgid "SSD Approve"
|
||||||
msgstr "موافقة مدير الخدمات المشتركة"
|
msgstr "موافقة مدير الخدمات المشتركة؟"
|
||||||
|
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_odx_annual_addendum_form
|
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_odx_annual_addendum_form
|
||||||
|
|
@ -799,7 +789,6 @@ msgstr "أُرسل إلى اللجنة؟"
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: model:ir.model.fields.selection,name:odex25_annual_purchase.selection__odx_annual_addendum__state__ssd
|
#: model:ir.model.fields.selection,name:odex25_annual_purchase.selection__odx_annual_addendum__state__ssd
|
||||||
#: model:ir.model.fields.selection,name:odex25_annual_purchase.selection__odx_annual_request__state__ssd
|
#: model:ir.model.fields.selection,name:odex25_annual_purchase.selection__odx_annual_request__state__ssd
|
||||||
#: model:res.groups,name:odex25_annual_purchase.group_ssd
|
|
||||||
msgid "Shared Services Director"
|
msgid "Shared Services Director"
|
||||||
msgstr "مدير الخدمات المشتركة"
|
msgstr "مدير الخدمات المشتركة"
|
||||||
|
|
||||||
|
|
@ -903,7 +892,7 @@ msgstr "المورد"
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: model:ir.model.fields.selection,name:odex25_annual_purchase.selection__odx_annual_request__state__to_manager
|
#: model:ir.model.fields.selection,name:odex25_annual_purchase.selection__odx_annual_request__state__to_manager
|
||||||
msgid "Waiting Manager"
|
msgid "Waiting Manager"
|
||||||
msgstr "بانتظار المدير"
|
msgstr " المدير المباشر"
|
||||||
|
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_addendum__website_message_ids
|
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_addendum__website_message_ids
|
||||||
|
|
@ -966,4 +955,95 @@ msgstr ""
|
||||||
#. module: odex25_annual_purchase
|
#. module: odex25_annual_purchase
|
||||||
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_purchase_order_form_annual_rfq_odx
|
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_purchase_order_form_annual_rfq_odx
|
||||||
msgid "ملاحظة"
|
msgid "ملاحظة"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#. module: odex25_annual_purchase
|
||||||
|
#: model:ir.model.fields.selection,name:odex25_annual_purchase.selection__odx_annual_request__state__ceo
|
||||||
|
msgid "CEO"
|
||||||
|
msgstr "المدير التنفيذي"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#. module: odex25_annual_purchase
|
||||||
|
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_request__date
|
||||||
|
msgid "Date"
|
||||||
|
msgstr "التاريخ"
|
||||||
|
|
||||||
|
#. module: odex25_annual_purchase
|
||||||
|
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_request__seo_approve
|
||||||
|
msgid "SEO Approve"
|
||||||
|
msgstr "موافقة المدير التنفيذي؟"
|
||||||
|
|
||||||
|
#. module: odex25_annual_purchase
|
||||||
|
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_po_form_products_for_annual_committee
|
||||||
|
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_po_form_products_for_tech_committee
|
||||||
|
msgid "Committee Members"
|
||||||
|
msgstr "أعضاء اللجنة"
|
||||||
|
|
||||||
|
#. module: odex25_annual_purchase
|
||||||
|
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_request__description
|
||||||
|
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_odx_annual_request_form
|
||||||
|
msgid "Description"
|
||||||
|
msgstr "الملاحظة"
|
||||||
|
|
||||||
|
|
||||||
|
#. module: odex25_annual_purchase
|
||||||
|
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_request__attach_no
|
||||||
|
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_odx_annual_request_form
|
||||||
|
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_po_form_products_for_annual_committee
|
||||||
|
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_po_form_products_for_tech_committee
|
||||||
|
msgid "Documents"
|
||||||
|
msgstr "المرفقات"
|
||||||
|
|
||||||
|
|
||||||
|
#. module: odex25_annual_purchase
|
||||||
|
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_po_form_products_for_annual_committee
|
||||||
|
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_po_form_products_for_tech_committee
|
||||||
|
msgid "Other Information"
|
||||||
|
msgstr "معلومات أخرى"
|
||||||
|
|
||||||
|
#. module: odex25_annual_purchase
|
||||||
|
#: model:ir.model,name:odex25_annual_purchase.model_purchase_order
|
||||||
|
msgid "Purchase Order"
|
||||||
|
msgstr "أمر الشراء"
|
||||||
|
|
||||||
|
|
||||||
|
#. module: odex25_annual_purchase
|
||||||
|
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_po_form_products_for_annual_committee
|
||||||
|
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_po_form_products_for_tech_committee
|
||||||
|
msgid "Select"
|
||||||
|
msgstr "إختيار"
|
||||||
|
|
||||||
|
#. module: odex25_annual_purchase
|
||||||
|
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_po_form_products_for_annual_committee
|
||||||
|
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_po_form_products_for_tech_committee
|
||||||
|
msgid "Refuse"
|
||||||
|
msgstr "رفض"
|
||||||
|
|
||||||
|
|
||||||
|
#. module: odex25_annual_purchase
|
||||||
|
#: model:ir.model.fields,field_description:odex25_annual_purchase.field_odx_annual_request_line__description
|
||||||
|
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_po_form_products_for_annual_committee
|
||||||
|
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_po_form_products_for_tech_committee
|
||||||
|
msgid "Technical Description"
|
||||||
|
msgstr "المواصفات الفنية"
|
||||||
|
|
||||||
|
#. module: odex25_annual_purchase
|
||||||
|
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_po_form_products_for_annual_committee
|
||||||
|
msgid "Are you sure you want to process ?"
|
||||||
|
msgstr "هل أنت متأكد أنك تريد المتابعة؟"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#. module: odex25_annual_purchase
|
||||||
|
#: model:ir.model.fields.selection,name:odex25_annual_purchase.selection__odx_annual_request__committee_status__recommended
|
||||||
|
#: model_terms:ir.ui.view,arch_db:odex25_annual_purchase.view_po_form_products_for_annual_committee
|
||||||
|
msgid "Recommended"
|
||||||
|
msgstr "موصى به"
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ STATES = [
|
||||||
('committee', 'Committee Review'),
|
('committee', 'Committee Review'),
|
||||||
('ssd', 'Shared Services Director'),
|
('ssd', 'Shared Services Director'),
|
||||||
('gm', 'General Manager'),
|
('gm', 'General Manager'),
|
||||||
|
('ceo', 'CEO'),
|
||||||
('purchase', 'Purchase '),
|
('purchase', 'Purchase '),
|
||||||
('approved', 'Approved'),
|
('approved', 'Approved'),
|
||||||
('rejected', 'Rejected'),
|
('rejected', 'Rejected'),
|
||||||
|
|
@ -52,6 +53,8 @@ class AnnualPurchaseRequest(models.Model):
|
||||||
store=True)
|
store=True)
|
||||||
|
|
||||||
committee_enabled = fields.Boolean(string="Require Committee Review", default=False, tracking=True)
|
committee_enabled = fields.Boolean(string="Require Committee Review", default=False, tracking=True)
|
||||||
|
ssd_approve = fields.Boolean(string="SSD Approve", default=False)
|
||||||
|
seo_approve = fields.Boolean(string="SEO Approve", default=False)
|
||||||
|
|
||||||
rfq_count = fields.Integer(string='RFQs/POs', compute='_compute_counts')
|
rfq_count = fields.Integer(string='RFQs/POs', compute='_compute_counts')
|
||||||
po_count = fields.Integer(string='PO Count', compute='_compute_counts')
|
po_count = fields.Integer(string='PO Count', compute='_compute_counts')
|
||||||
|
|
@ -66,7 +69,42 @@ class AnnualPurchaseRequest(models.Model):
|
||||||
min_vote = fields.Integer(string='No. of Votes', help='Minimum number of votes required')
|
min_vote = fields.Integer(string='No. of Votes', help='Minimum number of votes required')
|
||||||
actual_vote = fields.Integer(string='Actual Votes', default=0)
|
actual_vote = fields.Integer(string='Actual Votes', default=0)
|
||||||
sent_to_commitee = fields.Boolean(string='Sent to Committee?', default=False)
|
sent_to_commitee = fields.Boolean(string='Sent to Committee?', default=False)
|
||||||
|
description = fields.Char(string="Description", tracking=True)
|
||||||
|
|
||||||
|
|
||||||
|
attach_no = fields.Integer(
|
||||||
|
string="Documents",
|
||||||
|
compute="_compute_attach_no",
|
||||||
|
store=False,
|
||||||
|
readonly=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
def _compute_attach_no(self):
|
||||||
|
Attachment = self.env['ir.attachment']
|
||||||
|
for rec in self:
|
||||||
|
rec.attach_no = Attachment.search_count([
|
||||||
|
('res_model', '=', rec._name),
|
||||||
|
('res_id', '=', rec.id)
|
||||||
|
])
|
||||||
|
|
||||||
|
def get_attachments(self):
|
||||||
|
self.ensure_one()
|
||||||
|
return {
|
||||||
|
'name': "Documents",
|
||||||
|
'type': 'ir.actions.act_window',
|
||||||
|
'res_model': 'ir.attachment',
|
||||||
|
'view_mode': 'kanban,tree,form',
|
||||||
|
'domain': [
|
||||||
|
('res_model', '=', self._name),
|
||||||
|
('res_id', 'in', self.ids)
|
||||||
|
],
|
||||||
|
'context': {
|
||||||
|
'default_res_model': self._name,
|
||||||
|
'default_res_id': self.id,
|
||||||
|
|
||||||
|
},
|
||||||
|
'target': 'current',
|
||||||
|
}
|
||||||
def copy(self, default=None):
|
def copy(self, default=None):
|
||||||
default = dict(default or {})
|
default = dict(default or {})
|
||||||
|
|
||||||
|
|
@ -138,7 +176,7 @@ class AnnualPurchaseRequest(models.Model):
|
||||||
@api.depends('state', 'vendor_id', 'line_ids')
|
@api.depends('state', 'vendor_id', 'line_ids')
|
||||||
def _compute_can_create_agreement(self):
|
def _compute_can_create_agreement(self):
|
||||||
for rec in self:
|
for rec in self:
|
||||||
rec.can_create_agreement = rec.state in ('gm','approved') and not rec.agreement_id and bool(rec.vendor_id)
|
rec.can_create_agreement = rec.state in ('ceo','approved') and not rec.agreement_id and bool(rec.vendor_id)
|
||||||
|
|
||||||
@api.depends('agreement_id')
|
@api.depends('agreement_id')
|
||||||
def _compute_counts(self):
|
def _compute_counts(self):
|
||||||
|
|
@ -179,9 +217,6 @@ class AnnualPurchaseRequest(models.Model):
|
||||||
def action_create_rfq(self):
|
def action_create_rfq(self):
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
self._check_lines()
|
self._check_lines()
|
||||||
if not self.vendor_id:
|
|
||||||
raise UserError(_("You must set a Vendor for this RFQ."))
|
|
||||||
|
|
||||||
order_line_vals = []
|
order_line_vals = []
|
||||||
for line in self.line_ids:
|
for line in self.line_ids:
|
||||||
order_line_vals.append((0, 0, {
|
order_line_vals.append((0, 0, {
|
||||||
|
|
@ -195,29 +230,37 @@ class AnnualPurchaseRequest(models.Model):
|
||||||
'taxes_id': [(6, 0, line.product_id.supplier_taxes_id.ids)],
|
'taxes_id': [(6, 0, line.product_id.supplier_taxes_id.ids)],
|
||||||
}))
|
}))
|
||||||
|
|
||||||
PO = self.env['purchase.order'].sudo().create({
|
# PO = self.env['purchase.order'].sudo().create({
|
||||||
'origin': self.name,
|
# 'origin': self.name,
|
||||||
'annual_request_id': self.id,
|
# 'annual_request_id': self.id,
|
||||||
'partner_id': self.vendor_id.id,
|
# 'department_id': self.department_id.id if hasattr(self.department_id, 'id') else False,
|
||||||
'department_id': self.department_id.id if hasattr(self.department_id, 'id') else False,
|
# 'purpose': self.purpose,
|
||||||
'purpose': self.purpose,
|
# 'is_recommended': False,
|
||||||
'is_recommended': False,
|
# 'allow_empty_vendor': True,
|
||||||
'order_line': order_line_vals,
|
# 'order_line': order_line_vals,
|
||||||
'purchase_commitee': self.committee_enabled, # نقل حالة اللجنة
|
# 'purchase_commitee': self.committee_enabled,
|
||||||
})
|
# })
|
||||||
|
#
|
||||||
# نسخ أعضاء اللجنة
|
# if self.committee_enabled:
|
||||||
if self.committee_enabled:
|
# PO._copy_committee_from_annual_request()
|
||||||
PO._copy_committee_from_annual_request()
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'name': _("Annual RFQ"),
|
'name': _("Annual RFQ"),
|
||||||
'type': 'ir.actions.act_window',
|
'type': 'ir.actions.act_window',
|
||||||
'res_model': 'purchase.order',
|
'res_model': 'purchase.order',
|
||||||
'view_mode': 'form',
|
'view_mode': 'form',
|
||||||
'res_id': PO.id,
|
|
||||||
'target': 'current',
|
'target': 'current',
|
||||||
'context': {'default_annual_request_id': self.id, 'default_origin': self.name},
|
'context': {
|
||||||
|
'default_origin': self.name,
|
||||||
|
'default_annual_request_id': self.id,
|
||||||
|
'default_department_id': self.department_id.id if self.department_id else False,
|
||||||
|
'default_purpose': self.purpose,
|
||||||
|
'default_is_recommended': False,
|
||||||
|
|
||||||
|
'default_partner_id': False,
|
||||||
|
|
||||||
|
'default_order_line': order_line_vals,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
def action_open_agreement(self):
|
def action_open_agreement(self):
|
||||||
|
|
@ -243,10 +286,17 @@ class AnnualPurchaseRequest(models.Model):
|
||||||
self._check_lines()
|
self._check_lines()
|
||||||
for rec in self:
|
for rec in self:
|
||||||
rec.write({'state': 'to_manager'})
|
rec.write({'state': 'to_manager'})
|
||||||
rec.activity_schedule('mail.mail_activity_data_todo', user_id=rec.department_id.manager_id.user_id.id if rec.department_id and rec.department_id.manager_id else False, summary=_("Approve Annual Request"))
|
|
||||||
|
|
||||||
def action_manager_approve(self):
|
def action_manager_approve(self):
|
||||||
self.write({'state': 'procurement'})
|
for rec in self:
|
||||||
|
manager = rec.sudo().employee_id.parent_id
|
||||||
|
if manager:
|
||||||
|
if manager.user_id.id == rec.env.uid :
|
||||||
|
rec.write({'state': 'procurement'})
|
||||||
|
else:
|
||||||
|
raise Warning(_("Sorry, The Approval For The Direct Manager '%s' Only !")%(rec.employee_id.parent_id.name))
|
||||||
|
else:
|
||||||
|
rec.write({'state': 'procurement'})
|
||||||
|
|
||||||
def action_manager_reject(self, reason=False):
|
def action_manager_reject(self, reason=False):
|
||||||
self.message_post(body=_("Rejected by Manager: %s") % (reason or ''))
|
self.message_post(body=_("Rejected by Manager: %s") % (reason or ''))
|
||||||
|
|
@ -270,16 +320,19 @@ class AnnualPurchaseRequest(models.Model):
|
||||||
self.write({'committee_status':'approved'})
|
self.write({'committee_status':'approved'})
|
||||||
|
|
||||||
def action_ssd_approve(self):
|
def action_ssd_approve(self):
|
||||||
self.write({'state':'gm'})
|
if self.seo_approve:
|
||||||
|
self.write({'state':'ceo'})
|
||||||
|
else:
|
||||||
|
self.write({'state': 'purchase'})
|
||||||
|
|
||||||
def action_ssd_reject(self, reason=False):
|
def action_ssd_reject(self, reason=False):
|
||||||
self.message_post(body=_("Rejected by SSD: %s") % (reason or ''))
|
self.message_post(body=_("Rejected by SSD: %s") % (reason or ''))
|
||||||
self.write({'state':'rejected'})
|
self.write({'state':'rejected'})
|
||||||
|
|
||||||
def action_gm_approve(self):
|
def action_ceo_approve(self):
|
||||||
self.write({'state':'purchase'})
|
self.write({'state':'purchase'})
|
||||||
|
|
||||||
def action_gm_reject(self, reason=False):
|
def action_ceo_reject(self, reason=False):
|
||||||
self.message_post(body=_("Rejected by GM: %s") % (reason or ''))
|
self.message_post(body=_("Rejected by GM: %s") % (reason or ''))
|
||||||
self.write({'state':'rejected'})
|
self.write({'state':'rejected'})
|
||||||
|
|
||||||
|
|
@ -329,7 +382,7 @@ class AnnualPurchaseRequestLine(models.Model):
|
||||||
|
|
||||||
request_id = fields.Many2one('odx.annual.request', string="Request", required=True, ondelete='cascade')
|
request_id = fields.Many2one('odx.annual.request', string="Request", required=True, ondelete='cascade')
|
||||||
product_id = fields.Many2one('product.product', string="Product", required=True, domain=[('purchase_ok','=',True)])
|
product_id = fields.Many2one('product.product', string="Product", required=True, domain=[('purchase_ok','=',True)])
|
||||||
description = fields.Char(string="Description")
|
description = fields.Char(string="Technical Description")
|
||||||
quantity = fields.Float(string="Quantity", default=1.0)
|
quantity = fields.Float(string="Quantity", default=1.0)
|
||||||
uom_id = fields.Many2one('uom.uom', string="UoM", related='product_id.uom_po_id', readonly=False)
|
uom_id = fields.Many2one('uom.uom', string="UoM", related='product_id.uom_po_id', readonly=False)
|
||||||
price_unit = fields.Monetary(string="Unit Price", currency_field='currency_id', groups="purchase_requisition_custom.committe_member")
|
price_unit = fields.Monetary(string="Unit Price", currency_field='currency_id', groups="purchase_requisition_custom.committe_member")
|
||||||
|
|
|
||||||
|
|
@ -22,22 +22,38 @@ class PurchaseOrder(models.Model):
|
||||||
is_technical_committee = fields.Boolean(
|
is_technical_committee = fields.Boolean(
|
||||||
compute='_compute_is_technical_committee',
|
compute='_compute_is_technical_committee',
|
||||||
string='Is Technical Committee',
|
string='Is Technical Committee',
|
||||||
|
store=False
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@api.depends(
|
||||||
|
'requisition_id', 'requisition_id.state', 'requisition_id.purchase_commitee',
|
||||||
|
'annual_request_id', 'annual_request_id.state', 'annual_request_id.committee_enabled'
|
||||||
|
)
|
||||||
|
def _compute_parent_state(self):
|
||||||
|
"""
|
||||||
|
|
||||||
|
"""
|
||||||
|
for rec in self:
|
||||||
|
state = False
|
||||||
|
comm = False
|
||||||
|
|
||||||
|
if rec.requisition_id:
|
||||||
|
state = rec.requisition_id.state or False
|
||||||
|
comm = bool(getattr(rec.requisition_id, 'purchase_commitee', False))
|
||||||
|
elif rec.annual_request_id:
|
||||||
|
state = rec.annual_request_id.state or False
|
||||||
|
comm = bool(getattr(rec.annual_request_id, 'committee_enabled', False))
|
||||||
|
|
||||||
|
rec.parent_state = state
|
||||||
|
rec.purchase_commitee = comm
|
||||||
|
|
||||||
def _compute_is_technical_committee(self):
|
def _compute_is_technical_committee(self):
|
||||||
for record in self:
|
for record in self:
|
||||||
record.is_technical_committee = self.env.user.has_group(
|
record.is_technical_committee = self.env.user.has_group(
|
||||||
'odex25_annual_purchase.group_technical_committee'
|
'odex25_annual_purchase.group_technical_committee'
|
||||||
)
|
)
|
||||||
|
|
||||||
@api.depends('annual_request_id', 'annual_request_id.committee_enabled',
|
|
||||||
'annual_request_id.committe_members')
|
|
||||||
def _compute_annual_committee_fields(self):
|
|
||||||
for po in self:
|
|
||||||
if po.annual_request_id:
|
|
||||||
po.annual_purchase_commitee = po.annual_request_id.committee_enabled
|
|
||||||
else:
|
|
||||||
po.annual_purchase_commitee = False
|
|
||||||
|
|
||||||
def _compute_annual_can_committee_vote(self):
|
def _compute_annual_can_committee_vote(self):
|
||||||
user = self.env.user
|
user = self.env.user
|
||||||
|
|
@ -52,7 +68,6 @@ class PurchaseOrder(models.Model):
|
||||||
@api.model
|
@api.model
|
||||||
def create(self, vals):
|
def create(self, vals):
|
||||||
res = super(PurchaseOrder, self).create(vals)
|
res = super(PurchaseOrder, self).create(vals)
|
||||||
# نسخ أعضاء اللجنة من الاحتياج السنوي
|
|
||||||
if res.annual_request_id and res.annual_request_id.committee_enabled:
|
if res.annual_request_id and res.annual_request_id.committee_enabled:
|
||||||
res._copy_committee_from_annual_request()
|
res._copy_committee_from_annual_request()
|
||||||
return res
|
return res
|
||||||
|
|
@ -76,6 +91,28 @@ class PurchaseOrder(models.Model):
|
||||||
'refused': False,
|
'refused': False,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@api.constrains('recommendation_order')
|
||||||
|
def check_recommendation_order(self):
|
||||||
|
for rec in self:
|
||||||
|
if not rec.recommendation_order:
|
||||||
|
continue
|
||||||
|
|
||||||
|
domain = [
|
||||||
|
('id', '!=', rec.id),
|
||||||
|
('state', '!=', 'cancel'),
|
||||||
|
('recommendation_order', '=', True),
|
||||||
|
]
|
||||||
|
|
||||||
|
if rec.requisition_id:
|
||||||
|
domain.append(('requisition_id', '=', rec.requisition_id.id))
|
||||||
|
elif rec.annual_request_id:
|
||||||
|
domain.append(('annual_request_id', '=', rec.annual_request_id.id))
|
||||||
|
else:
|
||||||
|
continue
|
||||||
|
if self.env['purchase.order'].search_count(domain):
|
||||||
|
raise ValidationError(_("Only one recommended order is allowed per parent document."))
|
||||||
|
|
||||||
@api.depends('state', 'requisition_state', 'requisition_type_exclusive', 'requisition_id', 'is_purchase_budget', 'annual_request_id')
|
@api.depends('state', 'requisition_state', 'requisition_type_exclusive', 'requisition_id', 'is_purchase_budget', 'annual_request_id')
|
||||||
def _compute_hide_action_budget_button(self):
|
def _compute_hide_action_budget_button(self):
|
||||||
for record in self:
|
for record in self:
|
||||||
|
|
@ -101,7 +138,6 @@ class PurchaseOrder(models.Model):
|
||||||
|
|
||||||
|
|
||||||
def action_select(self):
|
def action_select(self):
|
||||||
# التحقق من المصدر (اتفاقية أو احتياج سنوي)
|
|
||||||
if self.annual_request_id and self.annual_request_id.committee_enabled:
|
if self.annual_request_id and self.annual_request_id.committee_enabled:
|
||||||
self.annual_request_id.actual_vote += 1
|
self.annual_request_id.actual_vote += 1
|
||||||
elif self.requisition_id:
|
elif self.requisition_id:
|
||||||
|
|
@ -118,7 +154,6 @@ class PurchaseOrder(models.Model):
|
||||||
|
|
||||||
|
|
||||||
def action_refuse(self):
|
def action_refuse(self):
|
||||||
# التحقق من المصدر (اتفاقية أو احتياج سنوي)
|
|
||||||
if self.annual_request_id and self.annual_request_id.committee_enabled:
|
if self.annual_request_id and self.annual_request_id.committee_enabled:
|
||||||
self.annual_request_id.actual_vote += 1
|
self.annual_request_id.actual_vote += 1
|
||||||
elif self.requisition_id:
|
elif self.requisition_id:
|
||||||
|
|
@ -151,7 +186,14 @@ class PurchaseOrder(models.Model):
|
||||||
])
|
])
|
||||||
for order in other_orders:
|
for order in other_orders:
|
||||||
order.action_unsign()
|
order.action_unsign()
|
||||||
self.annual_request_id.state = 'ssd'
|
self.annual_request_id.vendor_id = self.partner_id.id
|
||||||
|
if self.annual_request_id.ssd_approve:
|
||||||
|
self.annual_request_id.state = 'ssd'
|
||||||
|
elif self.annual_request_id.seo_approve:
|
||||||
|
self.annual_request_id.state = 'seo'
|
||||||
|
else:
|
||||||
|
self.annual_request_id.state = 'purchase'
|
||||||
|
|
||||||
super(PurchaseOrder, self).action_sign()
|
super(PurchaseOrder, self).action_sign()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||||
access_request_staff,access_request_staff,model_odx_annual_request,purchase.group_purchase_user,1,1,1,0
|
access_request_staff,access_request_staff,model_odx_annual_request,purchase.group_purchase_user,1,1,1,0
|
||||||
access_request_manager,access_request_manager,model_odx_annual_request,purchase.group_purchase_manager,1,1,1,1
|
access_request_manager,access_request_manager,model_odx_annual_request,purchase.group_purchase_manager,1,1,1,1
|
||||||
access_request_committee,access_request_committee,model_odx_annual_request,purchase_requisition_custom.committe_member,1,0,0,0
|
access_request_committee,access_request_committee,model_odx_annual_request,purchase_requisition_custom.committe_member,1,0,0,0
|
||||||
access_request_ssd,access_request_ssd,model_odx_annual_request,odex25_annual_purchase.group_ssd,1,1,0,0
|
access_request_ssd,access_request_ssd,model_odx_annual_request,hr_base.group_services_manager,1,1,0,0
|
||||||
access_request_gm,access_request_gm,model_odx_annual_request,odex25_annual_purchase.group_gm,1,1,0,0
|
access_request_gm,access_request_gm,model_odx_annual_request,hr_base.group_general_manager,1,1,0,0
|
||||||
access_request_line_staff,access_request_line_staff,model_odx_annual_request_line,purchase.group_purchase_user,1,1,1,0
|
access_request_line_staff,access_request_line_staff,model_odx_annual_request_line,purchase.group_purchase_user,1,1,1,0
|
||||||
access_addendum_staff,access_addendum_staff,model_odx_annual_addendum,purchase.group_purchase_user,1,1,1,0
|
access_addendum_staff,access_addendum_staff,model_odx_annual_addendum,purchase.group_purchase_user,1,1,1,0
|
||||||
access_addendum_line_staff,access_addendum_line_staff,model_odx_annual_addendum_line,purchase.group_purchase_user,1,1,1,0
|
access_addendum_line_staff,access_addendum_line_staff,model_odx_annual_addendum_line,purchase.group_purchase_user,1,1,1,0
|
||||||
|
|
|
||||||
|
|
|
@ -7,18 +7,12 @@
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
<record id="group_ssd" model="res.groups">
|
|
||||||
<field name="name">Shared Services Director</field>
|
|
||||||
<field name="category_id" ref="module_category_purchase_management"/>
|
|
||||||
</record>
|
|
||||||
<record id="group_gm" model="res.groups">
|
|
||||||
<field name="name">General Manager</field>
|
|
||||||
<field name="category_id" ref="module_category_purchase_management"/>
|
|
||||||
</record>
|
|
||||||
committe_member
|
|
||||||
|
|
||||||
<record id="group_technical_committee" model="res.groups">
|
<record id="group_technical_committee" model="res.groups">
|
||||||
<field name="name">Committee / Technical</field>
|
<field name="name">Committee / Technical</field>
|
||||||
<field name="category_id" ref="module_category_purchase_management"/>
|
<field name="category_id" ref="module_category_purchase_management"/>
|
||||||
</record>
|
</record>
|
||||||
|
<record id="group_annual_committee" model="res.groups">
|
||||||
|
<field name="name">Committee</field>
|
||||||
|
<field name="category_id" ref="module_category_purchase_management"/>
|
||||||
|
</record>
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,10 @@
|
||||||
<form>
|
<form>
|
||||||
<header>
|
<header>
|
||||||
<button name="action_send" string="Send" type="object" states="draft" groups="purchase.group_purchase_user"/>
|
<button name="action_send" string="Send" type="object" states="draft" groups="purchase.group_purchase_user"/>
|
||||||
<button name="action_ssd_approve" string="SSD Approve" type="object" states="ssd" groups="odex25_annual_purchase.group_ssd"/>
|
<button name="action_ssd_approve" string="SSD Approve" type="object" states="ssd" groups="hr_base.group_services_manager"/>
|
||||||
<button name="action_ssd_reject" string="SSD Reject" type="object" states="ssd" groups="odex25_annual_purchase.group_ssd"/>
|
<button name="action_ssd_reject" string="SSD Reject" type="object" states="ssd" groups="hr_base.group_services_manager"/>
|
||||||
<button name="action_gm_approve" string="GM Approve (Add to Agreement)" type="object" states="gm" groups="odex25_annual_purchase.group_gm"/>
|
<button name="action_gm_approve" string="GM Approve (Add to Agreement)" type="object" states="gm" groups="hr_base.group_general_manager"/>
|
||||||
<button name="action_gm_reject" string="GM Reject" type="object" states="gm" groups="odex25_annual_purchase.group_gm"/>
|
<button name="action_gm_reject" string="GM Reject" type="object" states="gm" groups="hr_base.group_general_manager"/>
|
||||||
<button name="action_cancel" string="Cancel" type="object" states="draft,ssd,gm"/>
|
<button name="action_cancel" string="Cancel" type="object" states="draft,ssd,gm"/>
|
||||||
<field name="state" widget="statusbar" statusbar_visible="draft,ssd,gm,approved,rejected,cancel"/>
|
<field name="state" widget="statusbar" statusbar_visible="draft,ssd,gm,approved,rejected,cancel"/>
|
||||||
</header>
|
</header>
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<field name="purpose"/>
|
<field name="purpose"/>
|
||||||
<field name="date_start"/>
|
<field name="date_start"/>
|
||||||
<field name="date_end"/>
|
<field name="date_end"/>
|
||||||
<field name="vendor_id"/>
|
<field name="vendor_id" invisible="1"/>
|
||||||
<field name="state"/>
|
<field name="state"/>
|
||||||
<field name="agreement_id"/>
|
<field name="agreement_id"/>
|
||||||
</tree>
|
</tree>
|
||||||
|
|
@ -28,58 +28,75 @@
|
||||||
<button name="action_manager_reject" string="Reject" type="object" states="to_manager" groups="purchase.group_purchase_manager"/>
|
<button name="action_manager_reject" string="Reject" type="object" states="to_manager" groups="purchase.group_purchase_manager"/>
|
||||||
<button name="action_send_to_committee" string="Send to Committee" type="object" class="oe_highlight" groups="purchase.group_purchase_user" attrs="{'invisible': ['|', ('committee_enabled','=',False), ('state','not in',['procurement','rejected_by_committee'])]}"/>
|
<button name="action_send_to_committee" string="Send to Committee" type="object" class="oe_highlight" groups="purchase.group_purchase_user" attrs="{'invisible': ['|', ('committee_enabled','=',False), ('state','not in',['procurement','rejected_by_committee'])]}"/>
|
||||||
<button name="action_create_rfq" string="Create RFQ" type="object" class="oe_highlight" states="procurement,rejected_by_committee" groups="purchase.group_purchase_user"/>
|
<button name="action_create_rfq" string="Create RFQ" type="object" class="oe_highlight" states="procurement,rejected_by_committee" groups="purchase.group_purchase_user"/>
|
||||||
<button name="action_cancel" string="Cancel" type="object" states="procurement,rejected_by_committee" groups="purchase.group_purchase_user"/>
|
<button name="action_cancel" string="Cancel" type="object" states="procurement,rejected_by_committee,committee" groups="purchase.group_purchase_user"/>
|
||||||
<button name="action_ssd_approve" string="Approve" class="oe_highlight" type="object" states="ssd" groups="odex25_annual_purchase.group_ssd"/>
|
<button name="action_ssd_approve" string="Approve" class="oe_highlight" type="object" states="ssd" groups="hr_base.group_services_manager"/>
|
||||||
<button name="action_ssd_reject" string="Reject" type="object" states="ssd" groups="odex25_annual_purchase.group_ssd"/>
|
<button name="action_ssd_reject" string="Reject" type="object" states="ssd" groups="hr_base.group_services_manager"/>
|
||||||
<button name="action_gm_approve" string="Approve" class="oe_highlight" type="object" states="gm" groups="odex25_annual_purchase.group_gm"/>
|
<button name="action_ceo_approve" string="Approve" class="oe_highlight" type="object" states="ceo" groups="hr_base.group_general_manager"/>
|
||||||
<button name="action_gm_reject" string="Reject" type="object" states="gm" groups="odex25_annual_purchase.group_gm"/>
|
<button name="action_ceo_reject" string="Reject" type="object" states="ceo" groups="hr_base.group_general_manager"/>
|
||||||
<button name="action_create_agreement" string="Create Agreement" type="object" states="purchase" class="oe_highlight"/>
|
<button name="action_create_agreement" string="Create Agreement" type="object" states="purchase" class="oe_highlight"/>
|
||||||
<field name="state" widget="statusbar" statusbar_visible="draft,to_manager,procurement,committee,ssd,gm,approved,rejected,cancel"/>
|
<field name="state" widget="statusbar" statusbar_visible="draft,to_manager,procurement,committee,ssd,ceo,approved,rejected,cancel"/>
|
||||||
</header>
|
</header>
|
||||||
<sheet>
|
<sheet>
|
||||||
<div class="oe_button_box" name="button_box">
|
<div class="oe_button_box" name="button_box">
|
||||||
<button class="oe_stat_button" type="object" name="action_open_rfqs" icon="fa-envelope">
|
<button class="oe_stat_button" type="object" name="action_open_rfqs" icon="fa-list-alt">
|
||||||
<field name="rfq_count" widget="statinfo" string="RFQs / POs"/>
|
<field name="rfq_count" widget="statinfo" string="RFQs"/>
|
||||||
</button>
|
</button>
|
||||||
<button class="oe_stat_button" type="object"
|
<button class="oe_stat_button" type="object"
|
||||||
name="action_open_agreement"
|
name="action_open_agreement"
|
||||||
string="Agreement"
|
string="Agreement"
|
||||||
icon="fa-shopping-cart"
|
icon="fa-shopping-cart"
|
||||||
attrs="{'invisible': [('state','!=','approved')]}"/>
|
attrs="{'invisible': [('state','!=','approved')]}"/>
|
||||||
|
<button name="get_attachments"
|
||||||
|
type="object"
|
||||||
|
class="oe_stat_button"
|
||||||
|
icon="fa-file-text-o">
|
||||||
|
<field name="attach_no" widget="statinfo" string="Documents"/>
|
||||||
|
</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="oe_title" name="title">
|
||||||
|
<h2>
|
||||||
|
<field name="name" readonly="1" style=" font-size:24px; "/>
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
<group>
|
<group>
|
||||||
|
|
||||||
<group>
|
<group>
|
||||||
<field name="name" readonly="1"/>
|
<field name="sent_to_commitee" invisible="1"/>
|
||||||
<field name="employee_id"/>
|
|
||||||
<field name="user_id" readonly="1"/>
|
|
||||||
<field name="department_id"/>
|
<field name="department_id"/>
|
||||||
<field name="product_category_ids" widget="many2many_tags"/>
|
<field name="product_category_ids" widget="many2many_tags"/>
|
||||||
<field name="purpose"/>
|
|
||||||
<field name="date"/>
|
<field name="date"/>
|
||||||
<field name="date_start"/>
|
<field name="ssd_approve"/>
|
||||||
<field name="date_end"/>
|
<field name="seo_approve"/>
|
||||||
<field name="vendor_id"/>
|
|
||||||
<field name="committee_enabled"/>
|
|
||||||
<field name="agreement_id" attrs="{'invisible':[('agreement_id','=',False)]}"/>
|
|
||||||
</group>
|
|
||||||
<group attrs="{'invisible': [('committee_enabled', '=', False)]}">
|
|
||||||
<group>
|
|
||||||
<field name="committee_type_id"
|
|
||||||
attrs="{'required': [('committee_enabled', '=', True)]}"/>
|
|
||||||
<field name="committe_head"
|
|
||||||
attrs="{'required': [('committee_enabled', '=', True)]}"/>
|
|
||||||
<field name="min_approve"
|
|
||||||
attrs="{'required': [('committee_enabled', '=', True)]}"/>
|
|
||||||
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="min_vote"
|
|
||||||
attrs="{'required': [('committee_enabled', '=', True)]}"/>
|
|
||||||
<field name="actual_vote" readonly="1"/>
|
|
||||||
<field name="sent_to_commitee" invisible="1"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="employee_id" readonly="1"/>
|
||||||
|
<field name="user_id" invisible="1"/>
|
||||||
|
<field name="purpose"/>
|
||||||
|
<field name="date_start" invisible="1"/>
|
||||||
|
<field name="date_end" invisible="1"/>
|
||||||
|
<field name="vendor_id" invisible="1"/>
|
||||||
|
<field name="committee_enabled"/>
|
||||||
|
|
||||||
|
<field name="committee_type_id"
|
||||||
|
attrs="{'invisible': [('committee_enabled', '=', False)], 'required': [('committee_enabled', '=', True)]}"/>
|
||||||
|
|
||||||
|
<field name="committe_head"
|
||||||
|
attrs="{'invisible': [('committee_enabled', '=', False)], 'required': [('committee_enabled', '=', True)]}"/>
|
||||||
|
|
||||||
|
<field name="agreement_id" invisible="1"/>
|
||||||
|
|
||||||
|
<field name="min_approve"
|
||||||
|
attrs="{'invisible': [('committee_enabled', '=', False)], 'required': [('committee_enabled', '=', True)]}"/>
|
||||||
|
|
||||||
|
<field name="min_vote"
|
||||||
|
attrs="{'invisible': [('committee_enabled', '=', False)], 'required': [('committee_enabled', '=', True)]}"/>
|
||||||
|
|
||||||
|
</group>
|
||||||
|
|
||||||
|
|
||||||
</group>
|
</group>
|
||||||
<notebook>
|
<notebook>
|
||||||
<page string="Products">
|
<page string="Products">
|
||||||
|
|
@ -87,13 +104,17 @@
|
||||||
<tree editable="bottom">
|
<tree editable="bottom">
|
||||||
<field name="product_id"/>
|
<field name="product_id"/>
|
||||||
<field name="description"/>
|
<field name="description"/>
|
||||||
<field name="quantity"/>
|
|
||||||
<field name="uom_id"/>
|
<field name="uom_id"/>
|
||||||
<field name="price_unit" groups="purchase_requisition_custom.committe_member"/>
|
<field name="quantity"/>
|
||||||
<field name="technical_spec"/>
|
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</page>
|
</page>
|
||||||
|
<page string="Description">
|
||||||
|
<group>
|
||||||
|
<field name="description"/>
|
||||||
|
</group>
|
||||||
|
|
||||||
|
</page>
|
||||||
|
|
||||||
<page string="Committee " attrs="{'invisible': [('committee_enabled', '=', False)]}">
|
<page string="Committee " attrs="{'invisible': [('committee_enabled', '=', False)]}">
|
||||||
<group>
|
<group>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<odoo>
|
<odoo>
|
||||||
<menuitem id="menu_odx_root" name="Annual Purchase" sequence="10" parent="purchase.menu_purchase_root"/>
|
<menuitem id="menu_odx_root" name="Annual Purchase" sequence="10" parent="purchase.menu_purchase_root"/>
|
||||||
<menuitem id="menu_odx_requests" name="Annual Requests" parent="menu_odx_root" sequence="10" action="action_odx_annual_request" groups="odex25_annual_purchase.group_gm,odex25_annual_purchase.group_ssd,purchase.group_purchase_user,purchase.group_purchase_manager"/>
|
<menuitem id="menu_odx_requests" name="Annual Requests" parent="menu_odx_root" sequence="10" action="action_odx_annual_request" groups="hr_base.group_general_manager,hr_base.group_services_manager,purchase.group_purchase_user,purchase.group_purchase_manager"/>
|
||||||
<menuitem id="menu_odx_annual_committee" name="Annual Committee" parent="menu_odx_root" sequence="11" action="action_annual_committe" groups="purchase_requisition_custom.committe_member,odex25_annual_purchase.group_technical_committee"/>
|
<menuitem id="menu_odx_annual_committee" name="Annual Committee" parent="menu_odx_root" sequence="11" action="action_annual_committe" groups="purchase_requisition_custom.committe_member,odex25_annual_purchase.group_technical_committee"/>
|
||||||
<!-- <menuitem id="menu_odx_addendum" name="Addendum" parent="menu_odx_root" sequence="30" action="action_odx_annual_addendum"/>-->
|
<!-- <menuitem id="menu_odx_addendum" name="Addendum" parent="menu_odx_root" sequence="30" action="action_odx_annual_addendum"/>-->
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|
@ -1,134 +1,340 @@
|
||||||
<odoo>
|
<odoo>
|
||||||
<record id="view_purchase_order_form_annual_rfq_odx" model="ir.ui.view">
|
<record id="view_po_form_products_for_tech_committee" model="ir.ui.view">
|
||||||
<field name="name">purchase.order.form.annual.rfq.odx</field>
|
<field name="name">purchase.order.form.products.tech_committee</field>
|
||||||
<field name="model">purchase.order</field>
|
<field name="model">purchase.order</field>
|
||||||
<field name="inherit_id" ref="purchase_requisition_custom.purchase_order_custom_form_view"/>
|
<field name="inherit_id" ref="purchase_requisition_custom.purchase_order_custom_form_view"/>
|
||||||
<field name="arch" type="xml">
|
<field name="groups_id" eval="[(4, ref('odex25_annual_purchase.group_technical_committee'))]"/>
|
||||||
<xpath expr="//field[@name='request_id']" position="after">
|
<field name="arch" type="xml">
|
||||||
<field name="annual_request_id" readonly="1"
|
<xpath expr="/form" position="replace">
|
||||||
attrs="{'invisible': [('annual_request_id', '=', False)]}"/>
|
<form>
|
||||||
</xpath>
|
<header>
|
||||||
|
<field name="can_committee_vote" invisible="1"/>
|
||||||
|
<field name="purchase_commitee" invisible="1"/>
|
||||||
|
<field name="requisition_id" invisible="1"/>
|
||||||
|
<button type="object" name="action_select" groups="odex25_annual_purchase.group_technical_committee"
|
||||||
|
attrs="{'invisible':['|', ('state','in',['done','purchase','waiting','cancel']),('can_committee_vote', '=', False)]}"
|
||||||
|
string="Select"/>
|
||||||
|
|
||||||
|
<button type="object" name="action_refuse" groups="odex25_annual_purchase.group_technical_committee"
|
||||||
|
attrs="{'invisible':['|',('state','in',['done','purchase','waiting','cancel']),('can_committee_vote', '=', False)]}"
|
||||||
|
string="Refuse"/>
|
||||||
|
<field name="state" widget="statusbar" statusbar_visible="draft,sent,purchase" readonly="1"/>
|
||||||
|
</header>
|
||||||
|
<sheet>
|
||||||
|
<div class="oe_button_box" name="button_box">
|
||||||
|
<button name="get_attachments" type="object"
|
||||||
|
class="oe_stat_button"
|
||||||
|
icon="fa-file-text-o">
|
||||||
|
<field name="attach_no" widget="statinfo" string="Documents"/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="oe_title">
|
||||||
|
<span class="o_form_label" attrs="{'invisible': [('state','not in',('draft','sent'))]}">Request for Quotation </span>
|
||||||
|
<span class="o_form_label" attrs="{'invisible': [('state','in',('draft','sent'))]}">Purchase Order </span>
|
||||||
|
<h1>
|
||||||
|
<field name="priority" widget="priority" class="mr-3"/>
|
||||||
|
<field name="name" readonly="1"/>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<group>
|
||||||
|
<field name="recommendation_order" readonly="1" attrs="{
|
||||||
|
'invisible': [('purchase_commitee', '=', False)]}"/>
|
||||||
|
<field name="partner_id" />
|
||||||
|
<field name="partner_ref" />
|
||||||
|
<field name="annual_request_id" readonly="1"/>
|
||||||
|
<field name="no_of_approve"/>
|
||||||
|
</group>
|
||||||
|
|
||||||
<xpath expr="/form/header/button[@name='action_sign']" position="attributes">
|
<notebook>
|
||||||
<attribute name="attrs">
|
<page string="Products" name="products">
|
||||||
{
|
<field name="order_line"
|
||||||
'invisible': [
|
widget="section_and_note_one2many"
|
||||||
'&',
|
mode="tree"
|
||||||
('requisition_id', '=', False),
|
context="{'default_state': 'draft'}"
|
||||||
('annual_request_id', '=', False),
|
attrs="{'readonly': [('state','in',('done','cancel'))]}">
|
||||||
'|',
|
<tree string="عناصر الطلب (لجنة تقنية)" editable="bottom">
|
||||||
('state', 'in', [
|
<field name="display_type" invisible="1"/>
|
||||||
'sign','purchase','to approve','done',
|
<field name="currency_id" invisible="1"/>
|
||||||
'cancel','budget_rejected','wait_for_send','waiting'
|
<field name="state" invisible="1"/>
|
||||||
]),
|
<field name="product_type" invisible="1"/>
|
||||||
('is_signed', '=', True)
|
<field name="sequence" widget="handle"/>
|
||||||
]
|
|
||||||
}
|
|
||||||
</attribute>
|
|
||||||
|
|
||||||
</xpath>
|
<field name="product_id"
|
||||||
<xpath expr="//page[@id='page_committee_members']" position="attributes">
|
attrs="{
|
||||||
<attribute name="attrs">{'invisible': ['&', ('requisition_id', '=', False), ('annual_request_id', '=', False)]}</attribute>
|
'readonly': [('state','in',('purchase','to approve','done','cancel'))],
|
||||||
</xpath>
|
'required': [('display_type','=',False)]
|
||||||
|
}"
|
||||||
|
context="{'partner_id':parent.partner_id, 'quantity':product_qty,'uom':product_uom, 'company_id': parent.company_id}"
|
||||||
|
force_save="1"
|
||||||
|
domain="[('purchase_ok','=',True),'|',('company_id','=',False),('company_id','=',parent.company_id)]"/>
|
||||||
|
|
||||||
<xpath expr="//field[@name='state']" position="before">
|
<field name="name" widget="section_and_note_text" string="Technical Description"/>
|
||||||
<field name="is_technical_committee" invisible="1"/>
|
|
||||||
</xpath>
|
|
||||||
|
|
||||||
<xpath expr="//page[@name='products']" position="attributes">
|
<field name="product_qty"
|
||||||
<attribute name="attrs">{'invisible': [('is_technical_committee', '=', True)]}</attribute>
|
attrs="{'readonly':[('state','in',('purchase','done','cancel'))]}"/>
|
||||||
</xpath>
|
|
||||||
|
|
||||||
<xpath expr="//page[@name='products']" position="after">
|
<field name="product_uom"
|
||||||
<page string="Products" name="technical_committee_products"
|
string="UoM"
|
||||||
attrs="{'invisible': [('is_technical_committee', '=', False)]}">
|
groups="uom.group_uom"
|
||||||
<field name="order_line"
|
attrs="{
|
||||||
widget="section_and_note_one2many"
|
'readonly':[('state','in',('purchase','done','cancel'))],
|
||||||
mode="tree"
|
'required':[('display_type','=',False)]
|
||||||
context="{'default_state': 'draft'}"
|
}"
|
||||||
attrs="{'readonly': [('state', 'in', ('done', 'cancel'))]}">
|
force_save="1"/>
|
||||||
<tree string="عناصر الطلب" editable="bottom">
|
<field name="product_uom_category_id" invisible="1"/>
|
||||||
<control>
|
</tree>
|
||||||
<create name="add_product_control" string="إضافة منتج"/>
|
|
||||||
<create name="add_section_control" string="إضافة قسم"
|
|
||||||
context="{'default_display_type': 'line_section'}"/>
|
|
||||||
<create name="add_note_control" string="إضافة ملاحظة"
|
|
||||||
context="{'default_display_type': 'line_note'}"/>
|
|
||||||
</control>
|
|
||||||
|
|
||||||
<!-- الحقول المخفية الضرورية -->
|
<form string="عنصر طلب الشراء">
|
||||||
<field name="display_type" invisible="1"/>
|
<field name="state" invisible="1"/>
|
||||||
<field name="currency_id" invisible="1"/>
|
<field name="display_type" invisible="1"/>
|
||||||
<field name="state" invisible="1"/>
|
|
||||||
<field name="product_type" invisible="1"/>
|
|
||||||
<field name="sequence" widget="handle"/>
|
|
||||||
|
|
||||||
<!-- الحقول المرئية فقط -->
|
<group attrs="{'invisible':[('display_type','!=',False)]}">
|
||||||
<field name="product_id"
|
|
||||||
attrs="{
|
|
||||||
'readonly': [('state', 'in', ('purchase', 'to approve','done', 'cancel'))],
|
|
||||||
'required': [('display_type', '=', False)]
|
|
||||||
}"
|
|
||||||
context="{'partner_id':parent.partner_id, 'quantity':product_qty,'uom':product_uom, 'company_id': parent.company_id}"
|
|
||||||
force_save="1"
|
|
||||||
domain="[('purchase_ok', '=', True), '|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"/>
|
|
||||||
|
|
||||||
<field name="name" widget="section_and_note_text"/>
|
|
||||||
|
|
||||||
<field name="product_qty"
|
|
||||||
attrs="{'readonly': [('state', 'in', ('purchase', 'done', 'cancel'))]}"/>
|
|
||||||
|
|
||||||
<field name="product_uom"
|
|
||||||
string="UoM"
|
|
||||||
groups="uom.group_uom"
|
|
||||||
attrs="{
|
|
||||||
'readonly': [('state', 'in', ('purchase', 'done', 'cancel'))],
|
|
||||||
'required': [('display_type', '=', False)]
|
|
||||||
}"
|
|
||||||
force_save="1"/>
|
|
||||||
<field name="product_uom_category_id" invisible="1"/>
|
|
||||||
</tree>
|
|
||||||
|
|
||||||
<!-- Form view مبسط -->
|
|
||||||
<form string="عنصر طلب الشراء">
|
|
||||||
<field name="state" invisible="1"/>
|
|
||||||
<field name="display_type" invisible="1"/>
|
|
||||||
|
|
||||||
<group attrs="{'invisible': [('display_type', '!=', False)]}">
|
|
||||||
<group>
|
<group>
|
||||||
<field name="product_uom_category_id" invisible="1"/>
|
<field name="product_uom_category_id" invisible="1"/>
|
||||||
<field name="product_id"
|
<field name="product_id"
|
||||||
context="{'partner_id': parent.partner_id}"
|
context="{'partner_id': parent.partner_id}"
|
||||||
widget="many2one_barcode"
|
widget="many2one_barcode"
|
||||||
domain="[('purchase_ok', '=', True), '|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"/>
|
domain="[('purchase_ok','=',True),'|',('company_id','=',False),('company_id','=',parent.company_id)]"/>
|
||||||
|
<label for="product_qty"/>
|
||||||
|
<div class="o_row">
|
||||||
|
<field name="product_qty"/>
|
||||||
|
<field name="product_uom" groups="uom.group_uom"
|
||||||
|
attrs="{'required':[('display_type','=',False)]}"/>
|
||||||
|
</div>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
|
||||||
<label for="product_qty"/>
|
<group>
|
||||||
<div class="o_row">
|
<field name="name"/>
|
||||||
<field name="product_qty"/>
|
</group>
|
||||||
<field name="product_uom"
|
|
||||||
groups="uom.group_uom"
|
<label for="name" string="اسم القسم"
|
||||||
attrs="{'required': [('display_type', '=', False)]}"/>
|
attrs="{'invisible':[('display_type','!=','line_section')]}"/>
|
||||||
</div>
|
<label for="name" string="ملاحظة"
|
||||||
|
attrs="{'invisible':[('display_type','!=','line_note')]}"/>
|
||||||
|
<field name="name" nolabel="1"
|
||||||
|
attrs="{'invisible':[('display_type','=',False)]}"/>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</page>
|
||||||
|
|
||||||
|
<page id="page_committee_members" string="Committee Members"
|
||||||
|
groups="odex25_annual_purchase.group_technical_committee"
|
||||||
|
attrs="{'invisible':['&',('requisition_id','=',False),('annual_request_id','=',False)]}">
|
||||||
|
<field name="committe_members">
|
||||||
|
<tree>
|
||||||
|
<field name="user_id"/>
|
||||||
|
<field name="selection_reason"/>
|
||||||
|
<field name="select"/>
|
||||||
|
<field name="refused"/>
|
||||||
|
<field name="refusing_reason"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</page>
|
||||||
|
|
||||||
|
<page string="Other Information" name="purchase_delivery_invoice">
|
||||||
|
<group>
|
||||||
|
<group name="other_info">
|
||||||
|
<field name="user_id" domain="[('share', '=', False)]" widget="many2one_avatar_user"/>
|
||||||
|
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
||||||
|
</group>
|
||||||
|
<group name="invoice_info">
|
||||||
|
<field name="invoice_status" attrs="{'invisible': [('state', 'in', ('draft', 'sent', 'to approve', 'cancel'))]}"/>
|
||||||
|
<field name="payment_term_id" attrs="{'readonly': ['|', ('invoice_status','=', 'invoiced'), ('state', '=', 'done')]}" options="{'no_create': True}"/>
|
||||||
|
<field name="fiscal_position_id" options="{'no_create': True}" attrs="{'readonly': ['|', ('invoice_status','=', 'invoiced'), ('state', '=', 'done')]}"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
|
</page>
|
||||||
|
</notebook>
|
||||||
|
</sheet>
|
||||||
|
</form>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<record id="view_po_form_products_for_annual_committee" model="ir.ui.view">
|
||||||
|
<field name="name">purchase.order.form.products.annual_committee</field>
|
||||||
|
<field name="model">purchase.order</field>
|
||||||
|
<field name="inherit_id" ref="purchase_requisition_custom.purchase_order_custom_form_view"/>
|
||||||
|
<field name="groups_id" eval="[(4, ref('odex25_annual_purchase.group_annual_committee'))]"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="/form" position="replace">
|
||||||
|
<form>
|
||||||
|
<header>
|
||||||
|
<field name="can_committee_vote" invisible="1"/>
|
||||||
|
<field name="purchase_commitee" invisible="1"/>
|
||||||
|
<field name="requisition_id" invisible="1"/>
|
||||||
|
<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"/>
|
||||||
|
<button type="object" name="action_select" groups="odex25_annual_purchase.group_annual_committee"
|
||||||
|
attrs="{'invisible':['|', ('state','in',['done','purchase','waiting','cancel']),('can_committee_vote', '=', False)]}"
|
||||||
|
string="Select"/>
|
||||||
|
|
||||||
|
<button type="object" name="action_refuse" groups="odex25_annual_purchase.group_annual_committee"
|
||||||
|
attrs="{'invisible':['|',('state','in',['done','purchase','waiting','cancel']),('can_committee_vote', '=', False)]}"
|
||||||
|
string="Refuse"/>
|
||||||
|
<field name="state" widget="statusbar" statusbar_visible="draft,sent,purchase" readonly="1"/>
|
||||||
|
</header>
|
||||||
|
<sheet>
|
||||||
|
<div class="oe_button_box" name="button_box">
|
||||||
|
<button name="get_attachments" type="object"
|
||||||
|
class="oe_stat_button"
|
||||||
|
icon="fa-file-text-o">
|
||||||
|
<field name="attach_no" widget="statinfo" string="Documents"/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="oe_title">
|
||||||
|
<span class="o_form_label" attrs="{'invisible': [('state','not in',('draft','sent'))]}">Request for Quotation </span>
|
||||||
|
<span class="o_form_label" attrs="{'invisible': [('state','in',('draft','sent'))]}">Purchase Order </span>
|
||||||
|
<h1>
|
||||||
|
<field name="priority" widget="priority" class="mr-3"/>
|
||||||
|
<field name="name" readonly="1"/>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
<group>
|
<group>
|
||||||
<field name="name"/>
|
<field name="recommendation_order" readonly="1" attrs="{
|
||||||
|
'invisible': [('purchase_commitee', '=', False)]}"/>
|
||||||
|
<field name="partner_id" />
|
||||||
|
<field name="partner_ref" />
|
||||||
|
<field name="annual_request_id" readonly="1"/>
|
||||||
|
<field name="no_of_approve"/>
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
<label for="name" string="اسم القسم"
|
<notebook>
|
||||||
attrs="{'invisible': [('display_type', '!=', 'line_section')]}"/>
|
<page string="Products" name="products">
|
||||||
<label for="name" string="ملاحظة"
|
<field name="order_line"
|
||||||
attrs="{'invisible': [('display_type', '!=', 'line_note')]}"/>
|
widget="section_and_note_one2many"
|
||||||
<field name="name" nolabel="1"
|
mode="tree,kanban"
|
||||||
attrs="{'invisible': [('display_type', '=', False)]}"/>
|
context="{'default_state': 'draft'}"
|
||||||
|
attrs="{'readonly': [('state', 'in', ('done', 'cancel'))]}">
|
||||||
|
<tree string="Purchase Order Lines" editable="bottom">
|
||||||
|
<control>
|
||||||
|
<create name="add_product_control" string="Add a product"/>
|
||||||
|
<create name="add_section_control" string="Add a section" context="{'default_display_type': 'line_section'}"/>
|
||||||
|
<create name="add_note_control" string="Add a note" context="{'default_display_type': 'line_note'}"/>
|
||||||
|
</control>
|
||||||
|
<field name="display_type" invisible="1"/>
|
||||||
|
<field name="currency_id" invisible="1"/>
|
||||||
|
<field name="state" invisible="1" readonly="1"/>
|
||||||
|
<field name="product_type" invisible="1"/>
|
||||||
|
<field name="product_uom_category_id" invisible="1"/>
|
||||||
|
<field name="invoice_lines" invisible="1"/>
|
||||||
|
<field name="sequence" widget="handle"/>
|
||||||
|
<field
|
||||||
|
name="product_id"
|
||||||
|
attrs="{
|
||||||
|
'readonly': [('state', 'in', ('purchase', 'to approve','done', 'cancel'))],
|
||||||
|
'required': [('display_type', '=', False)],
|
||||||
|
}"
|
||||||
|
context="{'partner_id':parent.partner_id, 'quantity':product_qty,'uom':product_uom, 'company_id': parent.company_id}"
|
||||||
|
force_save="1" domain="[('purchase_ok', '=', True), '|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"/>
|
||||||
|
<field name="name" widget="section_and_note_text" string="Technical Description"/>
|
||||||
|
<field name="product_qty"/>
|
||||||
|
<field name="product_uom" string="UoM" groups="uom.group_uom"
|
||||||
|
attrs="{
|
||||||
|
'readonly': [('state', 'in', ('purchase', 'done', 'cancel'))],
|
||||||
|
'required': [('display_type', '=', False)]
|
||||||
|
}"
|
||||||
|
force_save="1" optional="show"/>
|
||||||
|
<field name="price_unit" attrs="{'readonly': [('invoice_lines', '!=', [])]}"/>
|
||||||
|
<field name="taxes_id" widget="many2many_tags" domain="[('type_tax_use','=','purchase'), ('company_id', '=', parent.company_id)]" context="{'default_type_tax_use': 'purchase', 'search_view_ref': 'account.account_tax_view_search'}" options="{'no_create': True}" optional="show"/>
|
||||||
|
<field name="price_subtotal" widget="monetary"/>
|
||||||
|
<field name="price_total" invisible="1"/>
|
||||||
|
<field name="price_tax" invisible="1"/>
|
||||||
|
</tree>
|
||||||
|
<form string="Purchase Order Line">
|
||||||
|
<field name="state" invisible="1"/>
|
||||||
|
<field name="display_type" invisible="1"/>
|
||||||
|
<group attrs="{'invisible': [('display_type', '!=', False)]}">
|
||||||
|
<group>
|
||||||
|
<field name="product_uom_category_id" invisible="1"/>
|
||||||
|
<field name="product_id"
|
||||||
|
context="{'partner_id': parent.partner_id}"
|
||||||
|
widget="many2one_barcode"
|
||||||
|
domain="[('purchase_ok', '=', True), '|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"
|
||||||
|
/>
|
||||||
|
<label for="product_qty"/>
|
||||||
|
<div class="o_row">
|
||||||
|
<field name="product_qty"/>
|
||||||
|
<field name="product_uom" groups="uom.group_uom" attrs="{'required': [('display_type', '=', False)]}"/>
|
||||||
|
</div>
|
||||||
|
<field name="qty_received_method" invisible="1"/>
|
||||||
|
<field name="price_unit"/>
|
||||||
|
<field name="taxes_id" widget="many2many_tags" domain="[('type_tax_use', '=', 'purchase'), ('company_id', '=', parent.company_id)]" options="{'no_create': True}"/>
|
||||||
|
</group>
|
||||||
|
<group colspan="12">
|
||||||
|
<notebook>
|
||||||
|
<page string="Notes" name="notes">
|
||||||
|
<field name="name"/>
|
||||||
|
</page>
|
||||||
|
<page string="Invoices and Incoming Shipments" name="invoices_incoming_shiptments">
|
||||||
|
<field name="invoice_lines"/>
|
||||||
|
</page>
|
||||||
|
</notebook>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<label for="name" string="Section Name (eg. Products, Services)" attrs="{'invisible': [('display_type', '!=', 'line_section')]}"/>
|
||||||
|
<label for="name" string="Note" attrs="{'invisible': [('display_type', '!=', 'line_note')]}"/>
|
||||||
|
<field name="name" nolabel="1" attrs="{'invisible': [('display_type', '=', False)]}"/>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
<group class="oe_subtotal_footer oe_right">
|
||||||
|
<field name="amount_untaxed" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
||||||
|
<field name="amount_tax" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
||||||
|
<div class="oe_subtotal_footer_separator oe_inline">
|
||||||
|
<label for="amount_total"/>
|
||||||
|
</div>
|
||||||
|
<field name="amount_total" nolabel="1" class="oe_subtotal_footer_separator" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
||||||
|
</group>
|
||||||
|
<field name="notes" class="oe_inline" placeholder="Define your terms and conditions ..."/>
|
||||||
|
<div class="oe_clear"/>
|
||||||
|
</page>
|
||||||
|
|
||||||
|
<page id="page_committee_members" string="Committee Members"
|
||||||
|
groups="odex25_annual_purchase.group_annual_committee"
|
||||||
|
attrs="{'invisible':['&',('requisition_id','=',False),('annual_request_id','=',False)]}">
|
||||||
|
<field name="committe_members">
|
||||||
|
<tree>
|
||||||
|
<field name="user_id"/>
|
||||||
|
<field name="selection_reason"/>
|
||||||
|
<field name="select"/>
|
||||||
|
<field name="refused"/>
|
||||||
|
<field name="refusing_reason"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</page>
|
||||||
|
|
||||||
|
<page string="Other Information" name="purchase_delivery_invoice">
|
||||||
|
<group>
|
||||||
|
<group name="other_info">
|
||||||
|
<field name="user_id" domain="[('share', '=', False)]" widget="many2one_avatar_user"/>
|
||||||
|
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
||||||
|
</group>
|
||||||
|
<group name="invoice_info">
|
||||||
|
<field name="invoice_status" attrs="{'invisible': [('state', 'in', ('draft', 'sent', 'to approve', 'cancel'))]}"/>
|
||||||
|
<field name="payment_term_id" attrs="{'readonly': ['|', ('invoice_status','=', 'invoiced'), ('state', '=', 'done')]}" options="{'no_create': True}"/>
|
||||||
|
<field name="fiscal_position_id" options="{'no_create': True}" attrs="{'readonly': ['|', ('invoice_status','=', 'invoiced'), ('state', '=', 'done')]}"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
</page>
|
||||||
|
</notebook>
|
||||||
|
</sheet>
|
||||||
|
<div class="oe_chatter">
|
||||||
|
<field name="message_follower_ids"/>
|
||||||
|
<field name="activity_ids"/>
|
||||||
|
<field name="message_ids"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</page>
|
</record>
|
||||||
</xpath>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
Loading…
Reference in New Issue