[IMP] sale,purchase,stock,account: Don't display an empty 'warning' page

And add a category hidden on the res.group definition
This commit is contained in:
Yannick Tivisse
2016-05-06 17:06:35 +02:00
parent b913f41d06
commit 8ff9cbad2c
19 changed files with 35 additions and 32 deletions
+2 -2
View File
@@ -85,10 +85,10 @@ class AccountConfigSettings(models.TransientModel):
group_analytic_accounting = fields.Boolean(string='Analytic accounting',
implied_group='analytic.group_analytic_accounting',
help="Allows you to use the analytic accounting.")
group_warning = fields.Selection([
group_warning_account = fields.Selection([
(0, 'All the partners can be used in invoices'),
(1, 'An informative or blocking warning can be set on a partner')
], "Warning", implied_group='account.group_warning')
], "Warning", implied_group='account.group_warning_account')
currency_exchange_journal_id = fields.Many2one('account.journal',
related='company_id.currency_exchange_journal_id',
string="Rate Difference Journal",)
+3 -2
View File
@@ -30,8 +30,9 @@
<field name="category_id" ref="base.module_category_hidden"/>
</record>
<record id="group_warning" model="res.groups">
<field name="name">An informative or blocking warning can be set on a partner</field>
<record id="group_warning_account" model="res.groups">
<field name="name">A warning can be set on a partner (Account)</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
</data>
+2 -2
View File
@@ -119,8 +119,8 @@
</group>
</group>
<page name="warnings" position="inside">
<group colspan="2" col="2" groups="account.group_warning">
<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"
+1 -1
View File
@@ -225,7 +225,7 @@
<a href="https://www.odoo.com/page/accounting-features" target="_blank"> More Info</a>
</div>
</div>
<field name="group_warning" widget="radio"/>
<field name="group_warning_account" widget="radio"/>
</group>
<group attrs="{'invisible': [('has_chart_of_accounts','=',False)]}">
<label for="id" string="Taxes"/>
+2 -2
View File
@@ -79,8 +79,8 @@
<field string="Purchases" name="purchase_order_count" widget="statinfo"/>
</button>
</div>
<page name="warnings" position="inside">
<group colspan="2" col="2" groups="purchase.group_warning">
<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"
+1 -1
View File
@@ -540,7 +540,7 @@
<field name="purchase_method" widget="radio" groups="purchase.group_purchase_manager"/>
</field>
<group name="description" position="after">
<group string="Warning when Purchasing this Product" colspan="2" groups="purchase.group_warning">
<group string="Warning when Purchasing this Product" colspan="2" groups="purchase.group_warning_purchase">
<field name="purchase_line_warn" nolabel="1"/>
<field name="purchase_line_warn_msg" colspan="3" nolabel="1"
attrs="{'required':[('purchase_line_warn','!=','no-message')],'readonly':[('purchase_line_warn','=','no-message')]}"/>
+2 -2
View File
@@ -34,10 +34,10 @@ class purchase_config_settings(osv.osv_memory):
help="Calls for tenders are used when you want to generate requests for quotations to several vendors for a given set of products.\n"
"You can configure per product if you directly do a Request for Quotation "
"to one vendor or if you want a Call for Tenders to compare offers from several vendors."),
'group_warning': fields.selection([
'group_warning_purchase': fields.selection([
(0, 'All the products and the customers can be used in purchase orders'),
(1, 'An informative or blocking warning can be set on a product or a customer')
], "Warning", implied_group='purchase.group_warning'),
], "Warning", implied_group='purchase.group_warning_purchase'),
'module_stock_dropshipping': fields.selection([
(0, 'Suppliers always deliver to your warehouse(s)'),
(1, "Allow suppliers to deliver directly to your customers")
+1 -1
View File
@@ -16,7 +16,7 @@
<field name="group_costing_method" widget="radio"/>
<field name="module_purchase_requisition" widget="radio"/>
<field name="group_manage_vendor_price" widget="radio"/>
<field name="group_warning" widget="radio"/>
<field name="group_warning_purchase" widget="radio"/>
</group>
<group string="Location &amp; Warehouse">
<field name="module_stock_dropshipping" widget="radio"/>
@@ -30,8 +30,9 @@
<field name="category_id" ref="base.module_category_hidden"/>
</record>
<record id="group_warning" model="res.groups">
<field name="name">An informative or blocking warning can be set on a product or a customer</field>
<record id="group_warning_purchase" model="res.groups">
<field name="name">A warning can be set on a product or a customer (Purchase)</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
</data>
+2 -2
View File
@@ -49,10 +49,10 @@ class sale_configuration(osv.TransientModel):
(0, 'Do not personalize sale orders and invoice reports'),
(1, 'Personalize the sale orders and invoice report with categories, subtotals and page-breaks')
], "Sale Reports Layout", implied_group='sale.group_sale_layout'),
'group_warning': fields.selection([
'group_warning_sale': fields.selection([
(0, 'All the products and the customers can be used in sale orders'),
(1, 'An informative or blocking warning can be set on a product or a customer')
], "Warning", implied_group='sale.group_warning'),
], "Warning", implied_group='sale.group_warning_sale'),
'module_website_quote': fields.selection([
(0, 'Print quotes or send by email'),
(1, 'Send online quotations based on templates (advanced)')
+1 -1
View File
@@ -20,7 +20,7 @@
<field name="module_sale_margin" widget="radio"/>
<field name="group_sale_layout" widget="radio"/>
<field name="auto_done_setting" widget="radio"/>
<field name="group_warning" widget="radio"/>
<field name="group_warning_sale" widget="radio"/>
<label for="sale_pricelist_setting" string="Sale Price"/>
<div>
<field name="sale_pricelist_setting" class="oe_inline" widget="radio" on_change="onchange_sale_price(sale_pricelist_setting)"/>
+3 -3
View File
@@ -49,9 +49,9 @@
<field string="Sales" name="sale_order_count" widget="statinfo"/>
</button>
</div>
<page name="warnings" position="inside">
<group colspan="2" col="2">
<separator string="Warning on the Sales Order" colspan="4" groups="sale.group_warning"/>
<page name="internal_notes" position="inside">
<group colspan="2" col="2" groups="sale.group_warning_sale">
<separator string="Warning on the Sales Order" colspan="4" />
<field name="sale_warn" nolabel="1" />
<field name="sale_warn_msg" colspan="3" nolabel="1"
attrs="{'required':[('sale_warn','!=','no-message')],'readonly':[('sale_warn','=','no-message')]}"/>
+1 -1
View File
@@ -583,7 +583,7 @@
</button>
</div>
<group name="description" position="after">
<group string="Warning when Selling this Product" colspan="2" groups="sale.group_warning">
<group string="Warning when Selling this Product" colspan="2" 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')]}"/>
+3 -2
View File
@@ -50,8 +50,9 @@
<field name="category_id" ref="base.module_category_hidden"/>
</record>
<record id="group_warning" model="res.groups">
<field name="name">An informative or blocking warning can be set on a product or a customer</field>
<record id="group_warning_sale" model="res.groups">
<field name="name">A warning can be set on a product or a customer (Sale)</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
<record id="group_analytic_accounting" model="res.groups">
+2 -2
View File
@@ -84,10 +84,10 @@ class StockSettings(models.TransientModel):
], "Routes",
implied_group='stock.group_adv_location',
help="""This option supplements the warehouse application by effectively implementing Push and Pull inventory flows through Routes.""")
group_warning = fields.Selection([
group_warning_stock = fields.Selection([
(0, 'All the partners can be used in pickings'),
(1, 'An informative or blocking warning can be set on a partner')
], "Warning", implied_group='stock.group_warning')
], "Warning", implied_group='stock.group_warning_stock')
decimal_precision = fields.Integer('Decimal precision on weight', help="As an example, a decimal precision of 2 will allow weights like: 9.99 kg, whereas a decimal precision of 4 will allow weights like: 0.0231 kg.")
propagation_minimum_delta = fields.Integer("Minimum days to trigger a propagation of date change in pushed/pull flows.", related='company_id.propagation_minimum_delta')
module_stock_dropshipping = fields.Selection([
+3 -2
View File
@@ -48,8 +48,9 @@
<field name="category_id" ref="base.module_category_hidden"/>
</record>
<record id="group_warning" model="res.groups">
<field name="name">An informative or blocking warning can be set on a partner</field>
<record id="group_warning_stock" model="res.groups">
<field name="name">A warning can be set on a partner (Stock)</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
</data>
<data noupdate="1">
+2 -2
View File
@@ -26,8 +26,8 @@
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<page name="warnings" position="inside">
<group colspan="2" col="2" groups="stock.group_warning">
<page name="internal_notes" position="inside">
<group colspan="2" col="2" groups="stock.group_warning_stock">
<separator string="Warning on the Picking" colspan="4"/>
<field name="picking_warn" nolabel="1" />
<field name="picking_warn_msg" colspan="3" nolabel="1"
@@ -74,7 +74,7 @@
<field name="module_stock_dropshipping" widget="radio"/>
<field name="module_stock_picking_wave" widget="radio"/>
<field name="module_stock_calendar" widget="radio"/>
<field name="group_warning" widget="radio"/>
<field name="group_warning_stock" widget="radio"/>
</group>
<group string="Products">
<field name="group_uom" widget="radio"/>
@@ -320,7 +320,6 @@
</group>
</group>
</page>
<page string="Warnings" name="warnings"/>
</notebook>
</sheet>
</form>