-
Notifications
You must be signed in to change notification settings - Fork 9
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
705e680
commit ba00a39
Showing
13 changed files
with
59 additions
and
141 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
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
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
This file was deleted.
Oops, something went wrong.
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
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,40 +1,26 @@ | ||
/* Copyright 2016-2017 Ivan Yelizariev <https://it-projects.info/team/yelizariev> | ||
Copyright 2017 ArtyomLosev <https://github.com/ArtyomLosev> | ||
Copyright 2018-2019 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr> | ||
Copyright 2018 Ildar Nasyrov <https://it-projects.info/team/iledarn> | ||
License MIT (https://opensource.org/licenses/MIT). | ||
/** @odoo-module **/ | ||
/* Copyright 2023 Ivan Yelizariev <https://twitter.com/yelizariev> | ||
License OPL-1 (https://www.odoo.com/documentation/user/14.0/legal/licenses/licenses.html#odoo-apps) for derivative work. */ | ||
odoo.define("web_debranding.field_upgrade", function (require) { | ||
var FormRenderer = require("web.FormRenderer"); | ||
import { patch } from "@web/core/utils/patch"; | ||
import { SearchableSetting } from "@web/webclient/settings_form_view/settings/searchable_setting"; | ||
|
||
FormRenderer.include({ | ||
_renderTagForm: function (node) { | ||
var $result = this._super(node); | ||
patch(SearchableSetting.prototype, { | ||
visible() { | ||
if (!super.visible()) { | ||
return false; | ||
} | ||
|
||
/* | ||
Remove following element: | ||
<div class="col-xs-12 col-md-6 o_setting_box" title="Boost your sales with two kinds of discount programs: promotions and coupon codes. Specific conditions can be set (products, customers, minimum purchase amount, period). Rewards can be discounts (% or amount) or free products."> | ||
<div class="o_setting_left_pane"> | ||
<div class="o_field_boolean o_field_widget" name="module_sale_coupon"> | ||
</div> | ||
</div> | ||
<div class="o_setting_right_pane"> | ||
<label class="o_form_label" for="o_field_input_18" data-original-title="" title="" aria-describedby="tooltip822540">Coupons & Promotions | ||
</label> | ||
<div class="text-muted" id="sale_coupon"> | ||
Manage promotion & coupon programs | ||
</div> | ||
</div> | ||
</div> | ||
*/ | ||
if (this.state && this.state.model === "res.config.settings") { | ||
// Hide enterprise labels with related fields | ||
$result.find(".o_enterprise_label").parent().parent().parent().hide(); | ||
} | ||
return $result; | ||
}, | ||
}); | ||
// Copy-pasted from addons/web/static/src/webclient/settings_form_view/highlight_text/form_label_highlight_text.js | ||
const isEnterprise = odoo.info && odoo.info.isEnterprise; | ||
let upgradeEnterprise = false; | ||
if ( | ||
this.props.fieldInfo && | ||
this.props.fieldInfo.field && | ||
this.props.fieldInfo.field.isUpgradeField && | ||
!isEnterprise | ||
) { | ||
upgradeEnterprise = true; | ||
} | ||
return !upgradeEnterprise; | ||
}, | ||
}); |
This file was deleted.
Oops, something went wrong.
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,12 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!-- Copyright 2023 Ivan Yelizariev <https://twitter.com/yelizariev> | ||
License OPL-1 (https://www.odoo.com/documentation/17.0/legal/licenses.html#odoo-apps). --> | ||
<templates xml:space="preserve"> | ||
<t t-inherit="web.SearchableSetting" t-inherit-mode="extension"> | ||
<xpath expr="//div[@t-att-class='classNames']" position="replace"> | ||
<t t-if="!upgradeEnterprise"> | ||
<div t-att-class="classNames" t-out="0" /> | ||
</t> | ||
</xpath> | ||
</t> | ||
</templates> |