-
Notifications
You must be signed in to change notification settings - Fork 3
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
3836454
commit 4dc2d64
Showing
6 changed files
with
56 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
from . import res_company | ||
from . import res_config_settings | ||
from . import product_template |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright 2023 Quartile Limited | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import _, fields, models | ||
|
||
class ResCompany(models.Model): | ||
_inherit = "res.company" | ||
|
||
product_standard_price_restriction = fields.Text() |
9 changes: 9 additions & 0 deletions
9
product_standard_price_restriction/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,9 @@ | ||
# Copyright 2023 Quartile Limited | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import _, fields, models | ||
|
||
class ResConfigSetting(models.TransientModel): | ||
_inherit = "res.config.settings" | ||
|
||
product_standard_price_restriction = fields.Text(related="company_id.product_standard_price_restriction", readonly=False) |
34 changes: 34 additions & 0 deletions
34
product_standard_price_restriction/views/res_config_setting_views.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,34 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> | ||
<record id="res_config_settings_view_form" model="ir.ui.view"> | ||
<field name="name">res.config.settings.view.form.inherit</field> | ||
<field name="model">res.config.settings</field> | ||
<field name="priority" eval="25" /> | ||
<field | ||
name="inherit_id" | ||
ref="product.res_config_settings_view_form" | ||
/> | ||
<field name="arch" type="xml"> | ||
<xpath | ||
expr="//field[@name='product_weight_in_lbs']/../../../.." | ||
position="after" | ||
> | ||
<div class="col-xs-12 col-md-6 o_setting_box"> | ||
<div class="o_setting_left_pane" /> | ||
<div class="o_setting_right_pane"> | ||
<label | ||
for="product_standard_price_restriction" | ||
string="Product Standard Price Restriction" | ||
/> | ||
<div class="text-muted"> | ||
Error message for product standard price restriction | ||
</div> | ||
<div class="text-muted"> | ||
<field name="product_standard_price_restriction" /> | ||
</div> | ||
</div> | ||
</div> | ||
</xpath> | ||
</field> | ||
</record> | ||
</odoo> |