[IMP] base: remove groups_id from ir.ui.view
The goal of this revision is to get rid of the `groups_id` field of the model `ir.ui.view`. - This feature wasn't really known or used by most developers, and not straight-forward to understand. Removing it allows one less complicated thing to learn for developers. Besides, thanks to odoo/odoo#95729, changing the behavior of the `groups=` attribute, we can easily get rid of this `groups_id` feature by simply adding `groups=` in the elements of the views using the `groups_id` field, it will have the same effect: adding the elements in the view only for the users part of the specified group. - By getting rid of the groups_id many2many field on ir.ui.view, it makes possible to cache the view architecture without requiring to use the groups in the cache key. Currently, if we want to cache the view architecture, it would be required to use the intersection of the user groups with the groups_id groups of the view, making it costly to compute the cache key, therefore altering the performance point to cache the view architectures. Part-of: odoo/odoo#98551
This commit is contained in:
@@ -132,10 +132,9 @@
|
||||
<field name="name">account.invoice.report.search_analytic_accounting</field>
|
||||
<field name="model">account.invoice.report</field>
|
||||
<field name="inherit_id" ref="account.view_account_invoice_report_search"/>
|
||||
<field name="groups_id" eval="[(4, ref('analytic.group_analytic_accounting'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<filter name="status" position="after">
|
||||
<filter string="Analytic Account" name="analytic_account_id" context="{'group_by':'analytic_account_id'}"/>
|
||||
<filter string="Analytic Account" name="analytic_account_id" context="{'group_by':'analytic_account_id'}" groups="analytic.group_analytic_accounting"/>
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -142,10 +142,10 @@
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form" />
|
||||
<field name="priority" eval="11"/>
|
||||
<field name="groups_id" eval="[(4, ref('account.group_account_invoice')), (4, ref('account.group_account_readonly'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box" position="inside">
|
||||
<button type="object" class="oe_stat_button" icon="fa-pencil-square-o" name="action_view_partner_invoices"
|
||||
groups="account.group_account_invoice,account.group_account_readonly"
|
||||
context="{'default_partner_id': active_id}">
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
@@ -158,12 +158,14 @@
|
||||
</div>
|
||||
|
||||
<page name="internal_notes" position="inside">
|
||||
<group colspan="2" col="2" groups="account.group_warning_account">
|
||||
<separator string="Warning on the Invoice" colspan="4"/>
|
||||
<field name="invoice_warn" nolabel="1" />
|
||||
<field name="invoice_warn_msg" colspan="3" nolabel="1"
|
||||
attrs="{'required':[('invoice_warn','!=', False), ('invoice_warn','!=','no-message')], 'invisible':[('invoice_warn','in',(False,'no-message'))]}"/>
|
||||
</group>
|
||||
<t groups="account.group_account_invoice,account.group_account_readonly">
|
||||
<group colspan="2" col="2" groups="account.group_warning_account">
|
||||
<separator string="Warning on the Invoice" colspan="4"/>
|
||||
<field name="invoice_warn" nolabel="1" />
|
||||
<field name="invoice_warn_msg" colspan="3" nolabel="1"
|
||||
attrs="{'required':[('invoice_warn','!=', False), ('invoice_warn','!=','no-message')], 'invisible':[('invoice_warn','in',(False,'no-message'))]}"/>
|
||||
</group>
|
||||
</t>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
@@ -189,7 +191,6 @@
|
||||
<field name="model">res.partner</field>
|
||||
<field name="priority">2</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="groups_id" eval="[(5,)]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//sheet" position="before">
|
||||
<div groups="account.group_account_invoice,account.group_account_readonly" class="alert alert-warning" role="alert" style="margin-bottom:0px;"
|
||||
|
||||
@@ -17,10 +17,9 @@
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="40"/>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
|
||||
<field name="groups_id" eval="[(4, ref('account.group_account_manager'), 0)]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
<field name="country_code" invisible="1"/>
|
||||
<field name="country_code" invisible="1" groups="account.group_account_manager"/>
|
||||
<div class="app_settings_block" data-string="Invoicing" string="Invoicing" data-key="account" groups="account.group_account_manager">
|
||||
<field name="has_chart_of_accounts" invisible="1"/>
|
||||
<field name="has_accounting_entries" invisible="1"/>
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="5"/>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
|
||||
<field name="groups_id" eval="[(4, ref('sales_team.group_sale_manager'), 0)]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
<div class="app_settings_block" data-string="CRM" string="CRM" data-key="crm" groups="sales_team.group_sale_manager">
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.res_partner_kanban_view"/>
|
||||
<field name="priority" eval="10"/>
|
||||
<field name="groups_id" eval="[(4, ref('sales_team.group_sale_salesman'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="mobile" position="after">
|
||||
<field name="opportunity_count"/>
|
||||
<field name="opportunity_count" groups="sales_team.group_sale_salesman"/>
|
||||
</field>
|
||||
<xpath expr="//div[hasclass('oe_kanban_bottom_left')]" position="inside">
|
||||
<a t-if="record.opportunity_count.value>0" href="#"
|
||||
groups="sales_team.group_sale_salesman"
|
||||
data-type="object" data-name="action_view_opportunity"
|
||||
class="oe_kanban_action oe_kanban_action_a me-1">
|
||||
<span class="badge rounded-pill">
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="65"/>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
|
||||
<field name="groups_id" eval="[(4, ref('event.group_event_manager'), 0)]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
<div class="app_settings_block" data-string="Events" string="Events" data-key="event" groups="event.group_event_manager">
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
<field name="name">view.res.partner.form.event.inherited</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="groups_id" eval="[(5,)]"/>
|
||||
<field name="priority" eval="6"/>
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box" position="inside">
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="90"/>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
|
||||
<field name="groups_id" eval="[(4, ref('fleet.fleet_group_manager'), 0)]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
<div class="app_settings_block" data-string="Fleet" id="fleet" string="Fleet" data-key="fleet" groups="fleet.fleet_group_manager">
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="70"/>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
|
||||
<field name="groups_id" eval="[(4, ref('hr.group_hr_manager'), 0)]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
<div class="app_settings_block" data-string="Employees" string="Employees" data-key="hr" groups="hr.group_hr_manager">
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
<field name="name">hr.department.kanban.inherit</field>
|
||||
<field name="model">hr.department</field>
|
||||
<field name="inherit_id" ref="hr.hr_department_view_kanban"/>
|
||||
<field name="groups_id" eval="[(4,ref('hr_attendance.group_hr_attendance_user'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<xpath expr="//div[hasclass('o_kanban_manage_reports')]" position="inside">
|
||||
<a role="menuitem" class="dropdown-item" name="%(hr_attendance_report_action_filtered)d" type="action">
|
||||
<a role="menuitem" class="dropdown-item" name="%(hr_attendance_report_action_filtered)d" type="action" groups="hr_attendance.group_hr_attendance_user">
|
||||
Attendances
|
||||
</a>
|
||||
</xpath>
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="80"/>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
|
||||
<field name="groups_id" eval="[(4, ref('hr_attendance.group_hr_attendance_manager'), 0)]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
<div class="app_settings_block" data-string="Attendances" string="Attendances" data-key="hr_attendance" groups="hr_attendance.group_hr_attendance_manager">
|
||||
|
||||
@@ -4,15 +4,14 @@
|
||||
<field name="name">hr.department.kanban.inherit</field>
|
||||
<field name="model">hr.department</field>
|
||||
<field name="inherit_id" ref="hr.hr_department_view_kanban"/>
|
||||
<field name="groups_id" eval="[(4,ref('hr_expense.group_hr_expense_team_approver'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<xpath expr="//templates" position="before">
|
||||
<field name="expense_sheets_to_approve_count"/>
|
||||
<field name="expense_sheets_to_approve_count" groups="hr_expense.group_hr_expense_team_approver"/>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//div[hasclass('o_kanban_primary_right')]" position="inside">
|
||||
<div t-if="record.expense_sheets_to_approve_count.raw_value > 0" class="row ml16">
|
||||
<div t-if="record.expense_sheets_to_approve_count.raw_value > 0" class="row ml16" groups="hr_expense.group_hr_expense_team_approver">
|
||||
<div class="col">
|
||||
<a name="%(action_hr_expense_sheet_department_to_approve)d" type="action">
|
||||
<t t-esc="record.expense_sheets_to_approve_count.raw_value"/> Expense Reports
|
||||
@@ -22,7 +21,7 @@
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//div[hasclass('o_kanban_manage_reports')]" position="inside">
|
||||
<a role="menuitem" class="dropdown-item" name="%(action_hr_expense_sheet_department_filtered)d" type="action">
|
||||
<a role="menuitem" class="dropdown-item" name="%(action_hr_expense_sheet_department_filtered)d" type="action" groups="hr_expense.group_hr_expense_team_approver">
|
||||
Expenses
|
||||
</a>
|
||||
</xpath>
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="85"/>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
|
||||
<field name="groups_id" eval="[(4, ref('hr_expense.group_hr_expense_manager'), 0)]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
<div class="app_settings_block" data-string="Expenses" string="Expenses" data-key="hr_expense" groups="hr_expense.group_hr_expense_manager">
|
||||
|
||||
@@ -18,46 +18,51 @@
|
||||
<field name="name">hr.department.kanban.inherit</field>
|
||||
<field name="model">hr.department</field>
|
||||
<field name="inherit_id" ref="hr.hr_department_view_kanban"/>
|
||||
<field name="groups_id" eval="[(4,ref('hr_holidays.group_hr_holidays_user'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<xpath expr="//templates" position="before">
|
||||
<field name="leave_to_approve_count"/>
|
||||
<field name="allocation_to_approve_count"/>
|
||||
<field name="total_employee"/>
|
||||
<field name="absence_of_today"/>
|
||||
<t groups="hr_holidays.group_hr_holidays_user">
|
||||
<field name="leave_to_approve_count"/>
|
||||
<field name="allocation_to_approve_count"/>
|
||||
<field name="total_employee"/>
|
||||
<field name="absence_of_today"/>
|
||||
</t>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//div[hasclass('o_kanban_primary_right')]" position="inside">
|
||||
<div t-if="record.leave_to_approve_count.raw_value > 0" class="row ml16">
|
||||
<div class="col">
|
||||
<a name="%(hr_leave_action_action_approve_department)d" type="action">
|
||||
<field name="leave_to_approve_count"/> Time Off Requests
|
||||
</a>
|
||||
<t groups="hr_holidays.group_hr_holidays_user">
|
||||
<div t-if="record.leave_to_approve_count.raw_value > 0" class="row ml16">
|
||||
<div class="col">
|
||||
<a name="%(hr_leave_action_action_approve_department)d" type="action">
|
||||
<field name="leave_to_approve_count"/> Time Off Requests
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div t-if="record.allocation_to_approve_count.raw_value > 0" class="row ml16">
|
||||
<div class="col">
|
||||
<a name="%(hr_leave_allocation_action_approve_department)d" type="action">
|
||||
<field name="allocation_to_approve_count"/> Allocation Requests
|
||||
</a>
|
||||
<div t-if="record.allocation_to_approve_count.raw_value > 0" class="row ml16">
|
||||
<div class="col">
|
||||
<a name="%(hr_leave_allocation_action_approve_department)d" type="action">
|
||||
<field name="allocation_to_approve_count"/> Allocation Requests
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//div[hasclass('o_kanban_card_upper_content')]" position="after">
|
||||
<div class="row o_kanban_primary_bottom bottom_block">
|
||||
<div class="col-3">
|
||||
<a name="%(hr_employee_action_from_department)d" type="action" title="Absent Employee(s), Whose time off requests are either confirmed or validated on today">Absence</a>
|
||||
<t groups="hr_holidays.group_hr_holidays_user">
|
||||
<div class="row o_kanban_primary_bottom bottom_block">
|
||||
<div class="col-3">
|
||||
<a name="%(hr_employee_action_from_department)d" type="action" title="Absent Employee(s), Whose time off requests are either confirmed or validated on today">Absence</a>
|
||||
</div>
|
||||
<div class="col-9">
|
||||
<field name="absence_of_today" widget="progressbar" options="{'current_value': 'absence_of_today', 'max_value': 'total_employee', 'editable': false}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-9">
|
||||
<field name="absence_of_today" widget="progressbar" options="{'current_value': 'absence_of_today', 'max_value': 'total_employee', 'editable': false}"/>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//div[hasclass('o_kanban_manage_reports')]" position="inside">
|
||||
<a role="menuitem" class="dropdown-item" name="%(hr_leave_action_action_department)d" type="action">
|
||||
<a role="menuitem" class="dropdown-item" name="%(hr_leave_action_action_department)d" type="action" groups="hr_holidays.group_hr_holidays_user">
|
||||
Time Off
|
||||
</a>
|
||||
</xpath>
|
||||
|
||||
@@ -4,10 +4,9 @@
|
||||
<field name="name">hr.employee.view.search</field>
|
||||
<field name="model">hr.employee</field>
|
||||
<field name="inherit_id" ref="hr.view_employee_filter"/>
|
||||
<field name="groups_id" eval="[(4, ref('hr.group_hr_manager'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<filter name="group_manager" position="after">
|
||||
<filter name="group_hr_presence_state" string="Presence" domain="[]" context="{'group_by':'hr_presence_state_display'}"/>
|
||||
<filter name="group_hr_presence_state" string="Presence" domain="[]" context="{'group_by':'hr_presence_state_display'}" groups="hr.group_hr_manager"/>
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -4,27 +4,31 @@
|
||||
<field name="name">hr.department.kanban.inherit</field>
|
||||
<field name="model">hr.department</field>
|
||||
<field name="inherit_id" ref="hr.hr_department_view_kanban"/>
|
||||
<field name="groups_id" eval="[(4,ref('hr_recruitment.group_hr_recruitment_user'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<xpath expr="//templates" position="before">
|
||||
<field name="new_applicant_count"/>
|
||||
<field name="new_hired_employee"/>
|
||||
<field name="expected_employee"/>
|
||||
<t groups="hr_recruitment.group_hr_recruitment_user">
|
||||
<field name="new_applicant_count"/>
|
||||
<field name="new_hired_employee"/>
|
||||
<field name="expected_employee"/>
|
||||
</t>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//div[hasclass('o_kanban_primary_right')]" position="inside">
|
||||
<div t-if="record.new_applicant_count.raw_value > 0" class="row ml16">
|
||||
<div class="col">
|
||||
<a name="%(hr_applicant_action_from_department)d" type="action">
|
||||
<field name="new_applicant_count"/> New Applicants
|
||||
</a>
|
||||
<t t-groups="hr_recruitment.group_hr_recruitment_user">
|
||||
<div t-if="record.new_applicant_count.raw_value > 0" class="row ml16">
|
||||
<div class="col">
|
||||
<a name="%(hr_applicant_action_from_department)d" type="action">
|
||||
<field name="new_applicant_count"/> New Applicants
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//div[hasclass('o_kanban_manage_reports')]" position="inside">
|
||||
<a role="menuitem" class="dropdown-item" name="%(action_hr_recruitment_report_filtered_department)d" type="action">
|
||||
<a role="menuitem" class="dropdown-item" name="%(action_hr_recruitment_report_filtered_department)d"
|
||||
type="action" groups="hr_recruitment.group_hr_recruitment_user">
|
||||
Recruitments
|
||||
</a>
|
||||
</xpath>
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="75"/>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
|
||||
<field name="groups_id" eval="[(4, ref('hr_recruitment.group_hr_recruitment_manager'), 0)]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
<div class="app_settings_block" data-string="Recruitment" string="Recruitment" data-key="hr_recruitment" groups="hr_recruitment.group_hr_recruitment_manager">
|
||||
|
||||
@@ -57,11 +57,12 @@
|
||||
<field name="name">hr.department.kanban.inherit</field>
|
||||
<field name="model">hr.department</field>
|
||||
<field name="inherit_id" ref="hr.hr_department_view_kanban"/>
|
||||
<field name="groups_id" eval="[(4,ref('hr_timesheet.group_timesheet_manager'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<xpath expr="//div[hasclass('o_kanban_manage_reports')]" position="inside">
|
||||
<a name="%(act_hr_timesheet_report)d" type="action" context="{ 'search_default_department_id': [active_id], 'default_department_id': active_id}">
|
||||
<a name="%(act_hr_timesheet_report)d" type="action"
|
||||
groups="hr_timesheet.group_timesheet_manager"
|
||||
context="{ 'search_default_department_id': [active_id], 'default_department_id': active_id}">
|
||||
Timesheets
|
||||
</a>
|
||||
</xpath>
|
||||
|
||||
@@ -109,23 +109,24 @@
|
||||
<field name="name">project.task.form.inherited</field>
|
||||
<field name="model">project.task</field>
|
||||
<field name="inherit_id" ref="project.view_task_form2" />
|
||||
<field name="groups_id" eval="[(6,0, (ref('hr_timesheet.group_hr_timesheet_user'),))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='child_ids']/tree/field[@name='company_id']" position="after">
|
||||
<field name="planned_hours" widget="timesheet_uom_no_toggle" sum="Initially Planned Hours" optional="hide"/>
|
||||
<field name="effective_hours" widget="timesheet_uom" sum="Effective Hours" optional="hide"/>
|
||||
<field name="subtask_effective_hours" string="Sub-tasks Hours Spent" widget="timesheet_uom" sum="Sub-tasks Hours Spent" optional="hide"/>
|
||||
<field name="total_hours_spent" string="Total Hours" widget="timesheet_uom" sum="Total Hours" optional="hide"/>
|
||||
<field name="remaining_hours" widget="timesheet_uom" sum="Remaining Hours" optional="hide" decoration-danger="progress >= 100" decoration-warning="progress >= 80 and progress < 100"/>
|
||||
<field name="progress" widget="progressbar" optional="hide"/>
|
||||
<field name="planned_hours" widget="timesheet_uom_no_toggle" sum="Initially Planned Hours" optional="hide" groups="hr_timesheet.group_hr_timesheet_user"/>
|
||||
<field name="effective_hours" widget="timesheet_uom" sum="Effective Hours" optional="hide" groups="hr_timesheet.group_hr_timesheet_user"/>
|
||||
<field name="subtask_effective_hours" string="Sub-tasks Hours Spent" widget="timesheet_uom" sum="Sub-tasks Hours Spent" optional="hide" groups="hr_timesheet.group_hr_timesheet_user"/>
|
||||
<field name="total_hours_spent" string="Total Hours" widget="timesheet_uom" sum="Total Hours" optional="hide" groups="hr_timesheet.group_hr_timesheet_user"/>
|
||||
<field name="remaining_hours" widget="timesheet_uom" sum="Remaining Hours" optional="hide" decoration-danger="progress >= 100" decoration-warning="progress >= 80 and progress < 100" groups="hr_timesheet.group_hr_timesheet_user"/>
|
||||
<field name="progress" widget="progressbar" optional="hide" groups="hr_timesheet.group_hr_timesheet_user"/>
|
||||
</xpath>
|
||||
<xpath expr="//notebook/page[@name='description_page']" position="after">
|
||||
<field name="analytic_account_active" invisible="1"/>
|
||||
<field name="allow_timesheets" invisible="1"/>
|
||||
<field name="allow_subtasks" invisible="1"/>
|
||||
<field name="encode_uom_in_days" invisible="1"/>
|
||||
<field name="subtask_count" invisible="1"/>
|
||||
<page string="Timesheets" id="timesheets_tab" attrs="{'invisible': [('allow_timesheets', '=', False)]}">
|
||||
<t groups="hr_timesheet.group_hr_timesheet_user">
|
||||
<field name="analytic_account_active" invisible="1"/>
|
||||
<field name="encode_uom_in_days" invisible="1"/>
|
||||
<field name="subtask_count" invisible="1"/>
|
||||
</t>
|
||||
<page string="Timesheets" id="timesheets_tab" attrs="{'invisible': [('allow_timesheets', '=', False)]}" groups="hr_timesheet.group_hr_timesheet_user">
|
||||
<group>
|
||||
<group>
|
||||
<div class="o_td_label">
|
||||
@@ -242,13 +243,13 @@
|
||||
</page>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='depend_on_ids']/tree//field[@name='company_id']" position="after">
|
||||
<field name="allow_subtasks" invisible="1" />
|
||||
<field name="progress" invisible="1"/>
|
||||
<field name="planned_hours" widget="timesheet_uom_no_toggle" sum="Initially Planned Hours" optional="hide"/>
|
||||
<field name="effective_hours" widget="timesheet_uom" sum="Effective Hours" optional="hide"/>
|
||||
<field name="subtask_effective_hours" widget="timesheet_uom" attrs="{'invisible' : [('allow_subtasks', '=', False)]}" optional="hide"/>
|
||||
<field name="total_hours_spent" widget="timesheet_uom" attrs="{'invisible' : [('allow_subtasks', '=', False)]}" optional="hide"/>
|
||||
<field name="remaining_hours" widget="timesheet_uom" sum="Remaining Hours" optional="hide" decoration-danger="progress >= 100" decoration-warning="progress >= 80 and progress < 100"/>
|
||||
<field name="allow_subtasks" invisible="1" groups="hr_timesheet.group_hr_timesheet_user"/>
|
||||
<field name="progress" invisible="1" groups="hr_timesheet.group_hr_timesheet_user"/>
|
||||
<field name="planned_hours" widget="timesheet_uom_no_toggle" sum="Initially Planned Hours" optional="hide" groups="hr_timesheet.group_hr_timesheet_user"/>
|
||||
<field name="effective_hours" widget="timesheet_uom" sum="Effective Hours" optional="hide" groups="hr_timesheet.group_hr_timesheet_user"/>
|
||||
<field name="subtask_effective_hours" widget="timesheet_uom" attrs="{'invisible' : [('allow_subtasks', '=', False)]}" optional="hide" groups="hr_timesheet.group_hr_timesheet_user"/>
|
||||
<field name="total_hours_spent" widget="timesheet_uom" attrs="{'invisible' : [('allow_subtasks', '=', False)]}" optional="hide" groups="hr_timesheet.group_hr_timesheet_user"/>
|
||||
<field name="remaining_hours" widget="timesheet_uom" sum="Remaining Hours" optional="hide" decoration-danger="progress >= 100" decoration-warning="progress >= 80 and progress < 100" groups="hr_timesheet.group_hr_timesheet_user"/>
|
||||
<field name="progress" widget="progressbar" optional="hide" groups="hr_timesheet.group_hr_timesheet_user"/>
|
||||
</xpath>
|
||||
</field>
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="55"/>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
|
||||
<field name="groups_id" eval="[(4, ref('hr_timesheet.group_timesheet_manager'), 0)]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
<div class="app_settings_block" data-string="Timesheets" string="Timesheets" data-key="hr_timesheet" groups="hr_timesheet.group_timesheet_manager" id="timesheets">
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="90"/>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
|
||||
<field name="groups_id" eval="[(4, ref('lunch.group_lunch_manager'), 0)]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
<div class="app_settings_block" data-string="Lunch" string="Lunch" data-key="lunch" groups="lunch.group_lunch_manager">
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="60"/>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
|
||||
<field name="groups_id" eval="[(4, ref('mass_mailing.group_mass_mailing_user'), 0)]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
<div class="app_settings_block" data-string="Email Marketing" string="Email Marketing" data-key="mass_mailing" groups="mass_mailing.group_mass_mailing_user">
|
||||
|
||||
@@ -92,18 +92,20 @@
|
||||
<field name="name">product.template.procurement</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="stock.product_template_form_view_procurement_button"/>
|
||||
<field name="groups_id" eval="[(4, ref('mrp.group_mrp_user'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@name='action_open_product_lot']" position="after">
|
||||
<button class="oe_stat_button" name="%(template_open_bom)d" type="action"
|
||||
groups="mrp.group_mrp_user"
|
||||
attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}" icon="fa-flask">
|
||||
<field string="Bill of Materials" name="bom_count" widget="statinfo" />
|
||||
</button>
|
||||
<button class="oe_stat_button" name="action_used_in_bom" type="object"
|
||||
groups="mrp.group_mrp_user"
|
||||
attrs="{'invisible':['|',('type', 'not in', ['product', 'consu']), ('used_in_bom_count', '=', 0)]}" icon="fa-level-up">
|
||||
<field string="Used In" name="used_in_bom_count" widget="statinfo" />
|
||||
</button>
|
||||
<button class="oe_stat_button" name="action_view_mos" type="object"
|
||||
groups="mrp.group_mrp_user"
|
||||
attrs="{'invisible': ['|', '|', ('type', 'not in', ['product', 'consu']), ('bom_count', '=', 0), ('mrp_product_qty', '=', 0)]}" icon="fa-list-alt" help="Manufactured in the last 365 days">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
@@ -121,18 +123,20 @@
|
||||
<field name="name">product.product.procurement</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="inherit_id" ref="stock.product_form_view_procurement_button"/>
|
||||
<field name="groups_id" eval="[(4, ref('mrp.group_mrp_user'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@name='action_open_product_lot']" position="after">
|
||||
<button class="oe_stat_button" name="action_view_bom" type="object"
|
||||
groups="mrp.group_mrp_user"
|
||||
attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}" icon="fa-flask">
|
||||
<field string="Bill of Materials" name="bom_count" widget="statinfo" />
|
||||
</button>
|
||||
<button class="oe_stat_button" name="action_used_in_bom" type="object"
|
||||
groups="mrp.group_mrp_user"
|
||||
attrs="{'invisible':['|',('type', 'not in', ['product', 'consu']), ('used_in_bom_count', '=', 0)]}" icon="fa-level-up">
|
||||
<field string="Used In" name="used_in_bom_count" widget="statinfo" />
|
||||
</button>
|
||||
<button class="oe_stat_button" name="action_view_mos" type="object"
|
||||
groups="mrp.group_mrp_user"
|
||||
attrs="{'invisible': ['|', '|', ('type', 'not in', ['product', 'consu']), ('bom_count', '=', 0), ('mrp_product_qty', '=', 0)]}" icon="fa-list-alt" help="Manufactured in the last 365 days">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="35"/>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form" />
|
||||
<field name="groups_id" eval="[(4, ref('mrp.group_mrp_manager'), 0)]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
<div class="app_settings_block" data-string="Manufacturing" string="Manufacturing" data-key="mrp" groups="mrp.group_mrp_manager">
|
||||
|
||||
@@ -5,14 +5,15 @@
|
||||
<field name="model">account.analytic.account</field>
|
||||
<field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
|
||||
<field eval="14" name="priority"/>
|
||||
<field name="groups_id" eval="[(4, ref('mrp.group_mrp_user'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box" position="inside">
|
||||
<button class="oe_stat_button" type="object" name="action_view_mrp_production"
|
||||
groups="mrp.group_mrp_user"
|
||||
icon="fa-wrench" attrs="{'invisible': [('production_count', '=', 0)]}">
|
||||
<field string="Manufacturing Orders" name="production_count" widget="statinfo"/>
|
||||
</button>
|
||||
<button class="oe_stat_button" type="object" name="action_view_mrp_bom"
|
||||
groups="mrp.group_mrp_user"
|
||||
icon="fa-flask" attrs="{'invisible': [('bom_count', '=', 0)]}">
|
||||
<field string="Bills of Materials" name="bom_count" widget="statinfo"/>
|
||||
</button>
|
||||
|
||||
@@ -14,24 +14,27 @@
|
||||
<field name="name">mrp.production.view.inherited</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_production_form_view" />
|
||||
<field name="groups_id" eval="[(4, ref('stock.group_stock_manager'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='product_id']" position="before">
|
||||
<field name="show_valuation" invisible="1"/>
|
||||
<field name="show_valuation" invisible="1" groups="stock.group_stock_manager"/>
|
||||
</xpath>
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button string="Valuation" type="object"
|
||||
name="action_view_stock_valuation_layers"
|
||||
class="oe_stat_button" icon="fa-dollar" groups="base.group_no_one"
|
||||
attrs="{'invisible': [('show_valuation', '=', False)]}" />
|
||||
<button class="oe_stat_button" type="object"
|
||||
name="action_view_analytic_account"
|
||||
string="Analytic Account" icon="fa-bar-chart-o"
|
||||
attrs="{'invisible': ['|', ('analytic_account_id', '=', False), ('state', 'in', ['draft', 'cancel'])]}"
|
||||
groups="analytic.group_analytic_accounting"/>
|
||||
<t groups="stock.group_stock_manager">
|
||||
<button string="Valuation" type="object"
|
||||
name="action_view_stock_valuation_layers"
|
||||
class="oe_stat_button" icon="fa-dollar" groups="base.group_no_one"
|
||||
attrs="{'invisible': [('show_valuation', '=', False)]}" />
|
||||
<button class="oe_stat_button" type="object"
|
||||
name="action_view_analytic_account"
|
||||
string="Analytic Account" icon="fa-bar-chart-o"
|
||||
attrs="{'invisible': ['|', ('analytic_account_id', '=', False), ('state', 'in', ['draft', 'cancel'])]}"
|
||||
groups="analytic.group_analytic_accounting"/>
|
||||
</t>
|
||||
</xpath>
|
||||
<xpath expr="//page[@name='miscellaneous']//field[@name='date_deadline']" position="after">
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
|
||||
<t groups="stock.group_stock_manager">
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
|
||||
</t>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -5,16 +5,18 @@
|
||||
<field name="model">product.template</field>
|
||||
<field name="priority">3</field>
|
||||
<field name="inherit_id" ref="product.product_template_only_form_view" />
|
||||
<field name="groups_id" eval="[(4, ref('mrp.group_mrp_manager'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='standard_price_uom']" position="inside">
|
||||
<field name="cost_method" invisible="1"/>
|
||||
<field name="valuation" invisible="1"/>
|
||||
<button name="button_bom_cost"
|
||||
string="Compute Price from BoM" type="object"
|
||||
attrs="{'invisible': ['|', ('bom_count', '=', 0), '&', ('valuation', '=', 'real_time'), ('cost_method', '=', 'fifo')]}"
|
||||
help="Compute the price of the product using products and operations of related bill of materials, for manufactured products only."
|
||||
class="oe_link oe_read_only pt-0"/>
|
||||
<t groups="mrp.group_mrp_manager">
|
||||
<field name="bom_count" invisible="1"/>
|
||||
<field name="cost_method" invisible="1"/>
|
||||
<field name="valuation" invisible="1"/>
|
||||
<button name="button_bom_cost"
|
||||
string="Compute Price from BoM" type="object"
|
||||
attrs="{'invisible': ['|', ('bom_count', '=', 0), '&', ('valuation', '=', 'real_time'), ('cost_method', '=', 'fifo')]}"
|
||||
help="Compute the price of the product using products and operations of related bill of materials, for manufactured products only."
|
||||
class="oe_link oe_read_only pt-0"/>
|
||||
</t>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
@@ -24,17 +26,19 @@
|
||||
<field name="model">product.product</field>
|
||||
<field name="priority">4</field>
|
||||
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||
<field name="groups_id" eval="[(4, ref('mrp.group_mrp_manager'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='standard_price_uom']" position="inside">
|
||||
<field name="cost_method" invisible="1"/>
|
||||
<field name="valuation" invisible="1"/>
|
||||
<button name="button_bom_cost"
|
||||
string="Compute Price from BoM" type="object"
|
||||
attrs="{'invisible': ['|', ('bom_count', '=', 0), '&', ('valuation', '=', 'real_time'), ('cost_method', '=', 'fifo')]}"
|
||||
help="Compute the price of the product using products and operations of related bill of materials, for manufactured products only."
|
||||
class="oe_link oe_read_only pt-0"
|
||||
colspan="2"/>
|
||||
<t groups="mrp.group_mrp_manager">
|
||||
<field name="bom_count" invisible="1"/>
|
||||
<field name="cost_method" invisible="1"/>
|
||||
<field name="valuation" invisible="1"/>
|
||||
<button name="button_bom_cost"
|
||||
string="Compute Price from BoM" type="object"
|
||||
attrs="{'invisible': ['|', ('bom_count', '=', 0), '&', ('valuation', '=', 'real_time'), ('cost_method', '=', 'fifo')]}"
|
||||
help="Compute the price of the product using products and operations of related bill of materials, for manufactured products only."
|
||||
class="oe_link oe_read_only pt-0"
|
||||
colspan="2"/>
|
||||
</t>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -5,10 +5,9 @@
|
||||
<field name="name">mrp.subcontracting.product.template.search</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_search_view" />
|
||||
<field name="groups_id" eval="[(4, ref('mrp.group_mrp_user'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//filter[@name='filter_to_purchase']" position="after">
|
||||
<filter string="Can be Subcontracted" name="filter_can_be_subcontracted" domain="[('bom_ids.type', '=', 'subcontract')]" />
|
||||
<filter string="Can be Subcontracted" name="filter_can_be_subcontracted" domain="[('bom_ids.type', '=', 'subcontract')]" groups="mrp.group_mrp_user"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -15,11 +15,10 @@
|
||||
<field name="name">res.partner.select.inherit</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_res_partner_filter" />
|
||||
<field name="groups_id" eval="[(4, ref('mrp.group_mrp_user'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//filter[@name='inactive']" position="before">
|
||||
<filter string="Subcontractors" name="type_subcontractors" domain="[('is_subcontractor', '=', True)]" />
|
||||
<separator/>
|
||||
<filter string="Subcontractors" name="type_subcontractors" domain="[('is_subcontractor', '=', True)]" groups="mrp.group_mrp_user"/>
|
||||
<separator groups="mrp.group_mrp_user"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -5,10 +5,9 @@
|
||||
<field name="name">stock.quant.subcontracting.search</field>
|
||||
<field name="model">stock.quant</field>
|
||||
<field name="inherit_id" ref="stock.quant_search_view" />
|
||||
<field name="groups_id" eval="[(4, ref('mrp.group_mrp_user'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//filter[@name='transit_loc']" position="after">
|
||||
<filter string="Subcontracting Locations" name="is_subcontract" domain="[('is_subcontract', '=', True)]" />
|
||||
<filter string="Subcontracting Locations" name="is_subcontract" domain="[('is_subcontract', '=', True)]" groups="mrp.group_mrp_user"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -5,17 +5,18 @@
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="95"/>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form" />
|
||||
<field name="groups_id" eval="[(4, ref('point_of_sale.group_pos_manager'), 0)]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
<field name="pos_selectable_categ_ids" invisible="1"/>
|
||||
<field name="pos_has_active_session" invisible="1"/>
|
||||
<field name="pos_allowed_pricelist_ids" invisible="1"/>
|
||||
<field name="pos_cash_control" invisible="1"/>
|
||||
<field name="pos_iface_print_via_proxy" invisible="1"/>
|
||||
<field name="pos_company_has_template" invisible="1"/>
|
||||
<field name="is_default_pricelist_displayed" invisible="1"/>
|
||||
<field name="group_cash_rounding" invisible="1"/>
|
||||
<t groups="point_of_sale.group_pos_manager">
|
||||
<field name="pos_selectable_categ_ids" invisible="1"/>
|
||||
<field name="pos_has_active_session" invisible="1"/>
|
||||
<field name="pos_allowed_pricelist_ids" invisible="1"/>
|
||||
<field name="pos_cash_control" invisible="1"/>
|
||||
<field name="pos_iface_print_via_proxy" invisible="1"/>
|
||||
<field name="pos_company_has_template" invisible="1"/>
|
||||
<field name="is_default_pricelist_displayed" invisible="1"/>
|
||||
<field name="group_cash_rounding" invisible="1"/>
|
||||
</t>
|
||||
|
||||
<div class="app_settings_block" data-string="Point of sale" string="Point of Sale" data-key="point_of_sale" groups="point_of_sale.group_pos_manager">
|
||||
<div class="app_settings_header pt-1 pb-1" style="background-color: #FEF0D0;">
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="priority" eval="4"/>
|
||||
<field name="groups_id" eval="[(4, ref('group_pos_user'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box" position="inside">
|
||||
<button class="oe_stat_button" type="object" name="action_view_pos_order"
|
||||
groups="point_of_sale.group_pos_user"
|
||||
context="{'default_partner_id': active_id}"
|
||||
attrs="{'invisible': [('pos_order_count', '=', 0)]}"
|
||||
icon="fa-shopping-bag">
|
||||
@@ -16,7 +16,7 @@
|
||||
</button>
|
||||
</div>
|
||||
<xpath expr="//group[@name='purchase']" position="after">
|
||||
<group string="Point Of Sale" name="point_of_sale">
|
||||
<group string="Point Of Sale" name="point_of_sale" groups="point_of_sale.group_pos_user">
|
||||
<field name="barcode"/>
|
||||
</group>
|
||||
</xpath>
|
||||
@@ -27,13 +27,13 @@
|
||||
<field name="name">res.partner.pos.kanban.inherit</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.res_partner_kanban_view"/>
|
||||
<field name="groups_id" eval="[(4, ref('group_pos_user'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="state_id" position="before">
|
||||
<field name="pos_order_count"/>
|
||||
<field name="pos_order_count" groups="point_of_sale.group_pos_user"/>
|
||||
</field>
|
||||
<xpath expr="//div[hasclass('oe_kanban_bottom_left')]" position="inside">
|
||||
<a t-if="record.pos_order_count.value>0" data-type="object" data-name="action_view_pos_order"
|
||||
groups="point_of_sale.group_pos_user"
|
||||
href="#" class="oe_kanban_action oe_kanban_action_a me-1">
|
||||
<span class="badge rounded-pill">
|
||||
<i class="fa fa-fw fa-shopping-bag" role="img" aria-label="Shopping cart" title="Shopping cart"/>
|
||||
|
||||
@@ -34,11 +34,10 @@
|
||||
<field name="name">crm.team.view.kanban.dashboard.inherit.pos</field>
|
||||
<field name="model">crm.team</field>
|
||||
<field name="inherit_id" ref="sales_team.crm_team_view_kanban_dashboard"/>
|
||||
<field name="groups_id" eval="[(4, ref('point_of_sale.group_pos_user'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<xpath expr="//t[@name='first_options']" position="before">
|
||||
<div class="row" t-if="record.pos_sessions_open_count.raw_value">
|
||||
<div class="row" t-if="record.pos_sessions_open_count.raw_value" groups="point_of_sale.group_pos_user">
|
||||
<div class="col-8">
|
||||
<a name="%(pos_session_action_from_crm_team)d" type="action">
|
||||
<field name="pos_sessions_open_count"/>
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
<field name="name">res.partner.product.property.form.inherit</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="groups_id" eval="[(4, ref('product.group_product_pricelist'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<group name="sale">
|
||||
<field name="property_product_pricelist" groups="product.group_product_pricelist" attrs="{'invisible': [('is_company','=',False),('parent_id','!=',False)]}"/>
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="50"/>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form" />
|
||||
<field name="groups_id" eval="[(4, ref('project.group_project_manager'), 0)]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
<div class="app_settings_block" data-string="Project" string="Project" data-key="project" groups="project.group_project_manager">
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="priority" eval="7"/>
|
||||
<field name="groups_id" eval="[(4, ref('project.group_project_user'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box" position="inside">
|
||||
<button class="oe_stat_button" type="action" name="%(project_task_action_from_partner)d"
|
||||
groups="project.group_project_user"
|
||||
context="{'search_default_partner_id': active_id, 'default_partner_id': active_id}" attrs="{'invisible': [('task_count', '=', 0)]}"
|
||||
icon="fa-tasks">
|
||||
<field string="Tasks" name="task_count" widget="statinfo"/>
|
||||
|
||||
@@ -98,10 +98,10 @@
|
||||
<field name="name">product.template.purchase.button.inherit</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_only_form_view"/>
|
||||
<field name="groups_id" eval="[(4, ref('purchase.group_purchase_user'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box" position="inside">
|
||||
<button class="oe_stat_button" name="action_view_po"
|
||||
groups="purchase.group_purchase_user"
|
||||
type="object" icon="fa-credit-card" attrs="{'invisible': [('purchase_ok', '=', False)]}" help="Purchased in the last 365 days">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
@@ -130,10 +130,10 @@
|
||||
<field name="name">product.product.purchase.order</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||
<field name="groups_id" eval="[(4, ref('purchase.group_purchase_user'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box" position="inside">
|
||||
<button class="oe_stat_button" name="action_view_po"
|
||||
groups="purchase.group_purchase_user"
|
||||
type="object" icon="fa-credit-card" attrs="{'invisible': [('purchase_ok', '=', False)]}" help="Purchased in the last 365 days">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="25"/>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
|
||||
<field name="groups_id" eval="[(4, ref('purchase.group_purchase_manager'), 0)]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
<div class="app_settings_block" data-string="Purchase" string="Purchase" data-key="purchase" groups="purchase.group_purchase_manager">
|
||||
|
||||
@@ -47,14 +47,14 @@
|
||||
<field name="name">res.partner.kanban.purchaseorder.inherit</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.res_partner_kanban_view"/>
|
||||
<field name="groups_id" eval="[(4, ref('purchase.group_purchase_user'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="mobile" position="after">
|
||||
<field name="purchase_order_count"/>
|
||||
<field name="purchase_order_count" groups="purchase.group_purchase_user"/>
|
||||
</field>
|
||||
<xpath expr="//div[hasclass('oe_kanban_bottom_left')]" position="inside">
|
||||
<a t-if="record.purchase_order_count.value>0" data-type="action" data-name="%(purchase.act_res_partner_2_purchase_order)d"
|
||||
href="#" class="oe_kanban_action oe_kanban_action_a me-1">
|
||||
groups="purchase.group_purchase_user"
|
||||
href="#" class="oe_kanban_action oe_kanban_action_a me-1">
|
||||
<span class="badge rounded-pill">
|
||||
<i class="fa fa-fw fa-credit-card" role="img" aria-label="Purchases" title="Purchases"/>
|
||||
<t t-out="record.purchase_order_count.value"/>
|
||||
@@ -87,7 +87,6 @@
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form" />
|
||||
<field name="priority" eval="9"/>
|
||||
<field name="groups_id" eval="[(4, ref('purchase.group_purchase_user'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box" position="inside">
|
||||
<button class="oe_stat_button" name="%(purchase.act_res_partner_2_purchase_order)d" type="action"
|
||||
@@ -97,12 +96,14 @@
|
||||
</button>
|
||||
</div>
|
||||
<page name="internal_notes" position="inside">
|
||||
<group colspan="2" col="2" groups="purchase.group_warning_purchase">
|
||||
<separator string="Warning on the Purchase Order" colspan="4"/>
|
||||
<field name="purchase_warn" nolabel="1" />
|
||||
<field name="purchase_warn_msg" colspan="3" nolabel="1"
|
||||
attrs="{'required':[('purchase_warn','!=', False), ('purchase_warn','!=','no-message')], 'invisible':[('purchase_warn','in',(False,'no-message'))]}"/>
|
||||
</group>
|
||||
<t groups="purchase.group_purchase_user">
|
||||
<group colspan="2" col="2" groups="purchase.group_warning_purchase">
|
||||
<separator string="Warning on the Purchase Order" colspan="4"/>
|
||||
<field name="purchase_warn" nolabel="1" />
|
||||
<field name="purchase_warn_msg" colspan="3" nolabel="1"
|
||||
attrs="{'required':[('purchase_warn','!=', False), ('purchase_warn','!=','no-message')], 'invisible':[('purchase_warn','in',(False,'no-message'))]}"/>
|
||||
</group>
|
||||
</t>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
@@ -112,10 +113,10 @@
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form" />
|
||||
<field name="priority" eval="12"/>
|
||||
<field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box" position="inside">
|
||||
<button class="oe_stat_button" name="%(purchase.act_res_partner_2_supplier_invoices)d" type="action"
|
||||
groups="account.group_account_invoice"
|
||||
icon="fa-pencil-square-o" help="Vendor Bills">
|
||||
<field string="Vendor Bills" name="supplier_invoice_count" widget="statinfo"/>
|
||||
</button>
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
<field name="name">product.product.sale.order</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||
<field name="groups_id" eval="[(4, ref('sales_team.group_sale_salesman'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box" position="inside">
|
||||
<button class="oe_stat_button"
|
||||
@@ -59,11 +58,13 @@
|
||||
</button>
|
||||
</div>
|
||||
<group name="description" position="after">
|
||||
<group string="Warning when Selling this Product" groups="sale.group_warning_sale">
|
||||
<field name="sale_line_warn" nolabel="1"/>
|
||||
<field name="sale_line_warn_msg" colspan="3" nolabel="1"
|
||||
attrs="{'required':[('sale_line_warn','!=','no-message')],'readonly':[('sale_line_warn','=','no-message')]}"/>
|
||||
</group>
|
||||
<t groups="sales_team.group_sale_salesman">
|
||||
<group string="Warning when Selling this Product" groups="sale.group_warning_sale">
|
||||
<field name="sale_line_warn" nolabel="1"/>
|
||||
<field name="sale_line_warn_msg" colspan="3" nolabel="1"
|
||||
attrs="{'required':[('sale_line_warn','!=','no-message')],'readonly':[('sale_line_warn','=','no-message')]}"/>
|
||||
</group>
|
||||
</t>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
@@ -72,7 +73,6 @@
|
||||
<field name="name">product.template.sale.order.button</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_only_form_view"/>
|
||||
<field name="groups_id" eval="[(4, ref('sales_team.group_sale_salesman'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box" position="inside">
|
||||
<button class="oe_stat_button"
|
||||
@@ -91,11 +91,13 @@
|
||||
</button>
|
||||
</div>
|
||||
<group name="description" position="after">
|
||||
<group string="Warning when Selling this Product" groups="sale.group_warning_sale">
|
||||
<field name="sale_line_warn" nolabel="1"/>
|
||||
<field name="sale_line_warn_msg" colspan="3" nolabel="1"
|
||||
attrs="{'required':[('sale_line_warn','!=','no-message')],'readonly':[('sale_line_warn','=','no-message')], 'invisible':[('sale_line_warn','=','no-message')]}"/>
|
||||
</group>
|
||||
<t groups="sales_team.group_sale_salesman">
|
||||
<group string="Warning when Selling this Product" groups="sale.group_warning_sale">
|
||||
<field name="sale_line_warn" nolabel="1"/>
|
||||
<field name="sale_line_warn_msg" colspan="3" nolabel="1"
|
||||
attrs="{'required':[('sale_line_warn','!=','no-message')],'readonly':[('sale_line_warn','=','no-message')], 'invisible':[('sale_line_warn','=','no-message')]}"/>
|
||||
</group>
|
||||
</t>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="10"/>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
|
||||
<field name="groups_id" eval="[(4, ref('sales_team.group_sale_manager'), 0)]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
<div class="app_settings_block o_not_app"
|
||||
|
||||
@@ -21,13 +21,13 @@
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.res_partner_kanban_view"/>
|
||||
<field name="priority" eval="20"/>
|
||||
<field name="groups_id" eval="[(4, ref('sales_team.group_sale_salesman'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="mobile" position="after">
|
||||
<field name="sale_order_count"/>
|
||||
<field name="sale_order_count" groups="sales_team.group_sale_salesman"/>
|
||||
</field>
|
||||
<xpath expr="//div[hasclass('oe_kanban_bottom_left')]" position="inside">
|
||||
<a t-if="record.sale_order_count.value>0" data-type="object" data-name="action_view_sale_order"
|
||||
groups="sales_team.group_sale_salesman"
|
||||
href="#" class="oe_kanban_action oe_kanban_action_a me-1">
|
||||
<span class="badge rounded-pill">
|
||||
<i class="fa fa-fw fa-usd" role="img" aria-label="Sale orders" title="Sales orders"/>
|
||||
@@ -43,7 +43,6 @@
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form" />
|
||||
<field name="priority" eval="3"/>
|
||||
<field name="groups_id" eval="[(4, ref('sales_team.group_sale_salesman'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box" position="inside">
|
||||
<button class="oe_stat_button" type="object" name="action_view_sale_order"
|
||||
@@ -53,7 +52,7 @@
|
||||
</button>
|
||||
</div>
|
||||
<page name="internal_notes" position="inside">
|
||||
<group colspan="2" col="2" groups="sale.group_warning_sale">
|
||||
<group colspan="2" col="2" groups="sale.group_warning_sale,sales_team.group_sale_salesman">
|
||||
<separator string="Warning on the Sales Order" colspan="4" />
|
||||
<field name="sale_warn" nolabel="1" />
|
||||
<field name="sale_warn_msg" colspan="3" nolabel="1"
|
||||
|
||||
@@ -654,15 +654,16 @@
|
||||
<field name="name">sale.order.form</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="groups_id" eval="[(4, ref('sale.group_auto_done_setting'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<button name="action_draft" position="after">
|
||||
<button name="action_done" type="object" string="Lock"
|
||||
states="sale"
|
||||
help="If the sale is locked, you can not modify it anymore. However, you will still be able to invoice or deliver." groups="sales_team.group_sale_manager"/>
|
||||
<button name="action_unlock" type="object" string="Unlock"
|
||||
states="done"
|
||||
groups="sales_team.group_sale_manager"/>
|
||||
<t groups="sale.group_auto_done_setting">
|
||||
<button name="action_done" type="object" string="Lock"
|
||||
states="sale"
|
||||
help="If the sale is locked, you can not modify it anymore. However, you will still be able to invoice or deliver." groups="sales_team.group_sale_manager"/>
|
||||
<button name="action_unlock" type="object" string="Unlock"
|
||||
states="done"
|
||||
groups="sales_team.group_sale_manager"/>
|
||||
</t>
|
||||
</button>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -39,13 +39,12 @@
|
||||
<record id="hr_timesheet_line_tree_inherit" model="ir.ui.view">
|
||||
<field name="name">account.analytic.line.tree.inherit</field>
|
||||
<field name="model">account.analytic.line</field>
|
||||
<field name="groups_id" eval="[(4, ref('sales_team.group_sale_salesman'))]"/>
|
||||
<field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//tree/field[@name='name']" position="after">
|
||||
<field name="commercial_partner_id" invisible="1"/>
|
||||
<field name="is_so_line_edited" invisible="1"/>
|
||||
<field name="so_line" widget="so_line_many2one" optional="hide" options="{'no_create': True}" context="{'create': False, 'edit': False, 'delete': False}"/>
|
||||
<field name="commercial_partner_id" invisible="1" groups="sales_team.group_sale_salesman"/>
|
||||
<field name="is_so_line_edited" invisible="1" groups="sales_team.group_sale_salesman"/>
|
||||
<field name="so_line" widget="so_line_many2one" optional="hide" options="{'no_create': True}" context="{'create': False, 'edit': False, 'delete': False}" groups="sales_team.group_sale_salesman"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
@@ -53,13 +52,12 @@
|
||||
<record id="hr_timesheet_line_form_inherit" model="ir.ui.view">
|
||||
<field name="name">account.analytic.line.form.inherit</field>
|
||||
<field name="model">account.analytic.line</field>
|
||||
<field name="groups_id" eval="[(4, ref('sales_team.group_sale_salesman'))]"/>
|
||||
<field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='task_id']" position="after">
|
||||
<field name="commercial_partner_id" invisible="1"/>
|
||||
<field name="is_so_line_edited" invisible="1" />
|
||||
<field name="so_line" widget="so_line_many2one" options='{"no_create": True}' context="{'create': False, 'edit': False, 'delete': False}"/>
|
||||
<field name="commercial_partner_id" invisible="1" groups="sales_team.group_sale_salesman"/>
|
||||
<field name="is_so_line_edited" invisible="1" groups="sales_team.group_sale_salesman"/>
|
||||
<field name="so_line" widget="so_line_many2one" options='{"no_create": True}' context="{'create': False, 'edit': False, 'delete': False}" groups="sales_team.group_sale_salesman"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -117,17 +117,16 @@
|
||||
<record id="view_sale_service_inherit_form2" model="ir.ui.view">
|
||||
<field name="name">sale.service.form.view.inherit</field>
|
||||
<field name="model">project.task</field>
|
||||
<field name="groups_id" eval="[(4, ref('base.group_user'))]"/>
|
||||
<field name="inherit_id" ref="hr_timesheet.view_task_form2_inherited"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//header" position='inside'>
|
||||
<xpath expr="//header" position="inside">
|
||||
<field name="allow_billable" invisible="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='child_ids']/tree/field[@name='remaining_hours']" position="after">
|
||||
<field name="remaining_hours_so" string="Remaining Hours on SO" widget="timesheet_uom" optional="hide"/>
|
||||
<xpath expr="//field[@name='child_ids']/tree//field[@name='remaining_hours']" position="after">
|
||||
<field name="remaining_hours_so" string="Remaining Hours on SO" widget="timesheet_uom" optional="hide" groups="base.group_user"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='depend_on_ids']/tree/field[@name='remaining_hours']" position="after">
|
||||
<field name="remaining_hours_so" string="Remaining Hours on SO" widget="timesheet_uom" optional="hide"/>
|
||||
<xpath expr="//field[@name='depend_on_ids']/tree//field[@name='remaining_hours']" position="after">
|
||||
<field name="remaining_hours_so" string="Remaining Hours on SO" widget="timesheet_uom" optional="hide" groups="base.group_user"/>
|
||||
</xpath>
|
||||
|
||||
</field>
|
||||
|
||||
@@ -236,7 +236,6 @@
|
||||
<record model="ir.ui.view" id="product_form_view_procurement_button">
|
||||
<field name="name">product.product.procurement</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="groups_id" eval="[(4, ref('stock.group_stock_user'))]"/>
|
||||
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
@@ -252,82 +251,84 @@
|
||||
attrs="{'invisible': [('type', 'not in', ['consu', 'product'])]}"/>
|
||||
</header>
|
||||
<div name="button_box" position="inside">
|
||||
<field name="tracking" invisible="1"/>
|
||||
<field name="show_on_hand_qty_status_button" invisible="1"/>
|
||||
<field name="show_forecasted_qty_status_button" invisible="1"/>
|
||||
<button class="oe_stat_button"
|
||||
name="action_open_quants"
|
||||
icon="fa-cubes"
|
||||
type="object"
|
||||
attrs="{'invisible':[('show_on_hand_qty_status_button', '=', False)]}">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<t groups="stock.group_stock_user">
|
||||
<field name="tracking" invisible="1"/>
|
||||
<field name="show_on_hand_qty_status_button" invisible="1"/>
|
||||
<field name="show_forecasted_qty_status_button" invisible="1"/>
|
||||
<button class="oe_stat_button"
|
||||
name="action_open_quants"
|
||||
icon="fa-cubes"
|
||||
type="object"
|
||||
attrs="{'invisible':[('show_on_hand_qty_status_button', '=', False)]}">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
<field name="qty_available" widget="statinfo" nolabel="1" class="mr4"/>
|
||||
<field name="uom_name"/>
|
||||
</span>
|
||||
<span class="o_stat_text">On Hand</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="object"
|
||||
name="action_product_forecast_report"
|
||||
attrs="{'invisible':[('show_forecasted_qty_status_button', '=', False)]}"
|
||||
context="{'default_product_id': id}"
|
||||
class="oe_stat_button" icon="fa-cubes">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
<field name="qty_available" widget="statinfo" nolabel="1" class="mr4"/>
|
||||
<field name="virtual_available" widget="statinfo" nolabel="1" class="mr4"/>
|
||||
<field name="uom_name"/>
|
||||
</span>
|
||||
<span class="o_stat_text">On Hand</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="object"
|
||||
name="action_product_forecast_report"
|
||||
attrs="{'invisible':[('show_forecasted_qty_status_button', '=', False)]}"
|
||||
context="{'default_product_id': id}"
|
||||
class="oe_stat_button" icon="fa-cubes">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
<field name="virtual_available" widget="statinfo" nolabel="1" class="mr4"/>
|
||||
<field name="uom_name"/>
|
||||
</span>
|
||||
<span class="o_stat_text">Forecasted</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="object"
|
||||
name= "action_view_stock_move_lines"
|
||||
attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}"
|
||||
class="oe_stat_button" icon="fa-exchange"
|
||||
groups="stock.group_stock_user">
|
||||
<div class="o_field_widget o_stat_info mr4">
|
||||
<span class="o_stat_text">In:</span>
|
||||
<span class="o_stat_text">Out:</span>
|
||||
</div>
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="nbr_moves_in"/></span>
|
||||
<span class="o_stat_value"><field name="nbr_moves_out"/></span>
|
||||
</div>
|
||||
</button>
|
||||
<button name="action_view_orderpoints" type="object"
|
||||
attrs="{'invisible':['|',('type', 'not in', ['product', 'consu']),('nbr_reordering_rules', '!=', 1)]}"
|
||||
class="oe_stat_button" icon="fa-refresh">
|
||||
<div class="o_field_widget o_stat_info mr4">
|
||||
<span class="o_stat_text">Min:</span>
|
||||
<span class="o_stat_text">Max:</span>
|
||||
</div>
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="reordering_min_qty"/></span>
|
||||
<span class="o_stat_value"><field name="reordering_max_qty"/></span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="object"
|
||||
name="action_view_orderpoints"
|
||||
attrs="{'invisible':['|',('type', '!=', 'product'),('nbr_reordering_rules', '==', 1)]}"
|
||||
class="oe_stat_button" icon="fa-refresh">
|
||||
<field name="nbr_reordering_rules" widget="statinfo"/>
|
||||
</button>
|
||||
<button string="Lot/Serial Numbers" type="object"
|
||||
name="action_open_product_lot"
|
||||
attrs="{'invisible': [('tracking', '=', 'none')]}"
|
||||
class="oe_stat_button" icon="fa-bars" groups="stock.group_production_lot"/>
|
||||
<button string="Putaway Rules" type="object"
|
||||
name="action_view_related_putaway_rules"
|
||||
class="oe_stat_button" icon="fa-random" groups="stock.group_stock_multi_locations"
|
||||
attrs="{'invisible': [('type', '=', 'service')]}"
|
||||
context="{'invisible_handle': True, 'single_product': True}"/>
|
||||
<button type="object" string="Storage Capacities"
|
||||
name="action_view_storage_category_capacity"
|
||||
groups="stock.group_stock_storage_categories"
|
||||
attrs="{'invisible':[('type', '=', 'service')]}"
|
||||
class="oe_stat_button"
|
||||
icon="fa-cubes"/>
|
||||
<span class="o_stat_text">Forecasted</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="object"
|
||||
name= "action_view_stock_move_lines"
|
||||
attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}"
|
||||
class="oe_stat_button" icon="fa-exchange"
|
||||
groups="stock.group_stock_user">
|
||||
<div class="o_field_widget o_stat_info mr4">
|
||||
<span class="o_stat_text">In:</span>
|
||||
<span class="o_stat_text">Out:</span>
|
||||
</div>
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="nbr_moves_in"/></span>
|
||||
<span class="o_stat_value"><field name="nbr_moves_out"/></span>
|
||||
</div>
|
||||
</button>
|
||||
<button name="action_view_orderpoints" type="object"
|
||||
attrs="{'invisible':['|',('type', 'not in', ['product', 'consu']),('nbr_reordering_rules', '!=', 1)]}"
|
||||
class="oe_stat_button" icon="fa-refresh">
|
||||
<div class="o_field_widget o_stat_info mr4">
|
||||
<span class="o_stat_text">Min:</span>
|
||||
<span class="o_stat_text">Max:</span>
|
||||
</div>
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="reordering_min_qty"/></span>
|
||||
<span class="o_stat_value"><field name="reordering_max_qty"/></span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="object"
|
||||
name="action_view_orderpoints"
|
||||
attrs="{'invisible':['|',('type', '!=', 'product'),('nbr_reordering_rules', '==', 1)]}"
|
||||
class="oe_stat_button" icon="fa-refresh">
|
||||
<field name="nbr_reordering_rules" widget="statinfo"/>
|
||||
</button>
|
||||
<button string="Lot/Serial Numbers" type="object"
|
||||
name="action_open_product_lot"
|
||||
attrs="{'invisible': [('tracking', '=', 'none')]}"
|
||||
class="oe_stat_button" icon="fa-bars" groups="stock.group_production_lot"/>
|
||||
<button string="Putaway Rules" type="object"
|
||||
name="action_view_related_putaway_rules"
|
||||
class="oe_stat_button" icon="fa-random" groups="stock.group_stock_multi_locations"
|
||||
attrs="{'invisible': [('type', '=', 'service')]}"
|
||||
context="{'invisible_handle': True, 'single_product': True}"/>
|
||||
<button type="object" string="Storage Capacities"
|
||||
name="action_view_storage_category_capacity"
|
||||
groups="stock.group_stock_storage_categories"
|
||||
attrs="{'invisible':[('type', '=', 'service')]}"
|
||||
class="oe_stat_button"
|
||||
icon="fa-cubes"/>
|
||||
</t>
|
||||
</div>
|
||||
<xpath expr="//button[@name='%(action_open_routes)d']" position="attributes">
|
||||
<attribute name="context">
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="30"/>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form" />
|
||||
<field name="groups_id" eval="[(4, ref('stock.group_stock_manager'), 0)]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside" >
|
||||
<div class="app_settings_block" data-string="Inventory" string="Inventory" data-key="stock" groups="stock.group_stock_manager">
|
||||
|
||||
@@ -4,29 +4,32 @@
|
||||
<field name="name">account.view.move.form.inherited</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form"/>
|
||||
<field name="groups_id" eval="[(4,ref('stock.group_stock_manager'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<field name="landed_costs_ids" invisible="1"/>
|
||||
<button string="Landed Costs" type="object"
|
||||
name="action_view_landed_costs"
|
||||
class="oe_stat_button" icon="fa-plus-square" groups="stock.group_stock_manager"
|
||||
attrs="{'invisible': [('landed_costs_ids', '=', [])]}" />
|
||||
<t groups="stock.group_stock_manager">
|
||||
<field name="landed_costs_ids" invisible="1"/>
|
||||
<button string="Landed Costs" type="object"
|
||||
name="action_view_landed_costs"
|
||||
class="oe_stat_button" icon="fa-plus-square"
|
||||
attrs="{'invisible': [('landed_costs_ids', '=', [])]}"/>
|
||||
</t>
|
||||
</xpath>
|
||||
|
||||
<field name="state" position="before">
|
||||
<field name="landed_costs_visible" invisible="1"/>
|
||||
<button name="button_create_landed_costs" class="oe_highlight" string="Create Landed Costs" data-hotkey="l" type="object" groups="account.group_account_invoice" attrs="{'invisible': [('landed_costs_visible', '!=', True)]}"/>
|
||||
<t groups="stock.group_stock_manager">
|
||||
<field name="landed_costs_visible" invisible="1" />
|
||||
<button name="button_create_landed_costs" class="oe_highlight" string="Create Landed Costs" data-hotkey="l" type="object" groups="account.group_account_invoice" attrs="{'invisible': [('landed_costs_visible', '!=', True)]}"/>
|
||||
</t>
|
||||
</field>
|
||||
|
||||
<xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='name']" position="after">
|
||||
<field name="product_type" invisible="1"/>
|
||||
<field name="is_landed_costs_line" string="Landed Costs" attrs="{'readonly': [('product_type', '!=', 'service')], 'column_invisible': [('parent.move_type', '!=', 'in_invoice')]}" optional="show"/>
|
||||
<field name="product_type" invisible="1" groups="stock.group_stock_manager"/>
|
||||
<field name="is_landed_costs_line" string="Landed Costs" attrs="{'readonly': [('product_type', '!=', 'service')], 'column_invisible': [('parent.move_type', '!=', 'in_invoice')]}" optional="show" groups="stock.group_stock_manager"/>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//field[@name='line_ids']/tree/field[@name='name']" position="after">
|
||||
<field name="product_type" invisible="1"/>
|
||||
<field name="is_landed_costs_line" invisible="1"/>
|
||||
<field name="product_type" invisible="1" groups="stock.group_stock_manager"/>
|
||||
<field name="is_landed_costs_line" invisible="1" groups="stock.group_stock_manager"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
<field name="name">res.partner.view.form.inherit.survey</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="groups_id" eval="[(4, ref('survey.group_survey_user'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button class="oe_stat_button" type="object"
|
||||
icon="fa-trophy" name="action_view_certifications"
|
||||
groups="survey.group_survey_user"
|
||||
attrs="{'invisible': ['|', ('certifications_count', '=', 0), ('is_company', '=', True)]}">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="certifications_count" /></span>
|
||||
@@ -26,6 +26,7 @@
|
||||
</button>
|
||||
<button class="oe_stat_button" type="object"
|
||||
icon="fa-trophy" name="action_view_certifications"
|
||||
groups="survey.group_survey_user"
|
||||
attrs="{'invisible': ['|', ('certifications_company_count', '=', 0), ('is_company', '=', False)]}">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="certifications_company_count" /></span>
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="20"/>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
|
||||
<field name="groups_id" eval="[(4, ref('website.group_website_designer'), 0)]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
<div class="app_settings_block" data-string="Website" string="Website" data-key="website" groups="website.group_website_designer">
|
||||
|
||||
@@ -4,10 +4,9 @@
|
||||
<field name="name">res.config.settings.view.form.inherit.website.slides</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="website.res_config_settings_view_form"/>
|
||||
<field name="groups_id" eval="[(4, ref('website_slides.group_website_slides_manager'), 0)]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@id='website_marketing_automation']" position="after">
|
||||
<div class="col-12 col-lg-6 o_setting_box" id="slides_install_setting">
|
||||
<div class="col-12 col-lg-6 o_setting_box" id="slides_install_setting" groups="website_slides.group_website_slides_manager">
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">Slides</span>
|
||||
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
|
||||
@@ -29,7 +28,7 @@
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
<div class="app_settings_block" data-string="eLearning" string="eLearning" data-key="website_slides">
|
||||
<div class="app_settings_block" data-string="eLearning" string="eLearning" data-key="website_slides" groups="website_slides.group_website_slides_manager">
|
||||
<h2>eLearning</h2>
|
||||
<div class="row mt16 o_settings_container" id="website_slides_selection_settings">
|
||||
<group>
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
<field name="name">res.partner.view.form.inherit.slides</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="groups_id" eval="[(4, ref('website_slides.group_website_slides_officer'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button class="oe_stat_button" type="object"
|
||||
icon="fa-graduation-cap" name="action_view_courses"
|
||||
groups="website_slides.group_website_slides_officer"
|
||||
attrs="{'invisible': ['|', ('slide_channel_count', '=', 0), ('is_company', '=', True)]}">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="slide_channel_count"/></span>
|
||||
@@ -18,6 +18,7 @@
|
||||
</button>
|
||||
<button class="oe_stat_button" type="object"
|
||||
icon="fa-graduation-cap" name="action_view_courses"
|
||||
groups="website_slides.group_website_slides_officer"
|
||||
attrs="{'invisible': ['|', ('slide_channel_company_count', '=', 0), ('is_company', '=', False)]}">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="slide_channel_company_count" /></span>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from collections import defaultdict
|
||||
from lxml import etree
|
||||
import logging
|
||||
|
||||
from odoo import exceptions, Command
|
||||
@@ -155,7 +156,7 @@ class TestResConfigExecute(TransactionCase):
|
||||
# Check user has access to all models of relational fields in view
|
||||
# because the webclient makes a name_get request for all specified records
|
||||
# even if they are not shown to the user.
|
||||
settings_view_arch = self.settings_view.with_user(user)._get_combined_arch()
|
||||
settings_view_arch = etree.fromstring(settings.get_view(view_id=self.settings_view.id)['arch'])
|
||||
seen_fields = set()
|
||||
for node in settings_view_arch.iterdescendants(tag='field'):
|
||||
seen_fields.add(node.get('name'))
|
||||
|
||||
Reference in New Issue
Block a user