Fix bug from the initial poc of JOV
Fix menu creation
- creating a menu would create a 'container' menu in the DB (.create is call without website_id)
then writing on it would copy (if condition to cow) the menu with a website_id leaving the first
one as a menu container unused.
- website_menu should always have a website_id
we dont want to support the multiwebsite system that allow to have generic/specific menu
unlink/write is useless now since we always have a website_id
Make unique_path website dependent, 2 distinct website can have a page with same name
Make Sale report multiwebsite compliant
Make website_id on sale_order / account.invoice as a related stored from partner_id.
Co-authored-by: Derie Romain <rde@odoo.com>
Co-authored-by: Kersten Jérémy <jke@odoo.com>
26 lines
1.2 KiB
Python
26 lines
1.2 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from ast import literal_eval
|
|
|
|
from odoo import api, fields, models
|
|
|
|
|
|
class ResConfigSettings(models.TransientModel):
|
|
_inherit = 'res.config.settings'
|
|
|
|
auth_signup_reset_password = fields.Boolean(string='Enable password reset from Login page', config_parameter='auth_signup.reset_password')
|
|
auth_signup_uninvited = fields.Selection([
|
|
('b2b', 'On invitation'),
|
|
('b2c', 'Free sign up'),
|
|
], string='Customer Account', default='b2b', config_parameter='auth_signup.invitation_scope')
|
|
auth_signup_template_user_id = fields.Many2one('res.users', string='Template user for new users created through signup',
|
|
config_parameter='base.template_portal_user_id')
|
|
|
|
@api.multi
|
|
def open_template_user(self):
|
|
action = self.env.ref('base.action_res_users').read()[0]
|
|
action['res_id'] = literal_eval(self.env['ir.config_parameter'].sudo().get_param('base.template_portal_user_id', 'False'))
|
|
action['views'] = [[self.env.ref('base.view_users_form').id, 'form']]
|
|
return action
|