Merge pull request #5465 from expsa/feature/purchase-request-visual-enhancements-20251120-155413
feat: Visual enhancements for purchase.request forms and tree views
This commit is contained in:
commit
66f92079e6
|
|
@ -2946,6 +2946,51 @@ msgstr "نوع الطلب"
|
|||
msgid "Month"
|
||||
msgstr "الشهر"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: model_terms:ir.ui.view,arch_db:purchase_requisition_custom.purchase_request_form
|
||||
msgid "Request 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"
|
||||
msgstr "المورد"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: model_terms:ir.ui.view,arch_db:purchase_requisition_custom.purchase_request_form
|
||||
msgid "Accounting"
|
||||
msgstr "المحاسبة"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: model_terms:ir.ui.view,arch_db:purchase_requisition_custom.purchase_request_form
|
||||
msgid "Enter purchase request justifications..."
|
||||
msgstr "أدخل مبررات طلب الشراء..."
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: model_terms:ir.ui.view,arch_db:purchase_requisition_custom.purchase_request_form
|
||||
msgid "Enter additional notes..."
|
||||
msgstr "أدخل ملاحظات إضافية..."
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: model_terms:ir.ui.view,arch_db:purchase_requisition_custom.purchase_request_form
|
||||
msgid "Suggested vendor for this purchase request"
|
||||
msgstr "المورد المقترح لهذا الطلب"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: model_terms:ir.ui.view,arch_db:purchase_requisition_custom.purchase_request_form
|
||||
msgid "Analytic account for budget tracking"
|
||||
msgstr "الحساب التحليلي لتتبع الموازنة"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: model_terms:ir.ui.view,arch_db:purchase_requisition_custom.purchase_request_form
|
||||
msgid "Request Lines"
|
||||
msgstr "بنود الطلب"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: model_terms:ir.ui.view,arch_db:purchase_requisition_custom.purchase_request_search
|
||||
msgid "Year"
|
||||
|
|
|
|||
|
|
@ -13,31 +13,37 @@
|
|||
type="object"
|
||||
string="Submit"
|
||||
class="oe_highlight"
|
||||
icon="fa-paper-plane"
|
||||
attrs="{'invisible': ['|',('is_creator', '=', False),('state','!=','draft')]}"/>
|
||||
<button name="action_confirm" groups="purchase_requisition_custom.group_direct_manger"
|
||||
type="object" string="Approve" states="direct_manager" class="oe_highlight"/>
|
||||
|
||||
|
||||
type="object" string="Approve" states="direct_manager"
|
||||
class="oe_highlight" icon="fa-check-circle"/>
|
||||
|
||||
<button name="create_requisition"
|
||||
groups="purchase.group_purchase_user,purchase.group_purchase_manager" type="object"
|
||||
string="Create Requisition"
|
||||
class="oe_highlight"
|
||||
icon="fa-file-text-o"
|
||||
attrs="{'invisible' : ['|',('state' , '!=' , 'waiting'),('purchase_create' , '=' , True)]}"/>
|
||||
|
||||
<button name="create_purchase_order2" type="object" string="Create Purchase Order"
|
||||
class="oe_highlight" groups="purchase.group_purchase_user"
|
||||
icon="fa-shopping-cart"
|
||||
attrs="{'invisible' : ['|',('state' , '!=' , 'waiting'),('purchase_create' , '=' , True)]}"/>
|
||||
|
||||
<button name="action_refuse" type="object" string="Refuse" id="prc_request_refuse"
|
||||
groups="purchase_requisition_custom.group_refuse_purchase"
|
||||
class="btn-secondary"
|
||||
icon="fa-times-circle"
|
||||
attrs="{'invisible' : [('state' , 'not in' , ('direct_manager','waiting'))]}"/>
|
||||
|
||||
<button name="action_done" type="object" string="Done" class="oe_stat_button"
|
||||
groups="purchase.group_purchase_manager" states="waiting"/>
|
||||
groups="purchase.group_purchase_manager" states="waiting"
|
||||
icon="fa-check-circle"/>
|
||||
|
||||
<button name="action_draft" type="object" string="Reset To Draft" class="oe_highlight"
|
||||
states="refuse" groups="purchase_requisition_custom.group_purchase_set_to_draft"/>
|
||||
states="refuse" groups="purchase_requisition_custom.group_purchase_set_to_draft"
|
||||
icon="fa-undo"/>
|
||||
|
||||
<field name="state" widget="statusbar"/>
|
||||
|
||||
|
|
@ -47,11 +53,11 @@
|
|||
<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"
|
||||
string="Purchase Agreement" icon="fa-file-text-o"
|
||||
attrs="{'invisible' : [('is_requisition' , '=' , False)]}"
|
||||
groups="purchase.group_purchase_user,purchase.group_purchase_manager"/>
|
||||
<button class="oe_stat_button" name="open_purchase" type="object"
|
||||
string="Purchase Orders" icon="fa-list-ol"
|
||||
string="Purchase Orders" icon="fa-shopping-cart"
|
||||
attrs="{'invisible' : [('purchase_create' , '=' , False)]}"
|
||||
groups="purchase.group_purchase_user,purchase.group_purchase_manager"/>
|
||||
</div>
|
||||
|
|
@ -62,44 +68,50 @@
|
|||
</h1>
|
||||
</div>
|
||||
<group col="4" colspan="3">
|
||||
<field name="by_purchase" groups="purchase.group_purchase_user"/>
|
||||
<group string="Request Information" col="4">
|
||||
<field name="date" readonly="1" widget="date"/>
|
||||
<field name="by_purchase" groups="purchase.group_purchase_user"/>
|
||||
<field name="employee_id" attrs="{'readonly':[('by_purchase' , '=' , False)]}" required="1"
|
||||
options="{'no_create' : True , 'no_edit' : True ,'no_open' : True}"/>
|
||||
<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}"/>
|
||||
</group>
|
||||
<group string="Request Details" col="4">
|
||||
<field name="product_category_ids" widget="many2many_tags"/>
|
||||
<field name="purchase_purpose" required="1"
|
||||
attrs="{'readonly':[('state' , '!=' , 'draft')]}"
|
||||
placeholder="Enter purchase request justifications..."/>
|
||||
</group>
|
||||
<group string="Vendor" col="4">
|
||||
<field name="partner_id"
|
||||
domain="[('supplier_rank','>', 0)]"
|
||||
options="{'no_create' : True , 'no_edit' : True ,'no_open' : True}"
|
||||
attrs="{'readonly':['|',('edit_partner_id' , '=' , False),('state' , '!=' , 'waiting')]}"
|
||||
help="Suggested vendor for this purchase request"/>
|
||||
</group>
|
||||
<group string="Accounting" col="4">
|
||||
<field name="use_analytic"/>
|
||||
<field name="account_analytic_id"
|
||||
options="{'no_create' : True , 'no_edit' : True ,'no_open' : True}"
|
||||
attrs="{'invisible':[('use_analytic' , '=' , False)],'required':[('use_analytic' , '=' , True)],'readonly':[('state' , '!=' , 'draft')]}"
|
||||
help="Analytic account for budget tracking"/>
|
||||
</group>
|
||||
<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}"/>
|
||||
<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')]}"/>
|
||||
<field name="date" readonly="1"/>
|
||||
<field name="purchase_create" invisible="1"/>
|
||||
<field name="partner_id"
|
||||
domain="[('supplier_rank','>', 0)]"
|
||||
options="{'no_create' : True , 'no_edit' : True ,'no_open' : True}"
|
||||
attrs="{'readonly':['|',('edit_partner_id' , '=' , False),('state' , '!=' , 'waiting')]}"/>
|
||||
<!-- <div>-->
|
||||
<!-- <label for="use_analytic"/>-->
|
||||
<field name="use_analytic"/>
|
||||
<field name="account_analytic_id"
|
||||
options="{'no_create' : True , 'no_edit' : True ,'no_open' : True}"
|
||||
attrs="{'invisible':[('use_analytic' , '=' , False)],'required':[('use_analytic' , '=' , True)],'readonly':[('state' , '!=' , 'draft')]}"/>
|
||||
<!-- </div>-->
|
||||
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="edit_partner_id" invisible="1"/>
|
||||
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Items" name="purchase_request_info">
|
||||
<page string="Items" name="purchase_request_info" icon="fa-list">
|
||||
<field name="line_ids" attrs="{'readonly':[('state' , '!=' , 'draft')]}">
|
||||
<tree editable="bottom">
|
||||
<tree editable="bottom" string="Request Lines">
|
||||
<field name="product_id"
|
||||
domain="[('purchase_ok', '=', True)]"
|
||||
options="{'no_create' : True , 'no_edit' : True ,'no_open' : True}"
|
||||
optional="show"
|
||||
required="1"/>
|
||||
required="1"/>
|
||||
|
||||
<field name="uom_id"/>
|
||||
<field name="description"/>
|
||||
|
|
@ -113,8 +125,8 @@
|
|||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Note">
|
||||
<field name="note"/>
|
||||
<page string="Note" icon="fa-sticky-note-o">
|
||||
<field name="note" placeholder="Enter additional notes..."/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
|
|
@ -131,15 +143,21 @@
|
|||
<field name="name">Purchase Request</field>
|
||||
<field name="model">purchase.request</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<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="product_category_ids" widget="many2many_tags"/>
|
||||
<field name="state"/>
|
||||
<field name="purchase_state_summary" optional="show"/>
|
||||
<tree string="Purchase Requests">
|
||||
<field name="name" string="Request Number"/>
|
||||
<field name="date" widget="date" string="Date"/>
|
||||
<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="product_category_ids" widget="many2many_tags" string="Categories"/>
|
||||
<field name="state" string="State"
|
||||
decoration-muted="state == 'draft'"
|
||||
decoration-warning="state in ['direct_manager', 'wait_for_send']"
|
||||
decoration-info="state in ['waiting', 'warehouse', 'initial', 'employee']"
|
||||
decoration-success="state == 'done'"
|
||||
decoration-danger="state in ['cancel', 'refuse']"
|
||||
decoration-bf="state in ['direct_manager', 'waiting', 'done']"/>
|
||||
<field name="purchase_state_summary" optional="show" widget="badge" string="Purchase State"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
|||
Loading…
Reference in New Issue