Jordi Ballester Alomar
6 years ago
9 changed files with 155 additions and 3 deletions
-
13partner_sector/README.rst
-
5partner_sector/__openerp__.py
-
2partner_sector/models/__init__.py
-
14partner_sector/models/base_config_settings.py
-
14partner_sector/models/sale_config_settings.py
-
11partner_sector/security/partner_sector_security.xml
-
23partner_sector/views/base_config_settings.xml
-
55partner_sector/views/res_partner_view.xml
-
21partner_sector/views/sale_config_settings.xml
@ -0,0 +1,14 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright 2018 Eficent Business and IT Consulting Services, S.L. |
|||
|
|||
from openerp 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 openerp 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,11 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<openerp> |
|||
|
|||
<data noupdate="0"> |
|||
|
|||
<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> |
|||
</data> |
|||
</openerp> |
@ -0,0 +1,23 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<openerp> |
|||
<data> |
|||
|
|||
<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> |
|||
|
|||
</data> |
|||
</openerp> |
@ -0,0 +1,21 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<openerp> |
|||
<data> |
|||
<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="base_setup.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> |
|||
</data> |
|||
</openerp> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue