[IMP] sale,account: Various UX improvements and cleanings for onboarding purpose
SPECIFICATION: ============== - hide income account in invoicing wizard (if user is not a accounting accountant at least) - hide Inventory tab in products form if no access to Inventory app - in internal category form, hide accounts if user is not an accounting accountant - hide Vendors if no access to purchase (as well as Description for Vendors in Notes) - remove Warranty or hide it with related access rights - tax cloud config is not userfriendly (product form, what is TIC category? what does it imply?) - rename Accounting tab (in products) into "Invoicing" and move Invoicing Policy and Taxcloud Config there. Make tax field visible for sales - reset Internal notes field on product (under Notes). Used by many companies and useful for search on website. - invoice: validate button should be for billing users only - a sales user can't see Configuration menu (with salesteams) - a sales user should not see Invoicing report link &nd settings link in salesteam dashboard - a sales user should not see the field for invoicing target in dashboard (in invoicing if activated for salesteam) - In sales team, quotations and invoices should be only one option -> that way invoicing fields & targets show up to the admin - SO status: sale order -> Sales Order - Everywhere: Payment Term -> Payment Terms
This commit is contained in:
@@ -352,12 +352,12 @@
|
||||
<button name="action_invoice_sent" type="object" string="Send by Email" attrs="{'invisible':['|',('sent','=',False), ('state', '!=', 'open')]}" groups="base.group_user"/>
|
||||
<button name="invoice_print" string="Print Invoice" type="object" attrs="{'invisible':['|',('sent','=',False), ('state', '!=', 'open')]}" groups="base.group_user"/>
|
||||
<button name="%(action_account_invoice_payment)d" type="action" states="open" string="Register Payment" groups="account.group_account_invoice" class="oe_highlight"/>
|
||||
<button name="invoice_open" states="draft" string="Validate" class="oe_highlight" groups="base.group_user"/>
|
||||
<button name="invoice_open" states="proforma2" string="Validate" groups="base.group_user"/>
|
||||
<button name="invoice_open" states="draft" string="Validate" class="oe_highlight" groups="account.group_account_user"/>
|
||||
<button name="invoice_open" states="proforma2" string="Validate" groups="account.group_account_user"/>
|
||||
<button name="invoice_proforma2" states="draft" string="PRO-FORMA" groups="account.group_proforma_invoices"/>
|
||||
<button name="%(action_account_invoice_refund)d" type='action' string='Refund Invoice' groups="base.group_user" attrs="{'invisible': ['|',('type', '=', 'out_refund'), ('state', 'not in', ('open','proforma2','paid'))]}"/>
|
||||
<button name="%(action_account_invoice_refund)d" type='action' string='Refund Invoice' groups="account.group_account_user" attrs="{'invisible': ['|',('type', '=', 'out_refund'), ('state', 'not in', ('open','proforma2','paid'))]}"/>
|
||||
<button name="invoice_cancel" states="draft,proforma2,open" string="Cancel Invoice" groups="base.group_no_one"/>
|
||||
<button name="action_cancel_draft" states="cancel" string="Reset to Draft" type="object" groups="base.group_user"/>
|
||||
<button name="action_cancel_draft" states="cancel" string="Reset to Draft" type="object" groups="account.group_account_user"/>
|
||||
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,open,paid"/>
|
||||
</header>
|
||||
<div class="alert alert-info" role="alert" style="margin-bottom:0px;" attrs="{'invisible': [('has_outstanding','=',False)]}">
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<field name="inherit_id" ref="product.product_template_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<page name="sales" position="after">
|
||||
<page string="Accounting" groups="account.group_account_invoice">
|
||||
<page string="Invoicing" name="invoicing" groups="account.group_account_invoice">
|
||||
<group name="properties">
|
||||
<group>
|
||||
<field name="property_account_income_id"
|
||||
@@ -35,7 +35,7 @@
|
||||
<field name="inherit_id" ref="product.product_category_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<group name="first" position="after">
|
||||
<group name="account_property">
|
||||
<group name="account_property" groups="account.group_account_manager">
|
||||
<group string="Account Properties">
|
||||
<field name="property_account_income_categ_id" domain="[('internal_type','=','other'),('deprecated', '=', False)]"/>
|
||||
<field name="property_account_expense_categ_id" domain="[('internal_type','=','other'),('deprecated', '=', False)]"/>
|
||||
|
||||
@@ -50,7 +50,8 @@
|
||||
id="sales_team.menu_sale_config"
|
||||
name="Configuration"
|
||||
parent="sales_team.menu_base_partner"
|
||||
sequence="100"/>
|
||||
sequence="100"
|
||||
groups="sales_team.group_sale_manager"/>
|
||||
|
||||
<menuitem
|
||||
id="sales_team.menu_sale_general_settings"
|
||||
|
||||
@@ -74,12 +74,6 @@
|
||||
</field>
|
||||
</div>
|
||||
<group name="sale">
|
||||
<group name="sale_condition" string="Sale Conditions">
|
||||
<label for="warranty"/>
|
||||
<div>
|
||||
<field name="warranty" class="oe_inline"/> months
|
||||
</div>
|
||||
</group>
|
||||
<group name="email_template_and_project"
|
||||
attrs="{'invisible':[('type', '!=', 'service')]}"/>
|
||||
</group>
|
||||
@@ -89,9 +83,6 @@
|
||||
<separator string="Description for Quotations" colspan="4"/>
|
||||
<field name="description_sale" colspan="4" nolabel="1"
|
||||
placeholder="This note will be displayed on the quotations."/>
|
||||
<separator string="Description for Vendors" colspan="4"/>
|
||||
<field name="description_purchase" nolabel="1"
|
||||
placeholder="This note will be displayed on requests for quotation." colspan="4"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
|
||||
@@ -561,6 +561,11 @@
|
||||
attrs="{'required':[('purchase_line_warn','!=','no-message')],'readonly':[('purchase_line_warn','=','no-message')]}"/>
|
||||
</group>
|
||||
</group>
|
||||
<field name="description_sale" position="after">
|
||||
<separator string="Description for Vendors" colspan="4"/>
|
||||
<field name="description_purchase" nolabel="1"
|
||||
placeholder="This note will be displayed on requests for quotation." colspan="4"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ class SaleOrder(models.Model):
|
||||
state = fields.Selection([
|
||||
('draft', 'Quotation'),
|
||||
('sent', 'Quotation Sent'),
|
||||
('sale', 'Sale Order'),
|
||||
('sale', 'Sales Order'),
|
||||
('done', 'Locked'),
|
||||
('cancel', 'Cancelled'),
|
||||
], string='Status', readonly=True, copy=False, index=True, track_visibility='onchange', default='draft')
|
||||
|
||||
@@ -54,3 +54,8 @@ class CrmTeam(models.Model):
|
||||
@api.multi
|
||||
def update_invoiced_target(self, value):
|
||||
return self.write({'invoiced_target': round(float(value or 0))})
|
||||
|
||||
@api.onchange('use_quotations')
|
||||
def _onchange_use_quotation(self):
|
||||
if self.use_quotations:
|
||||
self.use_invoices = True
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<field name="default_invoice_policy" widget="radio"/>
|
||||
<field name="deposit_product_id_setting" class="oe_inline"/>
|
||||
</group>
|
||||
<group string="Quotations & Sales" id="sale">
|
||||
<group string="Quotations & Sales" id="sale" name="quotations_sales">
|
||||
<field name="group_sale_delivery_address" widget="radio"/>
|
||||
<field name="group_discount_per_so_line" widget="radio"/>
|
||||
<field name="module_product_visible_discount" widget="radio" attrs="{'invisible': [('group_discount_per_so_line', '=', False)]}"/>
|
||||
@@ -61,7 +61,7 @@
|
||||
</record>
|
||||
|
||||
<menuitem id="sales_team.menu_sale_config" name="Configuration" parent="sales_team.menu_base_partner"
|
||||
sequence="100"/>
|
||||
sequence="100" groups="sales_team.group_sale_manager"/>
|
||||
<menuitem id="sales_team.menu_sale_general_settings" name="Settings" parent="sales_team.menu_sale_config"
|
||||
sequence="0" action="sales_team.action_sale_config" groups="base.group_system"/>
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<menuitem id="next_id_16" name="Units of Measure" parent="sale.prod_config_main" sequence="30" groups="product.group_uom"/>
|
||||
<menuitem action="product.product_uom_form_action" id="menu_product_uom_form_action" parent="sale.prod_config_main" sequence="6" groups="product.group_uom"/>
|
||||
<menuitem action="product.product_uom_categ_form_action" id="menu_product_uom_categ_form_action" parent="sale.prod_config_main" sequence="7" groups="base.group_no_one"/>
|
||||
<menuitem id="sales_team.menu_sale_config_sales" name="Configuration" parent="sales_team.menu_base_partner" sequence="100"/>
|
||||
<menuitem id="sales_team.menu_sale_config_sales" name="Configuration" parent="sales_team.menu_base_partner" sequence="100" groups="account.group_account_user"/>
|
||||
<menuitem id="menu_product_pricelist_main" name="Pricelists" parent="sales_team.menu_sale_config" groups="product.group_sale_pricelist" sequence="3"/>
|
||||
<menuitem action="product.product_pricelist_action2" id="menu_product_pricelist_action2" parent="menu_product_pricelist_main" sequence="1" groups="product.group_sale_pricelist"/>
|
||||
|
||||
@@ -620,13 +620,13 @@
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<group name="sale" position="inside">
|
||||
<separator string="Invoicing Policy" colspan="4"/>
|
||||
<page name="invoicing" position="inside">
|
||||
<separator string="Invoicing Policy"/>
|
||||
<group>
|
||||
<field name="invoice_policy" widget="radio"/>
|
||||
<field name="track_service" widget="radio" invisible="True"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -79,11 +79,11 @@
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//div[contains(@class, 'o_kanban_primary_right')]" position="after">
|
||||
<div t-if="record.invoiced_target.raw_value" class="col-xs-12 o_kanban_primary_bottom">
|
||||
<div t-if="record.invoiced_target.raw_value" class="col-xs-12 o_kanban_primary_bottom" groups="sales_team.group_sale_manager">
|
||||
<field name="invoiced" widget="progress" title="Invoicing" options="{'current_value': 'invoiced', 'max_value': 'invoiced_target', 'editable': true, 'edit_max_value': true, 'on_change': 'update_invoiced_target'}"/>
|
||||
</div>
|
||||
<div t-if="!record.invoiced_target.raw_value" class="col-xs-12 o_kanban_primary_bottom text-center">
|
||||
<a href="#" class="sales_team_target_definition o_inline_link">Click to define a team target</a>
|
||||
<div t-if="!record.invoiced_target.raw_value" class="col-xs-12 o_kanban_primary_bottom text-center" groups="sales_team.group_sale_manager">
|
||||
<a href="#" class="sales_team_target_definition o_inline_link">Click to define a team target</a>
|
||||
</div>
|
||||
</xpath>
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
</a>
|
||||
</div>
|
||||
</t>
|
||||
<div t-if="record.use_invoices.raw_value">
|
||||
<div t-if="record.use_invoices.raw_value" groups="account.group_account_invoice">
|
||||
<a name="%(action_account_invoice_report_salesteam)d" type="action">
|
||||
Invoices
|
||||
</a>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
attrs="{'invisible': [('advance_payment_method', '!=', 'percentage')]}" class="oe_inline"/>
|
||||
</div>
|
||||
<field name="deposit_account_id" class="oe_inline"
|
||||
attrs="{'invisible': ['|', ('advance_payment_method', 'not in', ('fixed', 'percentage')), ('product_id', '!=', False)]}"/>
|
||||
attrs="{'invisible': ['|', ('advance_payment_method', 'not in', ('fixed', 'percentage')), ('product_id', '!=', False)]}" groups="account.group_account_manager"/>
|
||||
<field name="deposit_taxes_id" class="oe_inline" widget="many2many_tags"
|
||||
domain="[('type_tax_use','=','sale')]"
|
||||
attrs="{'invisible': ['|', ('advance_payment_method', 'not in', ('fixed', 'percentage')), ('product_id', '!=', False)]}"/>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
<record model="ir.ui.menu" id="sales_team.menu_sale_config">
|
||||
<field name="name">Configuration</field>
|
||||
<field eval="[(6,0,[ref('base.group_system'), ref('base.group_partner_manager')])]" name="groups_id"/>
|
||||
<field eval="[(6,0,[ref('base.group_system')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.menu" id="menu_config_address_book">
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div t-if="widget.editable" class="o_kanban_card_manage_settings row">
|
||||
<div t-if="widget.editable" class="o_kanban_card_manage_settings row" groups="sales_team.group_sale_manager">
|
||||
<div class="col-xs-8">
|
||||
<ul class="oe_kanban_colorpicker" data-field="color"/>
|
||||
</div>
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
</group>
|
||||
</page>
|
||||
</page>
|
||||
<field name="description_purchase" position="after">
|
||||
<field name="description_sale" position="after">
|
||||
<separator string="Description for Pickings" colspan="4"/>
|
||||
<field name="description_picking" placeholder="Description for Pickings (Rack, Row and Case Information)" nolabel="1" colspan="4"/>
|
||||
</field>
|
||||
@@ -358,6 +358,14 @@
|
||||
class="oe_stat_button" icon="fa-cogs"
|
||||
groups="stock.group_adv_location"/>
|
||||
</div>
|
||||
<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">
|
||||
<field name="warranty" class="oe_inline"/> months
|
||||
</div>
|
||||
</group>
|
||||
</group>
|
||||
<group name="sale_condition" position="inside">
|
||||
<label for="sale_delay"/>
|
||||
<div>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<field name="property_stock_journal"/>
|
||||
</group>
|
||||
</group>
|
||||
<group name="account_property" position="after">
|
||||
<group name="account_property" position="before">
|
||||
<group>
|
||||
<group string="Inventory Valuation">
|
||||
<field name="property_cost_method" groups="stock_account.group_inventory_valuation"/>
|
||||
|
||||
Reference in New Issue
Block a user