-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP]website_sale_ux: re-adds website_login_documents on view
closes #244 Signed-off-by: mem-adhoc <mem@adhoc.com.ar>
- Loading branch information
Showing
6 changed files
with
58 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
############################################################################## | ||
# For copyright and license notices, see __manifest__.py file in module root | ||
# directory | ||
############################################################################## | ||
from . import res_config_settings |
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,19 @@ | ||
############################################################################## | ||
# For copyright and license notices, see __manifest__.py file in module root | ||
# directory | ||
############################################################################## | ||
from odoo import models, api | ||
|
||
|
||
class ResConfigSettings(models.TransientModel): | ||
_inherit = 'res.config.settings' | ||
|
||
@api.model | ||
def _inverse_account_on_checkout(self): | ||
for record in self: | ||
if not record.website_id: | ||
continue | ||
record.website_id.account_on_checkout = record.account_on_checkout | ||
# account_on_checkout implies different values for `auth_signup_uninvited | ||
if record.account_on_checkout == 'disabled': | ||
record.website_id.auth_signup_uninvited = 'b2b' |
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,30 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
<record model="ir.ui.view" id="res_config_settings_view_form"> | ||
<field name="name">res.config.settings.view.form.inherit.website.sale</field> | ||
<field name="model">res.config.settings</field> | ||
<field name="inherit_id" ref="website_sale.res_config_settings_view_form"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//div[@id='website_login_documents']/div[hasclass('o_setting_right_pane')]" position="before"> | ||
<div class="col-12 col-lg-6 o_setting_box" id="website_login_documents" title=" To send invitations in B2B mode, open a contact or select several ones in list view and click on 'Portal Access Management' option in the dropdown menu *Action*."> | ||
<div class="o_setting_left_pane"> | ||
</div> | ||
<div class="o_setting_right_pane"> | ||
<label for="auth_signup_uninvited"/> | ||
<div class="text-muted"> | ||
Let your customers log in to see their documents | ||
</div> | ||
<div class="mt8"> | ||
<field name="auth_signup_uninvited" class="o_light_label" widget="radio" options="{'horizontal': true}" required="True"/> | ||
</div> | ||
<div class="content-group" attrs="{'invisible': [('auth_signup_uninvited','=','b2b')]}"> | ||
<div class="mt8"> | ||
<button type="object" name="action_open_template_user" string="Default Access Rights" icon="fa-arrow-right" class="btn-link"/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</xpath> | ||
</field> | ||
</record> | ||
</odoo> |