feat: Fix Purchase Order and Request layout issues
- Fix Purchase Order form layout - organize fields in proper groups - Add separators and groups for Request Information and Status sections - Remove duplicate request_id field from origin replacement - Remove unnecessary invisible="0" attribute from department_id - Fix typo: colsapn to colspan in committee type form - Add missing Arabic translations for group headers - Improve field organization and visual layout Synced with latest dev_odex25_purchase on 2025-11-19
This commit is contained in:
parent
baa27c5ea4
commit
be7cfdf413
|
|
@ -669,12 +669,12 @@ msgstr "الكمية المطلوبة"
|
|||
#: model:ir.model.fields.selection,name:purchase_requisition_custom.selection__purchase_order__purchase_cost__department
|
||||
#: model:ir.model.fields.selection,name:purchase_requisition_custom.selection__purchase_requisition__purchase_cost__department
|
||||
msgid "Department"
|
||||
msgstr "القسم"
|
||||
msgstr "الإدارة"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: model:ir.model.fields,field_description:purchase_requisition_custom.field_purchase_order_line__department_name
|
||||
msgid "Department Name"
|
||||
msgstr "اسم القسم"
|
||||
msgstr "اسم الإدارة"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: model:ir.model.fields,field_description:purchase_requisition_custom.field_purchase_request_line__description
|
||||
|
|
@ -1956,6 +1956,41 @@ msgstr "الفرع"
|
|||
msgid "Requested by Purchase"
|
||||
msgstr "الطلب لموظف اخر؟"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: model_terms:ir.ui.view,arch_db:purchase_requisition_custom.purchase_request_form
|
||||
msgid "Requester Information"
|
||||
msgstr "معلومات مقدم الطلب"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: model_terms:ir.ui.view,arch_db:purchase_requisition_custom.purchase_request_form
|
||||
msgid "Request Details"
|
||||
msgstr "تفاصيل الطلب"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: model_terms:ir.ui.view,arch_db:purchase_requisition_custom.purchase_request_form
|
||||
msgid "Vendor & Accounting"
|
||||
msgstr "المورد والمحاسبة"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: model_terms:ir.ui.view,arch_db:purchase_requisition_custom.purchase_requisition_custom_form_view
|
||||
msgid "Purchase Configuration"
|
||||
msgstr "إعدادات الشراء"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: model_terms:ir.ui.view,arch_db:purchase_requisition_custom.purchase_requisition_custom_form_view
|
||||
msgid "Department & Request Details"
|
||||
msgstr "القسم وتفاصيل الطلب"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: model_terms:ir.ui.view,arch_db:purchase_requisition_custom.purchase_order_form_inherit
|
||||
msgid "Request Information"
|
||||
msgstr "معلومات الطلب"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: model_terms:ir.ui.view,arch_db:purchase_requisition_custom.purchase_order_form_inherit
|
||||
msgid "Status & Tracking"
|
||||
msgstr "الحالة والمتابعة"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: model:ir.model.fields,field_description:purchase_requisition_custom.field_change_purchase_user_state__requisition_id
|
||||
msgid "Requisition"
|
||||
|
|
@ -2809,7 +2844,7 @@ msgstr "الموظف"
|
|||
#. module: purchase_requisition_custom
|
||||
#: model_terms:ir.ui.view,arch_db:purchase_requisition_custom.purchase_request_search
|
||||
msgid "Department"
|
||||
msgstr "القسم"
|
||||
msgstr "الإدارة"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: model_terms:ir.ui.view,arch_db:purchase_requisition_custom.purchase_request_search
|
||||
|
|
|
|||
|
|
@ -2481,7 +2481,7 @@ msgstr "الموظف"
|
|||
#. module: purchase_requisition_custom
|
||||
#: model_terms:ir.ui.view,arch_db:purchase_requisition_custom.purchase_request_search
|
||||
msgid "Department"
|
||||
msgstr "القسم"
|
||||
msgstr "الإدارة"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: model_terms:ir.ui.view,arch_db:purchase_requisition_custom.purchase_request_search
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
attrs="{'invisible' : ['|',('state' , '!=' , 'waiting'),('purchase_create' , '=' , True)]}"/>
|
||||
|
||||
<button name="action_refuse" type="object" string="Refuse" id="prc_request_refuse"
|
||||
class="btn-secondary"
|
||||
groups="purchase_requisition_custom.group_refuse_purchase"
|
||||
attrs="{'invisible' : [('state' , 'not in' , ('direct_manager','waiting'))]}"/>
|
||||
|
||||
|
|
@ -47,13 +48,21 @@
|
|||
<field name="is_requisition" invisible="1"/>
|
||||
<field name="is_creator" invisible="1"/>
|
||||
<button class="oe_stat_button" name="open_requisition" type="object"
|
||||
string="Purchase Agreement" icon="fa-list-ol"
|
||||
icon="fa-handshake-o"
|
||||
attrs="{'invisible' : [('is_requisition' , '=' , False)]}"
|
||||
groups="purchase.group_purchase_user,purchase.group_purchase_manager"/>
|
||||
groups="purchase.group_purchase_user,purchase.group_purchase_manager">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_text">Purchase Agreement</span>
|
||||
</div>
|
||||
</button>
|
||||
<button class="oe_stat_button" name="open_purchase" type="object"
|
||||
string="Purchase Orders" icon="fa-list-ol"
|
||||
icon="fa-shopping-cart"
|
||||
attrs="{'invisible' : [('purchase_create' , '=' , False)]}"
|
||||
groups="purchase.group_purchase_user,purchase.group_purchase_manager"/>
|
||||
groups="purchase.group_purchase_user,purchase.group_purchase_manager">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_text">Purchase Orders</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<!-- <label for="name" class="oe_edit_only"/>-->
|
||||
|
|
@ -66,13 +75,13 @@
|
|||
<field name="picking_type_id" invisible="1"/>
|
||||
<field name="department_id" force_save="1"
|
||||
attrs="{'readonly' : ['|',('state' , '!=' , 'draft'),('by_purchase' , '!=' , True)] , 'required' : [('by_purchase' , '=' , True)]}"
|
||||
readonly="1" context="{'show_department_short': True}"/>
|
||||
<field name="branch_id" readonly="1" context="{'show_branch_short': True}"/>
|
||||
readonly="1"/>
|
||||
<field name="branch_id" readonly="1"/>
|
||||
<field name="employee_id" attrs="{'readonly':[('by_purchase' , '=' , False)]}" required="1"
|
||||
options="{'no_create' : True , 'no_edit' : True ,'no_open' : True}"/>
|
||||
<field name="product_category_ids" widget="many2many_tags"/>
|
||||
<field name="purchase_purpose" required="1"
|
||||
attrs="{'readonly':[('state' , '!=' , 'draft')]}"/>
|
||||
attrs="{'readonly':[('state' , '!=' , 'draft')]}" placeholder="Request Purpose..."/>
|
||||
<field name="date" readonly="1"/>
|
||||
<field name="purchase_create" invisible="1"/>
|
||||
<field name="partner_id"
|
||||
|
|
@ -91,6 +100,7 @@
|
|||
<field name="edit_partner_id" invisible="1"/>
|
||||
|
||||
</group>
|
||||
|
||||
<notebook>
|
||||
<page string="Items" name="purchase_request_info">
|
||||
<field name="line_ids" attrs="{'readonly':[('state' , '!=' , 'draft')]}">
|
||||
|
|
@ -98,22 +108,16 @@
|
|||
<field name="product_id"
|
||||
domain="[('purchase_ok', '=', True)]"
|
||||
options="{'no_create' : True , 'no_edit' : True ,'no_open' : True}"
|
||||
optional="show"
|
||||
required="1"/>
|
||||
|
||||
<field name="uom_id"/>
|
||||
required="1"/>
|
||||
<field name="description"/>
|
||||
|
||||
<field name="qty"
|
||||
attrs="{'column_required':[('parent.state' , '!=' , 'draft')]}"
|
||||
optional="show"/>
|
||||
<!-- <field name="price_unit" attrs="{'column_required':[('parent.state' , '!=', 'draft')]}" optional="show"/>-->
|
||||
<!-- <field name="sum_total" force_save="1" sum="Total amount" optional="show"/>-->
|
||||
<field name="qty" sum="Total Quantity"
|
||||
attrs="{'column_required':[('parent.state' , '!=' , 'draft')]}"/>
|
||||
<field name="uom_id"/>
|
||||
<field name="account_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Note">
|
||||
<page string="Note" name="notes">
|
||||
<field name="note"/>
|
||||
</page>
|
||||
</notebook>
|
||||
|
|
@ -135,8 +139,8 @@
|
|||
<field name="name"/>
|
||||
<field name="date"/>
|
||||
<field name="employee_id"/>
|
||||
<field name="department_id" context="{'show_department_short': True}"/>
|
||||
<field name="branch_id" context="{'show_branch_short': True}"/>
|
||||
<field name="department_id"/>
|
||||
<field name="branch_id"/>
|
||||
<field name="product_category_ids" widget="many2many_tags"/>
|
||||
<field name="state"/>
|
||||
<field name="purchase_state_summary" optional="show"/>
|
||||
|
|
@ -152,8 +156,8 @@
|
|||
<search string="Purchase Request">
|
||||
<field name="name" string="Request Number"/>
|
||||
<field name="employee_id" string="Employee"/>
|
||||
<field name="department_id" string="Department" context="{'show_department_short': True}"/>
|
||||
<field name="branch_id" string="Branch" context="{'show_branch_short': True}"/>
|
||||
<field name="department_id" string="Department"/>
|
||||
<field name="branch_id" string="Branch"/>
|
||||
<field name="purchase_purpose" string="Purpose"/>
|
||||
<field name="partner_id" string="Vendor"/>
|
||||
|
||||
|
|
@ -176,16 +180,7 @@
|
|||
domain="[('employee_id.user_id','=',uid)]"/>
|
||||
<filter string="My Department" name="my_department"
|
||||
domain="[('department_id.manager_id.user_id','=',uid)]"/>
|
||||
<filter string="Pending Approval" name="pending_approval"
|
||||
domain="[('state','in',['draft','direct_manager'])]"/>
|
||||
<filter string="In Progress" name="in_progress"
|
||||
domain="[('state','in',['waiting'])]"/>
|
||||
|
||||
<separator/>
|
||||
<filter string="Project Requests" name="project_type"
|
||||
domain="[('type','=','project')]"/>
|
||||
<filter string="Operational Requests" name="operational_type"
|
||||
domain="[('type','=','operational')]"/>
|
||||
|
||||
<separator/>
|
||||
<filter string="With Vendor" name="with_vendor"
|
||||
|
|
@ -197,11 +192,9 @@
|
|||
<group expand="0" string="Group By">
|
||||
<filter string="State" name="group_state" context="{'group_by':'state'}"/>
|
||||
<filter string="Employee" name="group_employee" context="{'group_by':'employee_id'}"/>
|
||||
<filter string="Department" name="group_department" context="{'group_by':'department_id', 'show_department_short': True}"/>
|
||||
<filter string="Department" name="group_department" context="{'group_by':'department_id'}"/>
|
||||
<filter string="Branch" name="group_branch" context="{'group_by':'branch_id'}"/>
|
||||
<filter string="Vendor" name="group_vendor" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Request Type" name="group_type" context="{'group_by':'type'}"/>
|
||||
<filter string="Product Categories" name="group_categories" context="{'group_by':'product_category_ids'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="committe type">
|
||||
<sheet>
|
||||
<group col="4" colsapn="2">
|
||||
<group col="4" colspan="2">
|
||||
<field name="name" required="1"/>
|
||||
<field name="committe_head"/>
|
||||
<field name="type_cat" widget="many2many_tags"/>
|
||||
|
|
@ -98,7 +98,7 @@
|
|||
|
||||
<xpath expr="//field[@name='partner_id']" position="after">
|
||||
<field name="recommendation_order" string="Recommend Order"/>
|
||||
<field name="branch_id" context="{'from_branch_field': True}"/>
|
||||
<field name="branch_id"/>
|
||||
</xpath>
|
||||
|
||||
|
||||
|
|
@ -187,7 +187,7 @@
|
|||
|
||||
<button type="object" name="action_refuse" groups="purchase_requisition_custom.committe_member"
|
||||
attrs="{'invisible':['|',('state','in',['done','purchase','waiting','cancel']),('can_committee_vote', '=', False)]}"
|
||||
string="Refuse"/>
|
||||
string="Refuse" class="btn-secondary"/>
|
||||
<button type="object" name="action_recommend"
|
||||
groups="purchase_requisition_custom.group_select_recommended_offer"
|
||||
confirm="Are you sure you want to process ?"
|
||||
|
|
@ -282,12 +282,10 @@
|
|||
<xpath expr="//field[@name='origin']" position="replace">
|
||||
<field name="send_to_budget" invisible="1"/>
|
||||
<field name="email_to_vendor" invisible="1"/>
|
||||
<field name="request_id" readonly="1"/>
|
||||
<field name="project_id" readonly="1"/>
|
||||
<field name="purchase_cost" invisible="1"/>
|
||||
<field name="budget_amount" invisible="1"/>
|
||||
<field name="is_signed" invisible="1"/>
|
||||
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='order_line']" position="attributes">
|
||||
<attribute name="attrs">{'readonly':[('state','in',('done','cancel','waiting'))]}</attribute>
|
||||
|
|
@ -299,15 +297,20 @@
|
|||
<attribute name="attrs">{'readonly':[('state','in',('done','cancel','waiting'))]}</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='currency_id']" position="after">
|
||||
<field name="state_of_delivery"/>
|
||||
<separator string="Request Information"/>
|
||||
<group col="2" colspan="2">
|
||||
<field name="request_id" readonly="1"/>
|
||||
<field name="purchase_request_employee_id"/>
|
||||
<field name="department_id"/>
|
||||
<field name="branch_id" readonly="1"/>
|
||||
<field name="purpose" attrs="{'readonly': [('state','in',['done','cancel'])]}" colspan="2"/>
|
||||
</group>
|
||||
<separator string="Status & Tracking"/>
|
||||
<group col="2" colspan="2">
|
||||
<field name="state_of_delivery"/>
|
||||
<field name="no_of_approve" readonly="1"/>
|
||||
</group>
|
||||
<field name="is_purchase_budget" invisible="1"/>
|
||||
<field name="no_of_approve" readonly="1"/>
|
||||
<!--here -->
|
||||
<field name="purchase_cost" invisible="1"/>
|
||||
<field name="department_id" invisible="0" context="{'show_department_short': True}"/>
|
||||
<field name="branch_id" readonly="1" context="{'show_branch_short': True}"/>
|
||||
<field name="purchase_request_employee_id"/>
|
||||
<field name="purpose" attrs="{'readonly': [('state','in',['done','cancel'])]}"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='order_line']" position="before">
|
||||
<button name="action_select_all" class="oe_highlight" type="object"
|
||||
|
|
@ -412,7 +415,7 @@
|
|||
</xpath>
|
||||
<xpath expr="//field[@name='line_ids']/tree[1]/field[@name='product_qty']" position="before">
|
||||
<field name="department_id" attrs="{'column_invisible': [('parent.purchase_cost', '=', 'default')],
|
||||
'readonly': ['|', ('parent.state', '=', 'accept'), ('parent.order_count', '>', 0)]}" context="{'show_department_short': True}"/>
|
||||
'readonly': ['|', ('parent.state', '=', 'accept'), ('parent.order_count', '>', 0)]}"/>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="/form/header/button[@name='action_done']" position="replace">
|
||||
|
|
@ -452,7 +455,7 @@
|
|||
<xpath expr="/form/header/button[@name='action_cancel']" position="replace">
|
||||
<button name="action_cancel" groups="purchase_requisition_custom.group_cancel_purchase_requisition"
|
||||
states="draft,in_progress,ongoing,checked,purchase_manager,rejected_by_committee"
|
||||
string="Cancel" type="object"/>
|
||||
string="Cancel" type="object" class="btn-secondary"/>
|
||||
</xpath>
|
||||
<xpath expr="/form/header/button[@name='action_draft']" position="attributes">
|
||||
<attribute name="attrs">{'invisible':[('state','!=','cancel')]}</attribute>
|
||||
|
|
@ -474,25 +477,33 @@
|
|||
<!-- <field name="city" attrs="{'readonly': [('state','!=', 'draft')]}"/>-->
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='user_id']" position="after">
|
||||
<separator string="Purchase Configuration"/>
|
||||
<group col="4">
|
||||
<field name="category_ids" required="1"
|
||||
attrs="{'readonly':['|',('state','in',('cancel','checked','done','waiting')),('check_request','=',True)]}"
|
||||
widget="many2many_tags" colspan="4"/>
|
||||
|
||||
<field name="purchase_cost" required="1" widget="radio" options="{'horizontal': true}"
|
||||
attrs="{'readonly':[('state','in',('cancel','checked','done','waiting'))]}" colspan="4"/>
|
||||
|
||||
<field name="type" required="1" widget="radio" options="{'horizontal': true}"
|
||||
attrs="{'readonly':[('state','in',('cancel','checked','done','waiting'))]}" colspan="2"/>
|
||||
<field name="project_id" colspan="2"
|
||||
attrs="{'invisible':[('type','!=', 'project')], 'required':[('type','=', 'project')], 'readonly':[('state' , '!=' , 'draft')]}"/>
|
||||
</group>
|
||||
|
||||
<separator string="Department & Request Details"/>
|
||||
<group col="4">
|
||||
<field name="department_id" attrs="{'required':[('purchase_cost','=', 'department')], 'invisible':[('purchase_cost','=', 'product_line')],
|
||||
'readonly':['|',('state','in',('cancel','checked','done','waiting')),('check_request','=',True)]}" colspan="2"/>
|
||||
<field name="request_id" readonly="1" colspan="2"/>
|
||||
|
||||
<field name="purpose" required="1" colspan="4"
|
||||
attrs="{'readonly':['|',('state','in',('cancel','checked','done','waiting')),('check_request','=',True)]}"/>
|
||||
</group>
|
||||
|
||||
<!-- Hidden fields -->
|
||||
<field name="check_request" invisible="1"/>
|
||||
<field name="category_ids" required="1"
|
||||
attrs="{'readonly':['|',('state','in',('cancel','checked','done','waiting')),('check_request','=',True)]}"
|
||||
widget="many2many_tags"/>
|
||||
|
||||
<field name="purchase_cost" required="1"
|
||||
attrs="{'readonly':[('state','in',('cancel','checked','done','waiting'))]}"/>
|
||||
|
||||
<field name="department_id" attrs="{'required':[('purchase_cost','=', 'department')], 'invisible':[('purchase_cost','=', 'product_line')],
|
||||
'readonly':['|',('state','in',('cancel','checked','done','waiting')),('check_request','=',True)]}" context="{'show_department_short': True}"/>
|
||||
<field name="purpose" required="1"
|
||||
attrs="{'readonly':['|',('state','in',('cancel','checked','done','waiting')),('check_request','=',True)]}"/>
|
||||
|
||||
<field name="type" required="1"
|
||||
attrs="{'readonly':[('state','in',('cancel','checked','done','waiting'))]}"/>
|
||||
<field name="project_id"
|
||||
attrs="{'invisible':[('type','!=', 'project')], 'required':[('type','=', 'project')], 'readonly':[('state' , '!=' , 'draft')]}"/>
|
||||
|
||||
<field name="request_id" readonly="1"/>
|
||||
<field name="type_exclusive" invisible="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='vendor_id']" position="attributes">
|
||||
|
|
@ -619,8 +630,8 @@
|
|||
<field name="origin" invisible="1"/>
|
||||
<field name="reject_reason" required="1"/>
|
||||
<footer>
|
||||
<button name="action_reject" string="Confirm" type="object" class="oe_highlight"/>
|
||||
<button string="Cancel" class="btn btn-default" special="cancel"/>
|
||||
<button name="action_reject" string="Confirm" type="object" class="btn-secondary"/>
|
||||
<button string="Cancel" class="btn-secondary" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
|
|
@ -651,8 +662,8 @@
|
|||
<field name="order_id" invisible="1"/>
|
||||
<field name="refuse_reason" required="1"/>
|
||||
<footer>
|
||||
<button name="action_refuse" string="Confirm" type="object" class="oe_highlight"/>
|
||||
<button string="Cancel" class="btn btn-default" special="cancel"/>
|
||||
<button name="action_refuse" string="Confirm" type="object" class="btn-secondary"/>
|
||||
<button string="Cancel" class="btn-secondary" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
|||
Loading…
Reference in New Issue