[FIX] Currency computation on partners
[FIX] CRM dashboard links and default filters [IMP] partner form view
This commit is contained in:
@@ -413,7 +413,7 @@ class ResPartner(models.Model):
|
||||
debit_limit = fields.Monetary('Payable Limit')
|
||||
total_invoiced = fields.Monetary(compute='_invoice_total', string="Total Invoiced",
|
||||
groups='account.group_account_invoice')
|
||||
currency_id = fields.Many2one('res.currency', compute='_get_company_currency', store=True, readonly=True,
|
||||
currency_id = fields.Many2one('res.currency', compute='_get_company_currency', readonly=True,
|
||||
help='Utility field to express amount currency')
|
||||
|
||||
contracts_count = fields.Integer(compute='_journal_item_count', string="Contracts", type='integer')
|
||||
|
||||
@@ -101,18 +101,24 @@
|
||||
attrs="{'invisible': [('customer', '=', False)]}"
|
||||
context="{'search_default_partner_id': active_id,'default_partner_id': active_id}">
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_value"><field name="total_invoiced"/></span>
|
||||
<span class="o_stat_value"><field name="total_invoiced" widget='monetary' options="{'currency_field': 'currency_id'}"/></span>
|
||||
<span class="o_stat_text">Invoiced</span>
|
||||
</div>
|
||||
</button>
|
||||
<button class="oe_stat_button" type="action"
|
||||
name="%(base.action_res_partner_bank_account_form)d"
|
||||
icon="fa-university"
|
||||
context="{'search_default_partner_id': active_id, 'default_partner_id': active_id}">
|
||||
<field string="Bank Accounts" name="bank_account_count" widget="statinfo"/>
|
||||
</button>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
</div>
|
||||
<group name="container_row_2" position="inside">
|
||||
<group string="Payments" name="banks">
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<div>
|
||||
<button type="action" class="btn-link"
|
||||
name="%(base.action_res_partner_bank_account_form)d"
|
||||
context="{'search_default_partner_id': active_id, 'default_partner_id': active_id}">
|
||||
<field string="Bank account(s)" name="bank_account_count" widget="statinfo"/>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</group>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -102,6 +102,9 @@
|
||||
<filter string="Current" name="current"
|
||||
domain="[('active', '=', True)]"/>
|
||||
<separator/>
|
||||
<filter string="My Opportunities" name="my"
|
||||
domain="[('user_id', '=', uid)]"/>
|
||||
<separator/>
|
||||
<filter name="lead" string="Lead" domain="[('type','=', 'lead')]" help="Show only lead"/>
|
||||
<filter name="opportunity" string="Opportunity" domain="[('type','=','opportunity')]" help="Show only opportunity"/>
|
||||
<separator/>
|
||||
@@ -151,7 +154,7 @@
|
||||
<field name="res_model">crm.opportunity.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">pivot,graph</field>
|
||||
<field name="context">{'search_default_opportunity': True, 'search_default_current': True, 'active_test': True}</field>
|
||||
<field name="context">{'search_default_opportunity': True, 'search_default_current': True, 'active_test': True, 'search_default_my': True}</field>
|
||||
<field name="view_ids"
|
||||
eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'pivot', 'view_id': ref('crm_opportunity_report_view_pivot')}),
|
||||
|
||||
@@ -33,7 +33,7 @@ Both goals and badges are flexibles and can be adapted to a large range of modul
|
||||
'data/badge.xml',
|
||||
'views/gamification.xml',
|
||||
],
|
||||
'application': True,
|
||||
'application': False,
|
||||
'auto_install': False,
|
||||
'qweb': ['static/src/xml/gamification.xml'],
|
||||
}
|
||||
|
||||
@@ -6,15 +6,13 @@
|
||||
<record id="view_partners_form_payment_defaultcreditcard" model="ir.ui.view">
|
||||
<field name="name">view.res.partner.form.payment.defaultcreditcard</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="inherit_id" ref="account.partner_view_buttons"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr='//div[@name="button_box"]' position="inside">
|
||||
<button type="action" class="oe_stat_button"
|
||||
<xpath expr='//group[@name="banks"]' position="inside">
|
||||
<button type="action" class="btn-link"
|
||||
name="%(payment.payment_method_action)d"
|
||||
groups="base.group_sale_salesman"
|
||||
icon="fa-credit-card"
|
||||
context="{'search_default_partner_id': active_id}">
|
||||
<field name="payment_method_count" widget="statinfo" string="Payment Methods"/>
|
||||
<field name="payment_method_count" widget="statinfo" string="Credit card(s)"/>
|
||||
</button>
|
||||
</xpath>
|
||||
</field>
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
<div t-attf-class="o_left_panel #{show_demo ? 'o_demo' : ''}">
|
||||
<table border="0" class="table">
|
||||
<tr>
|
||||
<td class="o_highlight o_text">
|
||||
<td class="o_text">
|
||||
<div class="o_highlight">To do</div>
|
||||
Today
|
||||
</td>
|
||||
<td class="o_main" title="To Calendar">
|
||||
@@ -42,7 +43,7 @@
|
||||
</a>
|
||||
</td>
|
||||
<td class="o_main" title="To Opportunities">
|
||||
<a href="#" class="o_dashboard_action" name="crm.crm_lead_opportunities">
|
||||
<a href="#" class="o_dashboard_action" name="crm.action_your_pipeline">
|
||||
<span class="o_highlight">
|
||||
<t t-if="!show_demo">
|
||||
<t t-esc="values['closing']['today']"/>
|
||||
@@ -78,7 +79,7 @@
|
||||
</a>
|
||||
</td>
|
||||
<td class="o_main" title="To Opportunities">
|
||||
<a href="#" class="o_dashboard_action" name="crm.crm_lead_opportunities">
|
||||
<a href="#" class="o_dashboard_action" name="crm.action_your_pipeline">
|
||||
<t t-if="!show_demo">
|
||||
<t t-esc="values['closing']['next_7_days']"/>
|
||||
</t>
|
||||
@@ -103,7 +104,7 @@
|
||||
</a>
|
||||
</td>
|
||||
<td t-if="show_demo or (values and values['closing']['overdue'] != 0)" class="o_warning" title="To Opportunities">
|
||||
<a href="#" class="o_dashboard_action" name="crm.crm_lead_opportunities">
|
||||
<a href="#" class="o_dashboard_action" name="crm.action_your_pipeline">
|
||||
<t t-if="!show_demo">
|
||||
<t t-esc="values['closing']['overdue']"/> overdue
|
||||
</t>
|
||||
@@ -119,7 +120,8 @@
|
||||
<div t-attf-class="o_right_panel #{show_demo ? 'o_demo' : ''}">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td class="o_highlight o_text">
|
||||
<td class="o_text">
|
||||
<div class="o_highlight">Performance</div>
|
||||
This Month
|
||||
</td>
|
||||
<td class="o_secondary" title="To Activity Report">
|
||||
@@ -145,7 +147,7 @@
|
||||
78,140.03€
|
||||
</t>
|
||||
</span> <br/>
|
||||
Opportunities Won
|
||||
Won in Opportunities
|
||||
</a>
|
||||
</td>
|
||||
<td t-if="values['invoiced']" class="o_secondary" title="To Invoice Report">
|
||||
|
||||
@@ -299,15 +299,6 @@
|
||||
<field name="comment" placeholder="Internal note..."/>
|
||||
</page>
|
||||
<page name='sales_purchases' string="Sales & Purchases">
|
||||
<group name="container_row_1">
|
||||
<group>
|
||||
<field name="ref"/>
|
||||
<field name="active"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group name="container_row_2">
|
||||
<group string="Sale" name="sale">
|
||||
<field name="customer"/>
|
||||
@@ -317,6 +308,11 @@
|
||||
<group string="Purchase" name="purchase">
|
||||
<field name="supplier"/>
|
||||
</group>
|
||||
<group string="Misc">
|
||||
<field name="ref"/>
|
||||
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
||||
<field name="active"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
|
||||
Reference in New Issue
Block a user