[IMP] various: add page name on html fields to ease finding them

-> This commit add/change the name of the page corresponding to the string
   attribute because To be able to detect a field, Knowledge needs to be able to
   read its page name.

For more reference: Task-3501211

Task-3524474

closes odoo/odoo#137428

Related: odoo/enterprise#48315
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
adsh-odoo
2023-10-30 09:00:56 +00:00
parent 1306635db8
commit b3542480ab
28 changed files with 38 additions and 34 deletions
@@ -96,7 +96,7 @@
</group>
</group>
</page>
<page id="inbound_payment_settings" string="Incoming Payments" invisible="type not in ['cash', 'bank']">
<page id="inbound_payment_settings" string="Incoming Payments" name="page_incoming_payments" invisible="type not in ['cash', 'bank']">
<field name="available_payment_method_ids" invisible="1"/>
<field name="inbound_payment_method_line_ids" nolabel="1" context="{'default_payment_type': 'inbound'}">
<tree string="Payment Methods" editable="bottom">
@@ -115,7 +115,7 @@
</tree>
</field>
</page>
<page id="outbound_payment_settings" string="Outgoing Payments" invisible="type not in ['cash', 'bank']">
<page id="outbound_payment_settings" string="Outgoing Payments" name="page_outgoing_payments" invisible="type not in ['cash', 'bank']">
<field name="outbound_payment_method_line_ids" nolabel="1" context="{'default_payment_type': 'outbound'}">
<tree string="Payment Methods" editable="bottom" nolabel="1">
<field name="available_payment_method_ids" column_invisible="True"/>
+1 -1
View File
@@ -74,7 +74,7 @@
<field name="date" invisible="1"/>
<field name="analytic_line_ids" context="{'tree_view_ref':'analytic.view_account_analytic_line_tree', 'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}"/>
</page>
<page string="Accounting documents">
<page string="Accounting documents" name="page_accounting_documents">
<label for="move_id" string="Journal Entry"/>
<field name="move_id" readonly="1" nolabel="1"/>
<group readonly="1" invisible="not statement_line_id">
@@ -87,7 +87,7 @@
</group>
</group>
<notebook>
<page id="conditions_tab" string="Bank Transactions Conditions">
<page id="conditions_tab" string="Bank Transactions Conditions" name="page_bank_transactions_conditions">
<group id="conditions_tab_group">
<group id="left_column" class="col-6">
<label for="match_journal_ids"/>
@@ -210,6 +210,7 @@
</page>
<page id="partner_tab"
string="Partner Mapping"
name="page_partner_mapping"
invisible="rule_type not in ('invoice_matching', 'writeoff_suggestion')">
<field name="partner_mapping_line_ids"
nolabel="1">
@@ -121,6 +121,7 @@
<xpath expr="//page[@id='other_tab']" position="after">
<page id="edi_documents"
string="EDI Documents"
name="page_edi_documents"
groups="base.group_no_one"
invisible="not edi_document_ids">
<field name="edi_document_ids">
+1 -1
View File
@@ -30,7 +30,7 @@
</group>
<notebook>
<page string="Tickets">
<page string="Tickets" name="page_tickets">
<field name="event_type_ticket_ids"
class="w-100"
context="{
@@ -7,7 +7,7 @@
<field name="inherit_id" ref="event.view_event_type_form"/>
<field name="arch" type="xml">
<page name="event_type_communication" position="after">
<page string="Booths">
<page string="Booths" name="page_booths">
<field name="event_type_booth_ids"
class="w-100"
context="{
@@ -36,7 +36,7 @@
</group>
<xpath expr="//sheet" position="inside">
<notebook groups="base.group_no_one">
<page string="Registrations">
<page string="Registrations" name="page_registrations">
<field name="event_booth_registration_ids" readonly="1"/>
</page>
</notebook>
+2 -2
View File
@@ -113,7 +113,7 @@
</group>
<field name="vehicle_properties" columns="2"/>
<notebook>
<page string="Tax Info">
<page string="Tax Info" name="page_tax_info">
<group>
<group col="1" name="fiscality_group" string="Fiscality">
<group col="1" name="fiscality_first_group">
@@ -128,7 +128,7 @@
</group>
</group>
</page>
<page string="Model">
<page string="Model" name="page_model">
<group>
<group string="Model">
<field name="model_year"/>
@@ -30,7 +30,7 @@
<xpath expr="//notebook/page[@name='description_page']" position="after">
<field name="analytic_account_active" invisible="1"/>
<field name="allow_timesheets" invisible="1"/>
<page string="Timesheets" id="timesheets_tab" invisible="not allow_timesheets">
<page string="Timesheets" name="page_timesheets" id="timesheets_tab" invisible="not allow_timesheets">
<field name="timesheet_ids" mode="tree,kanban"
invisible="not analytic_account_active">
<tree string="Timesheet Activities" default_order="date" no_open="1" create="false" delete="0">
@@ -32,7 +32,7 @@
<t groups="hr_timesheet.group_hr_timesheet_user">
<field name="analytic_account_active" invisible="1"/>
</t>
<page string="Timesheets" id="timesheets_tab" invisible="not allow_timesheets" groups="hr_timesheet.group_hr_timesheet_user">
<page string="Timesheets" name="page_timesheets" id="timesheets_tab" invisible="not allow_timesheets" groups="hr_timesheet.group_hr_timesheet_user">
<group name="timesheet_error" invisible="analytic_account_active">
<div class="alert alert-warning mb-n4 mt-3" role="alert" colspan="2">
You cannot log timesheets on this project since it is linked to an inactive analytic account. Please change this account, or reactivate the current one to timesheet on the project.
@@ -33,7 +33,7 @@
<h1><field name="title" default_focus="1" placeholder='e.g. "Meeting Scheduler Bot"'/></h1>
</div>
<notebook>
<page string="Script">
<page string="Script" name="page_script">
<field name="script_step_ids" widget="chatbot_steps_one2many" nolabel="1"
context="{'chatbot_script_answer_display_short_name': 1}"/>
</page>
@@ -25,7 +25,7 @@
invisible="country_code != 'EG' or l10n_eg_is_signed or state != 'posted'"/>
</xpath>
<notebook position="inside">
<page string="ETA E-Invoice" invisible="country_code != 'EG'">
<page string="ETA E-Invoice" name="page_eta_e_invoice" invisible="country_code != 'EG'">
<group>
<group>
<field name="l10n_eg_uuid" readonly="1"/>
@@ -18,7 +18,7 @@
<field name="l10n_ke_cu_invoice_number" readonly="1" invisible="country_code != 'KE'"/>
</xpath>
<notebook position="inside">
<page string="Tremol GO3 Fiscal Device" invisible="country_code != 'KE'">
<page string="Tremol GO3 Fiscal Device" name="page_tremol_go3_fiscal_device" invisible="country_code != 'KE'">
<group>
<group>
<field name="l10n_ke_cu_qrcode" widget="url" readonly="1"/>
+1 -1
View File
@@ -6,7 +6,7 @@
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<notebook position="inside">
<page id="pl_extra" string="PL Extra" invisible="move_type not in ('out_invoice', 'out_refund')">
<page id="pl_extra" string="PL Extra" name="page_pl_extra" invisible="move_type not in ('out_invoice', 'out_refund')">
<group>
<group>
<field name="l10n_pl_vat_b_spv_dostawa" readonly="state != 'draft'"/>
@@ -35,7 +35,7 @@
</group>
</group>
<notebook colspan="4">
<page string="Volume per partner">
<page string="Volume per partner" name="page_volume_per_partner">
<field name="volume_settings_ids">
<tree editable="bottom">
<field name="partner_id"/>
@@ -55,7 +55,7 @@
</group>
</div>
<notebook invisible="composition_mode != 'mass_mail'">
<page string="Content">
<page string="Content" name="page_content">
<div>
<field name="body" class="oe-bordered-editor" placeholder="Write your message here..." options="{'style-inline': true}" readonly="not can_edit_body" force_save="1"/>
<group>
@@ -67,7 +67,7 @@
</group>
</div>
</page>
<page string="Settings">
<page string="Settings" name="page_settings">
<!-- mass mailing -->
<field name="reply_to_force_new" invisible="1"/>
<field name="reply_to_mode" invisible="composition_mode != 'mass_mail'" widget="radio"/>
+3 -3
View File
@@ -11,17 +11,17 @@
<field name="name"/>
</group>
<notebook>
<page string="Product Templates">
<page string="Product Templates" name="page_product_templates">
<field name="product_template_ids"
context="{'tree_view_ref':'product.product_template_view_tree_tag'}"
/>
</page>
<page string="Product Variants">
<page string="Product Variants" name="page_product_variants">
<field name="product_product_ids"
context="{'tree_view_ref':'product.product_product_view_tree_tag'}"
/>
</page>
<page string="All Products" invisible="not product_ids">
<page string="All Products" name="page_all_products" invisible="not product_ids">
<field name="product_ids"
context="{'tree_view_ref':'product.product_product_view_tree_tag'}"
/>
@@ -35,7 +35,7 @@
<field name="inherit_id" ref="stock.view_stock_replenishment_info"/>
<field name="arch" type="xml">
<xpath expr="//page" position="before">
<page string="Vendors">
<page string="Vendors" name="page_vendors">
<field name="supplierinfo_id" invisible="1"/>
<field name="supplierinfo_ids" readonly="1" context="{'tree_view_ref': 'purchase_stock.product_supplierinfo_replenishment_tree_view', 'stock_replenishment_info_id': id, 'orderpoint_id': orderpoint_id}"/>
</page>
+1 -1
View File
@@ -182,7 +182,7 @@
<page string="Repair Notes" name="repair_notes">
<field name="internal_notes" placeholder="Add internal notes."/>
</page>
<page string="Miscellaneous">
<page string="Miscellaneous" name="page_miscellaneous">
<group>
<field name="picking_type_id" options="{'no_create': True}" readonly="state != 'draft'"/>
</group>
@@ -17,7 +17,7 @@
</group>
<notebook>
<field name="warehouseinfo_ids" invisible="1"/>
<page string="Warehouses" invisible="not warehouseinfo_ids">
<page string="Warehouses" name="page_warehouses" invisible="not warehouseinfo_ids">
<field name="wh_replenishment_option_ids"/>
</page>
</notebook>
@@ -112,14 +112,14 @@
</group>
</group>
<notebook>
<page string="Detailed Operations" invisible="state == 'draft'">
<page string="Detailed Operations" name="page_detailed_operations" invisible="state == 'draft'">
<field name="move_line_ids" context="{'tree_view_ref': 'stock_picking_batch.view_move_line_tree'}" readonly="state not in ['draft', 'in_progress']"/>
<button class="oe_highlight" name="action_put_in_pack" type="object" string="Put in Pack" invisible="state in ('draft', 'done', 'cancel')" groups="stock.group_tracking_lot"/>
</page>
<page string="Operations" invisible="state == 'draft'">
<page string="Operations" name="page_operations" invisible="state == 'draft'">
<field name="move_ids" context="{'tree_view_ref': 'stock_picking_batch.view_picking_move_tree_inherited'}"/>
</page>
<page string="Transfers">
<page string="Transfers" name="page_transfers">
<field name="allowed_picking_ids" invisible="1"/>
<field name="picking_ids" widget="many2many" mode="tree,kanban"
context="{'form_view_ref': 'stock_picking_batch.view_picking_form_inherited'}" readonly="state not in ['draft', 'in_progress']"/>
+1 -1
View File
@@ -87,7 +87,7 @@
</group>
</group>
<notebook>
<page string="Answers">
<page string="Answers" name="page_answers">
<field name="user_input_line_ids" mode="tree" readonly="True" no_label="1">
<tree decoration-muted="skipped == True">
<field name="question_sequence" column_invisible="True"/>
+2 -2
View File
@@ -34,14 +34,14 @@
<field name="arch" type="xml">
<form>
<notebook>
<page string="Name">
<page string="Name" name="page_name">
<group class="mt-4">
<field name="name" string="Page Name" placeholder="e.g. Home Page"/>
<field name="website_id" invisible="1"/>
<field name="url" string="Page URL" widget="page_url"/>
</group>
</page>
<page string="Publish">
<page string="Publish" name="page_publish">
<group class="mt-4">
<field name="is_in_menu" string="Show in Top Menu" widget="boolean_toggle"/>
<field name="is_homepage" string="Use as Homepage" widget="boolean_toggle"/>
+1 -1
View File
@@ -35,7 +35,7 @@
invisible="language_count &lt;= 1"/>
</group>
<notebook>
<page string="Custom Code" groups="base.group_no_one">
<page string="Custom Code" name="page_custom_code" groups="base.group_no_one">
<label for="custom_code_head"/>
<field name="custom_code_head" widget="code" options="{'mode': 'xml'}"/>
@@ -21,7 +21,7 @@
</span>
</xpath>
<page name="event_type_communication" position="after">
<page string="Questions">
<page string="Questions" name="page_questions">
<field name="question_ids" class="w-100">
<tree sample="1">
<field name="title"/>
@@ -118,11 +118,13 @@
</group>
<notebook>
<page string="Description"
name="page_description"
invisible="exhibitor_type == 'sponsor'">
<field name="website_description" nolabel="1" options="{'noVideos': False}"
placeholder='e.g. "Openwood specializes in home decoration..."'/>
</page>
<page string="Online"
name="page_online"
invisible="exhibitor_type != 'online'">
<group>
<group>
+1 -1
View File
@@ -7,7 +7,7 @@
<field name="inherit_id" ref="website.view_website_form"/>
<field name="arch" type="xml">
<notebook position="inside">
<page string="Product Page Extra Fields" groups="base.group_no_one">
<page string="Product Page Extra Fields" name="page_product_page_extra_fields" groups="base.group_no_one">
<field name="shop_extra_field_ids" context="{'default_website_id': id}">
<tree editable="bottom">
<field name="sequence" widget="handle"/>
+1 -1
View File
@@ -463,7 +463,7 @@
</group>
<group name="preference_contact"></group>
</page>
<page string="Account Security">
<page string="Account Security" name="page_account_security">
<group name="auth" string="Password Management">
<div colspan="2">
<button name="preference_change_password" type="object" string="Change password" class="btn btn-secondary"/>