Jordi Ballester Alomar
6 years ago
committed by
mreficent
9 changed files with 145 additions and 2 deletions
-
12partner_sector/README.rst
-
3partner_sector/__manifest__.py
-
2partner_sector/models/__init__.py
-
14partner_sector/models/base_config_settings.py
-
14partner_sector/models/sale_config_settings.py
-
7partner_sector/security/partner_sector_security.xml
-
21partner_sector/views/base_config_settings.xml
-
55partner_sector/views/res_partner_view.xml
-
19partner_sector/views/sale_config_settings.xml
@ -0,0 +1,14 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright 2018 Eficent Business and IT Consulting Services, S.L. |
|||
|
|||
from odoo import fields, models |
|||
|
|||
|
|||
class BaseConfigSettings(models.TransientModel): |
|||
_inherit = 'base.config.settings' |
|||
|
|||
group_use_partner_sector_for_person = fields.Boolean( |
|||
'Use sector for individuals', |
|||
help="Set if you want to be able use sectors for " |
|||
"individuals also.", |
|||
implied_group='partner_sector.group_use_partner_sector_for_person') |
@ -0,0 +1,14 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright 2018 Eficent Business and IT Consulting Services, S.L. |
|||
|
|||
from odoo import fields, models |
|||
|
|||
|
|||
class SaleConfigSettings(models.TransientModel): |
|||
_inherit = 'sale.config.settings' |
|||
|
|||
group_use_partner_sector_for_person = fields.Boolean( |
|||
'Use sector for individuals', |
|||
help="Set if you want to be able to use sectors for " |
|||
"individuals also.", |
|||
implied_group='partner_sector.group_use_partner_sector_for_person') |
@ -0,0 +1,7 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<record id="group_use_partner_sector_for_person" model="res.groups"> |
|||
<field name="name">Use sector for individuals</field> |
|||
<field name="category_id" ref="base.module_category_hidden"/> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,21 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
|
|||
<record id="view_general_configuration" model="ir.ui.view"> |
|||
<field name="name">General Settings</field> |
|||
<field name="model">base.config.settings</field> |
|||
<field name="inherit_id" ref="base_setup.view_general_configuration"/> |
|||
<field name="arch" type="xml"> |
|||
<group name="authentication" position="after"> |
|||
<group name="partner"> |
|||
<label for="id" string="Sector for individual"/> |
|||
<div name="group_use_partner_sector_for_person"> |
|||
<field name="group_use_partner_sector_for_person" class="oe_inline"/> |
|||
<label for="group_use_partner_sector_for_person"/> |
|||
</div> |
|||
</group> |
|||
</group> |
|||
</field> |
|||
</record> |
|||
|
|||
</odoo> |
@ -0,0 +1,19 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<record id="view_sale_config_settings" model="ir.ui.view"> |
|||
<field name="name">partner sector settings</field> |
|||
<field name="model">sale.config.settings</field> |
|||
<field name="inherit_id" ref="sales_team.view_sale_config_settings"/> |
|||
<field name="arch" type="xml"> |
|||
<div id="main" position="inside"> |
|||
<group name="partner_sector" string="Partner Sector"> |
|||
<label for="id" string="Sector for individuals"/> |
|||
<div name="group_use_partner_sector_for_person"> |
|||
<field name="group_use_partner_sector_for_person" class="oe_inline"/> |
|||
<label for="group_use_partner_sector_for_person"/> |
|||
</div> |
|||
</group> |
|||
</div> |
|||
</field> |
|||
</record> |
|||
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue