-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7eec21c
commit f81ff91
Showing
5 changed files
with
70 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
l10n_be_cooperator_national_number/models/res_config_settings.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from odoo import fields, models | ||
|
||
|
||
class ResConfigSettings(models.TransientModel): | ||
_inherit = "res.config.settings" | ||
|
||
display_national_number = fields.Boolean( | ||
related="company_id.display_national_number", readonly=False | ||
) | ||
require_national_number = fields.Boolean( | ||
related="company_id.require_national_number", readonly=False | ||
) |
17 changes: 0 additions & 17 deletions
17
l10n_be_cooperator_national_number/views/res_company_view.xml
This file was deleted.
Oops, something went wrong.
53 changes: 53 additions & 0 deletions
53
l10n_be_cooperator_national_number/views/res_config_settings.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<odoo> | ||
<record id="res_config_settings_cooperator_view_form" model="ir.ui.view"> | ||
<field name="name">Cooperators national number</field> | ||
<field name="model">res.config.settings</field> | ||
<field | ||
name="inherit_id" | ||
ref="cooperator.res_config_settings_cooperator_view_form" | ||
/> | ||
<field name="arch" type="xml"> | ||
<xpath | ||
expr="//field[@name='subscription_maximum_amount']/../../.." | ||
position="after" | ||
> | ||
<div class="col-12 col-lg-6 o_setting_box"> | ||
<div class="o_setting_left_pane"> | ||
</div> | ||
<div class="o_setting_right_pane"> | ||
<span class="o_form_label"> | ||
National Number | ||
</span> | ||
<div class="text-muted"> | ||
Add a national number field on share subscription | ||
</div> | ||
<div class="mt16"> | ||
<div class="content-group" id="send_default"> | ||
<div> | ||
<field name="display_national_number" /> | ||
<label | ||
for="display_national_number" | ||
string="Display" | ||
class="col-2 o_light_label" | ||
/> | ||
</div> | ||
<div | ||
attrs="{'invisible': [('display_national_number', '=', False)]}" | ||
> | ||
<field name="require_national_number" /> | ||
<label | ||
for="require_national_number" | ||
string="Require" | ||
class="col-2 o_light_label" | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</xpath> | ||
</field> | ||
</record> | ||
</odoo> |