Merge pull request #5462 from expsa/feature/boolean-fields-labels-20251120-124223

Add String Labels for Boolean Fields in Purchase Forms
This commit is contained in:
Mohamed Eltayar 2025-11-20 12:42:51 +03:00 committed by GitHub
commit 9b01f9fa6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 28 additions and 18 deletions

View File

@ -1991,6 +1991,21 @@ msgstr "معلومات الطلب"
msgid "Status & Tracking"
msgstr "الحالة والمتابعة"
#. module: purchase_requisition_custom
#: model_terms:ir.ui.view,arch_db:purchase_requisition_custom.purchase_order_custom_form_view
msgid "Cash Advance"
msgstr "سلفة نقدية"
#. module: purchase_requisition_custom
#: model_terms:ir.ui.view,arch_db:purchase_requisition_custom.purchase_order_custom_form_view
msgid "Request Reference"
msgstr "مرجع الطلب"
#. module: purchase_requisition_custom
#: model_terms:ir.ui.view,arch_db:purchase_requisition_custom.purchase_order_custom_form_view
msgid "Request Employee"
msgstr "موظف الطلب"
#. module: purchase_requisition_custom
#: model:ir.model.fields,field_description:purchase_requisition_custom.field_change_purchase_user_state__requisition_id
msgid "Requisition"

View File

@ -71,17 +71,17 @@
</h1>
</div>
<group col="4" colspan="3">
<field name="by_purchase" groups="purchase.group_purchase_user"/>
<field name="by_purchase" string="Requested by Purchase" groups="purchase.group_purchase_user"/>
<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"/>
<field name="branch_id" readonly="1"/>
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')]}" placeholder="Request Purpose..."/>
attrs="{'readonly':[('state' , '!=' , 'draft')]}"/>
<field name="date" readonly="1"/>
<field name="purchase_create" invisible="1"/>
<field name="partner_id"
@ -90,7 +90,7 @@
attrs="{'readonly':['|',('edit_partner_id' , '=' , False),('state' , '!=' , 'waiting')]}"/>
<!-- <div>-->
<!-- <label for="use_analytic"/>-->
<field name="use_analytic"/>
<field name="use_analytic" string="Use Analytic Account"/>
<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')]}"/>

View File

@ -297,20 +297,15 @@
<attribute name="attrs">{'readonly':[('state','in',('done','cancel','waiting'))]}</attribute>
</xpath>
<xpath expr="//field[@name='currency_id']" position="after">
<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 &amp; 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"