[MERGE] correct groups reference in views
Fix several references to `groups=` in views that were incorrect or declared in a way that the view or code was evaluated before the group creation (order of creation) or errors in group name. Closes #15098 Fixes #15094
This commit is contained in:
@@ -5,10 +5,14 @@
|
||||
<record id="group_account_invoice" model="res.groups">
|
||||
<field name="name">Billing</field>
|
||||
<field name="category_id" ref="base.module_category_accounting_and_finance"/>
|
||||
<field name="users" eval="[(4, ref('base.user_root'))]"/>
|
||||
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
|
||||
</record>
|
||||
|
||||
<!-- 2 steps to avoid making reference to xml id not defined yet -->
|
||||
<record id="group_account_invoice" model="res.groups">
|
||||
<field name="users" eval="[(4, ref('base.user_root'))]"/>
|
||||
</record>
|
||||
|
||||
<record id="group_account_user" model="res.groups">
|
||||
<field name="name">Accountant</field>
|
||||
<field name="category_id" ref="base.module_category_accounting_and_finance"/>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<field name="quantity"/>
|
||||
<field name="uom_id" groups="product.group_uom"/>
|
||||
<field name="price_unit"/>
|
||||
<field name="discount" groups="sale.group_discount_per_so_line"/>
|
||||
<field name="discount" groups="base.group_no_one"/>
|
||||
<field name="price_subtotal"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
</tree>
|
||||
@@ -68,7 +68,7 @@
|
||||
<field name="uom_id" class="oe_inline" groups="product.group_uom"/>
|
||||
</div>
|
||||
<field name="price_unit"/>
|
||||
<field name="discount" groups="sale.group_discount_per_so_line"/>
|
||||
<field name="discount" groups="base.group_no_one"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
</group>
|
||||
<group>
|
||||
@@ -272,7 +272,7 @@
|
||||
<field name="quantity"/>
|
||||
<field name="uom_id" groups="product.group_uom"/>
|
||||
<field name="price_unit"/>
|
||||
<field name="discount" groups="sale.group_discount_per_so_line"/>
|
||||
<field name="discount" groups="base.group_no_one"/>
|
||||
<field name="invoice_line_tax_ids" widget="many2many_tags" context="{'type':parent.type}"
|
||||
domain="[('type_tax_use','=','purchase'),('company_id', '=', parent.company_id)]" options="{'no_create': True}"/>
|
||||
<field name="price_subtotal"/>
|
||||
@@ -410,7 +410,7 @@
|
||||
<field name="quantity"/>
|
||||
<field name="uom_id" groups="product.group_uom"/>
|
||||
<field name="price_unit"/>
|
||||
<field name="discount" groups="sale.group_discount_per_so_line"/>
|
||||
<field name="discount" groups="base.group_no_one"/>
|
||||
<field name="invoice_line_tax_ids" widget="many2many_tags" context="{'type':parent.type}"
|
||||
domain="[('type_tax_use','=','sale'),('company_id', '=', parent.company_id)]" options="{'no_create': True}"/>
|
||||
<field name="price_subtotal"/>
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<th class="hidden">Source Document</th>
|
||||
<th class="text-right">Quantity</th>
|
||||
<th class="text-right">Unit Price</th>
|
||||
<th t-if="display_discount" class="text-right" groups="sale.group_discount_per_so_line">Disc.(%)</th>
|
||||
<th t-if="display_discount" class="text-right">Disc.(%)</th>
|
||||
<th class="text-right">Taxes</th>
|
||||
<th class="text-right">Tax Excluded Price</th>
|
||||
</tr>
|
||||
@@ -77,7 +77,7 @@
|
||||
<td class="text-right">
|
||||
<span t-field="l.price_unit"/>
|
||||
</td>
|
||||
<td t-if="display_discount" class="text-right" groups="sale.group_discount_per_so_line">
|
||||
<td t-if="display_discount" class="text-right">
|
||||
<span t-field="l.discount"/>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
|
||||
@@ -41,6 +41,9 @@ Dashboard for CRM will include:
|
||||
'web_tour',
|
||||
],
|
||||
'data': [
|
||||
'security/crm_security.xml',
|
||||
'security/ir.model.access.csv',
|
||||
|
||||
'data/crm_activity_data.xml',
|
||||
'data/crm_data.xml',
|
||||
'data/crm_stage_data.xml',
|
||||
@@ -49,9 +52,6 @@ Dashboard for CRM will include:
|
||||
'data/web_planner_data.xml',
|
||||
'data/mail_template_data.xml',
|
||||
|
||||
'security/crm_security.xml',
|
||||
'security/ir.model.access.csv',
|
||||
|
||||
'wizard/base_partner_merge_views.xml',
|
||||
'wizard/crm_activity_log_views.xml',
|
||||
'wizard/crm_lead_lost_views.xml',
|
||||
|
||||
@@ -562,7 +562,7 @@
|
||||
<filter string="New Mail" name="message_unread" domain="[('message_unread', '=', True)]"/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Employee" domain="[]" context="{'group_by': 'employee_id'}"/>
|
||||
<filter string="Department" domain="[]" context="{'group_by': 'department_id'}" groups="hr.group_multi_departments"/>
|
||||
<filter string="Department" domain="[]" context="{'group_by': 'department_id'}"/>
|
||||
<filter string="Company" domain="[]" context="{'group_by': 'company_id'}" groups="base.group_multi_company"/>
|
||||
<filter string="Expenses Month" domain="[]" context="{'group_by': 'accounting_date'}" help="Expenses by Month"/>
|
||||
<filter string="State" domain="[]" context="{'group_by': 'state'}" name="state"/>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button class="oe_stat_button" name="%(procurement.procurement_order_action_product_template_stat)d"
|
||||
icon="fa-truck" string="Procurements" type="action"
|
||||
groups="stock.group_adv_location"
|
||||
groups="base.group_no_one"
|
||||
attrs="{'invisible':[('type', '=', 'service')]}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
@@ -24,7 +24,7 @@
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button class="oe_stat_button" name="%(procurement.procurement_order_action_product_product_stat)d"
|
||||
icon="fa-truck" string="Procurements" type="action"
|
||||
groups="stock.group_adv_location"
|
||||
groups="base.group_no_one"
|
||||
attrs="{'invisible':[('type', '=', 'service')]}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
|
||||
@@ -668,6 +668,19 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="account_invoice_line_tree">
|
||||
<field name="name">account.invoice.line.tree</field>
|
||||
<field name="model">account.invoice.line</field>
|
||||
<field name="inherit_id" ref="account.view_invoice_line_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<xpath expr="//field[@name='discount']" position="attributes">
|
||||
<attribute name="groups">sale.group_discount_per_so_line</attribute>
|
||||
</xpath>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="account_invoice_line_form">
|
||||
<field name="name">account.invoice.line.form</field>
|
||||
<field name="model">account.invoice.line</field>
|
||||
@@ -677,6 +690,22 @@
|
||||
<xpath expr="//group/group/field[@name='product_id']" position="after">
|
||||
<field name="layout_category_id" groups="sale.group_sale_layout"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='discount']" position="attributes">
|
||||
<attribute name="groups">sale.group_discount_per_so_line</attribute>
|
||||
</xpath>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="account_invoice_supplier_form">
|
||||
<field name="name">account.invoice.supplier.form</field>
|
||||
<field name="model">account.invoice</field>
|
||||
<field name="inherit_id" ref="account.invoice_supplier_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<xpath expr="//field[@name='discount']" position="attributes">
|
||||
<attribute name="groups">sale.group_discount_per_so_line</attribute>
|
||||
</xpath>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -158,8 +158,8 @@
|
||||
</field>
|
||||
<group name="email_template_and_project" position="before">
|
||||
<group name="sale_condition" string="Sale Conditions">
|
||||
<label for="warranty" groups="stock.group_stock_production_lot"/>
|
||||
<div groups="stock.group_stock_production_lot">
|
||||
<label for="warranty" groups="stock.group_production_lot"/>
|
||||
<div groups="stock.group_production_lot">
|
||||
<field name="warranty" class="oe_inline"/> months
|
||||
</div>
|
||||
<label for="sale_delay"/>
|
||||
@@ -171,6 +171,29 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_template_view_form_procurement_button" model="ir.ui.view">
|
||||
<field name="name">product.template.stock.stat.button.group</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="procurement.product_template_view_form_procurement_button"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@name='%(procurement.procurement_order_action_product_template_stat)d']" position="attributes">
|
||||
<attribute name="groups">base.group_no_one,stock.group_adv_location</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_product_view_form_procurement_button" model="ir.ui.view">
|
||||
<field name="name">product.product.stock.stat.button.group</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="inherit_id" ref="procurement.product_product_view_form_procurement_button"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@name='%(procurement.procurement_order_action_product_product_stat)d']" position="attributes">
|
||||
<attribute name="groups">base.group_no_one,stock.group_adv_location</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="product_template_kanban_stock_view">
|
||||
<field name="name">Product Template Kanban Stock</field>
|
||||
<field name="model">product.template</field>
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
<kanban class="o_kanban_mobile">
|
||||
<field name="product_id" domain="[('type','=','product')]"/>
|
||||
<field name="product_uom_id" groups="product.group_uom" string="UoM"/>
|
||||
<field name="location_id" domain="[('id', 'child_of', parent.location_id)]" groups="stock.group_locations"/>
|
||||
<field name="location_id" domain="[('id', 'child_of', parent.location_id)]" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="prod_lot_id" domain="[('product_id', '=', product_id)]" context="{'default_product_id': product_id}" groups="stock.group_production_lot"/>
|
||||
<field name="package_id" domain="['|', ('location_id','=', False), ('location_id', '=', location_id)]"/>
|
||||
<field name="partner_id"/>
|
||||
|
||||
@@ -279,8 +279,8 @@
|
||||
<field name="owner_id" groups="stock.group_tracking_owner"/>
|
||||
<field name="location_id" domain="[('id', 'child_of', parent.location_id)]" invisible="1"/>
|
||||
<field name="location_dest_id" domain="[('id', 'child_of', parent.location_dest_id)]" invisible="1"/>
|
||||
<field name="from_loc" groups="stock.group_locations,stock.group_tracking_lot"/>
|
||||
<field name="to_loc" groups="stock.group_locations,stock.group_tracking_lot"/>
|
||||
<field name="from_loc" groups="stock.group_stock_multi_locations,stock.group_tracking_lot"/>
|
||||
<field name="to_loc" groups="stock.group_stock_multi_locations,stock.group_tracking_lot"/>
|
||||
<field name="result_package_id" groups="stock.group_tracking_lot" context="{'default_location_id': location_dest_id}" invisible="1"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="product_qty" readonly="1" attrs="{'required': [('product_id', '!=', False)]}"/>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<label for="scrap_qty"/>
|
||||
<div class="o_row">
|
||||
<field name="scrap_qty"/>
|
||||
<field name="product_uom_id" groups="stock.product_group_uom"/>
|
||||
<field name="product_uom_id" groups="product.group_uom"/>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
@@ -76,7 +76,7 @@
|
||||
<field name="create_date" string="Create Date"/>
|
||||
<field name="product_id"/>
|
||||
<field name="scrap_qty"/>
|
||||
<field name="product_uom_id" groups="stock.product_group_uom"/>
|
||||
<field name="product_uom_id" groups="product.group_uom"/>
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="scrap_location_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="state"/>
|
||||
@@ -111,7 +111,7 @@
|
||||
<label for="scrap_qty"/>
|
||||
<div class="o_row">
|
||||
<field name="scrap_qty"/>
|
||||
<field name="product_uom_id" groups="stock.product_group_uom"/>
|
||||
<field name="product_uom_id" groups="product.group_uom"/>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box" position="inside">
|
||||
<button class="oe_stat_button" name="website_publish_button"
|
||||
type="object" icon="fa-globe" groups="base.group_hr_user">
|
||||
type="object" icon="fa-globe" groups="hr.group_hr_user">
|
||||
<field name="website_published" widget="website_button"/>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -12,6 +12,8 @@ Odoo E-Commerce
|
||||
""",
|
||||
'depends': ['website', 'sale', 'payment', 'website_payment', 'website_portal_sale', 'website_mail', 'website_form', 'rating'],
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'security/website_sale.xml',
|
||||
'data/data.xml',
|
||||
'data/web_planner_data.xml',
|
||||
'views/views.xml',
|
||||
@@ -23,8 +25,6 @@ Odoo E-Commerce
|
||||
'views/snippets.xml',
|
||||
'views/report_shop_saleorder.xml',
|
||||
'views/res_config_view.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'security/website_sale.xml',
|
||||
],
|
||||
'demo': [
|
||||
'data/demo.xml',
|
||||
|
||||
@@ -68,6 +68,12 @@ CREATE TABLE res_users (
|
||||
primary key(id)
|
||||
);
|
||||
|
||||
CREATE TABLE res_groups (
|
||||
id serial NOT NULL,
|
||||
name varchar NOT NULL,
|
||||
primary key(id)
|
||||
);
|
||||
|
||||
create table wkf (
|
||||
id serial,
|
||||
name varchar(64),
|
||||
@@ -209,3 +215,7 @@ select setval('res_partner_id_seq', 2);
|
||||
insert into res_users (id, login, password, active, partner_id, company_id) VALUES (1, 'admin', 'admin', true, 1, 1);
|
||||
insert into ir_model_data (name, module, model, noupdate, res_id) VALUES ('user_root', 'base', 'res.users', true, 1);
|
||||
select setval('res_users_id_seq', 2);
|
||||
|
||||
insert into res_groups (id, name) VALUES (1, 'Employee');
|
||||
insert into ir_model_data (name, module, model, noupdate, res_id) VALUES ('group_user', 'base', 'res.groups', true, 1);
|
||||
select setval('res_groups_id_seq', 2);
|
||||
|
||||
Reference in New Issue
Block a user