diff options
| author | Fabien Pinckaers <fp@openerp.com> | 2015-08-30 13:49:31 +0200 |
|---|---|---|
| committer | Fabien Pinckaers <fp@openerp.com> | 2015-08-30 13:49:31 +0200 |
| commit | f0fa04e9f6ea15c2e84c054b40aa64b7a977fa6a (patch) | |
| tree | efd90d2957342f5f148e1d8e9b4f336558480059 | |
| parent | 16b0aec7b52bfb1559b77b3a818cf672a94d9fb5 (diff) | |
[FIX] Currency computation on partners
[FIX] CRM dashboard links and default filters
[IMP] partner form view
| -rw-r--r-- | addons/account/models/partner.py | 2 | ||||
| -rw-r--r-- | addons/account/views/partner_view.xml | 22 | ||||
| -rw-r--r-- | addons/crm/report/crm_opportunity_report_view.xml | 5 | ||||
| -rw-r--r-- | addons/gamification/__openerp__.py | 2 | ||||
| -rw-r--r-- | addons/payment/views/res_partner_view.xml | 10 | ||||
| -rw-r--r-- | addons/sales_team/static/src/xml/sales_team_dashboard.xml | 14 | ||||
| -rw-r--r-- | openerp/addons/base/res/res_partner_view.xml | 14 |
7 files changed, 37 insertions, 32 deletions
diff --git a/addons/account/models/partner.py b/addons/account/models/partner.py index 192dd6c57fa..efb08de211b 100644 --- a/addons/account/models/partner.py +++ b/addons/account/models/partner.py @@ -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') diff --git a/addons/account/views/partner_view.xml b/addons/account/views/partner_view.xml index e77721617b8..a36c331d0db 100644 --- a/addons/account/views/partner_view.xml +++ b/addons/account/views/partner_view.xml @@ -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> diff --git a/addons/crm/report/crm_opportunity_report_view.xml b/addons/crm/report/crm_opportunity_report_view.xml index 97920febba1..cc4f45179e5 100644 --- a/addons/crm/report/crm_opportunity_report_view.xml +++ b/addons/crm/report/crm_opportunity_report_view.xml @@ -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')}), diff --git a/addons/gamification/__openerp__.py b/addons/gamification/__openerp__.py index f38707d0014..c73a73c02d5 100644 --- a/addons/gamification/__openerp__.py +++ b/addons/gamification/__openerp__.py @@ -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'], } diff --git a/addons/payment/views/res_partner_view.xml b/addons/payment/views/res_partner_view.xml index 41ac76b85a1..056656839d4 100644 --- a/addons/payment/views/res_partner_view.xml +++ b/addons/payment/views/res_partner_view.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> diff --git a/addons/sales_team/static/src/xml/sales_team_dashboard.xml b/addons/sales_team/static/src/xml/sales_team_dashboard.xml index c8e73806493..d8c8a8c7c4c 100644 --- a/addons/sales_team/static/src/xml/sales_team_dashboard.xml +++ b/addons/sales_team/static/src/xml/sales_team_dashboard.xml @@ -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"> diff --git a/openerp/addons/base/res/res_partner_view.xml b/openerp/addons/base/res/res_partner_view.xml index 109b44b8487..708c48309db 100644 --- a/openerp/addons/base/res/res_partner_view.xml +++ b/openerp/addons/base/res/res_partner_view.xml @@ -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> |
