kongrattapong
5 years ago
committed by
Víctor Martínez
10 changed files with 93 additions and 85 deletions
-
11partner_capital/README.rst
-
2partner_capital/__init__.py
-
2partner_capital/__manifest__.py
-
15partner_capital/i18n/partner_capital.pot
-
2partner_capital/models/__init__.py
-
14partner_capital/models/res_partner.py
-
1partner_capital/readme/CONTRIBUTORS.rst
-
7partner_capital/static/description/index.html
-
43partner_capital/views/res_partner_turnover_range_view.xml
-
81partner_capital/views/res_partner_view.xml
@ -1 +1,3 @@ |
|||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
|||
|
|||
from . import models |
@ -1,2 +1,4 @@ |
|||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
|||
|
|||
from . import res_partner_turnover_range |
|||
from . import res_partner |
@ -1,26 +1,21 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
|
|||
<odoo> |
|||
|
|||
<record id="res_partner_turnover_range_action" model="ir.actions.act_window"> |
|||
<field name="name">Turnover ranges</field> |
|||
<field name="res_model">res.partner.turnover_range</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree</field> |
|||
</record> |
|||
|
|||
<record id="res_partner_turnover_range_tree_view" model="ir.ui.view"> |
|||
<field name="name">CRM Turnover range tree</field> |
|||
<field name="model">res.partner.turnover_range</field> |
|||
<field name="arch" type="xml"> |
|||
<tree string="Turnover ranges" editable="top"> |
|||
<field name="name"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<menuitem id="menu_res_partner_turnover_range" |
|||
action="res_partner_turnover_range_action" |
|||
parent="contacts.res_partner_menu_config"/> |
|||
|
|||
<record id="res_partner_turnover_range_action" model="ir.actions.act_window"> |
|||
<field name="name">Turnover ranges</field> |
|||
<field name="res_model">res.partner.turnover_range</field> |
|||
<field name="view_mode">tree</field> |
|||
</record> |
|||
<record id="res_partner_turnover_range_tree_view" model="ir.ui.view"> |
|||
<field name="name">CRM Turnover range tree</field> |
|||
<field name="model">res.partner.turnover_range</field> |
|||
<field name="arch" type="xml"> |
|||
<tree string="Turnover ranges" editable="top"> |
|||
<field name="name" /> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
<menuitem |
|||
id="menu_res_partner_turnover_range" |
|||
action="res_partner_turnover_range_action" |
|||
parent="contacts.res_partner_menu_config" |
|||
/> |
|||
</odoo> |
@ -1,47 +1,50 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
|
|||
<odoo> |
|||
|
|||
<record model="ir.ui.view" id="view_partner_form_capital"> |
|||
<field name="name">Partner form with capital info</field> |
|||
<field name="model">res.partner</field> |
|||
<field name="inherit_id" ref="base.view_partner_form"/> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//page[@name='sales_purchases']/group" position="inside"> |
|||
<group name="capital" |
|||
string="Capital" |
|||
attrs="{'invisible': [('is_company', '=', False)]}"> |
|||
<field name="capital_amount"/> |
|||
<field name="capital_currency_id"/> |
|||
<field name="capital_country_id"/> |
|||
<field name="turnover_amount"/> |
|||
<field name="turnover_range_id"/> |
|||
<field name="company_size"/> |
|||
</group> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model="ir.ui.view" id="view_res_partner_filter_capital"> |
|||
<field name="name">Partner search with capital</field> |
|||
<field name="model">res.partner</field> |
|||
<field name="inherit_id" ref="base.view_res_partner_filter"/> |
|||
<field name="arch" type="xml"> |
|||
<filter name="salesperson" position="after"> |
|||
<filter string="Capital country" |
|||
<record id="view_partner_form_capital" model="ir.ui.view"> |
|||
<field name="name">Partner form with capital info</field> |
|||
<field name="model">res.partner</field> |
|||
<field name="inherit_id" ref="base.view_partner_form" /> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//page[@name='sales_purchases']/group" position="inside"> |
|||
<group |
|||
name="capital" |
|||
string="Capital" |
|||
attrs="{'invisible': [('is_company', '=', False)]}" |
|||
> |
|||
<field name="capital_amount" /> |
|||
<field name="capital_currency_id" /> |
|||
<field name="capital_country_id" /> |
|||
<field name="turnover_amount" /> |
|||
<field name="turnover_range_id" /> |
|||
<field name="company_size" /> |
|||
</group> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
<record id="view_res_partner_filter_capital" model="ir.ui.view"> |
|||
<field name="name">Partner search with capital</field> |
|||
<field name="model">res.partner</field> |
|||
<field name="inherit_id" ref="base.view_res_partner_filter" /> |
|||
<field name="arch" type="xml"> |
|||
<filter name="salesperson" position="after"> |
|||
<filter |
|||
string="Capital country" |
|||
name="capital_country" |
|||
domain="[('is_company', '=', True)]" |
|||
context="{'group_by': 'capital_country_id'}"/> |
|||
<filter string="Turnover" |
|||
context="{'group_by': 'capital_country_id'}" |
|||
/> |
|||
<filter |
|||
string="Turnover" |
|||
name="turnover" |
|||
domain="[('is_company', '=', True)]" |
|||
context="{'group_by': 'turnover_range_id'}"/> |
|||
<filter string="Company size" |
|||
context="{'group_by': 'turnover_range_id'}" |
|||
/> |
|||
<filter |
|||
string="Company size" |
|||
name="company_size" |
|||
domain="[('is_company', '=', True)]" |
|||
context="{'group_by': 'company_size'}"/> |
|||
</filter> |
|||
</field> |
|||
</record> |
|||
|
|||
context="{'group_by': 'company_size'}" |
|||
/> |
|||
</filter> |
|||
</field> |
|||
</record> |
|||
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue