-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MIG][9.0][auth_supplier] Migrate. #434
Changes from 1 commit
b117951
4eaba4b
a431f4f
9dda4f0
5f0467e
da7d573
b972bae
e9d59e6
e969b3e
da4e03a
aca8bb8
4256c83
75a60ba
fed5f84
d21e5e1
eb0e9f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ Configuration | |
|
||
* To enable users to create accounts: | ||
|
||
* Go to *Settings > Configuration > General settings*. | ||
* Go to *Settings > General settings*. | ||
* Enable *Allow external users to sign up*. | ||
* Enable *Activate the customer portal*. | ||
|
||
|
@@ -27,26 +27,25 @@ To use this module, you need to: | |
* In home page, press *Sign in*. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. s/Sign in/Sign up/ (tested on runbot) |
||
* Press *Sign up*. | ||
* Select *Supplier* in account type. | ||
* Fill the form. | ||
|
||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/149/8.0 | ||
|
||
For further information, please visit: | ||
|
||
* https://www.odoo.com/forum/help-1 | ||
:target: https://runbot.odoo-community.org/runbot/149/9.0 | ||
|
||
Known issues / Roadmap | ||
====================== | ||
|
||
* If you have nothing in the portal, the user will be redirected to an empty | ||
page. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback | ||
`here <https://github.com/OCA/server-tools/issues/new?body=module:%20auth_supplier%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/OCA/server-tools/issues>`_. In case of trouble, please | ||
check there if your issue has already been reported. If you spotted it first, | ||
help us smashing it by providing a detailed and welcomed feedback. | ||
|
||
Credits | ||
======= | ||
|
@@ -58,6 +57,7 @@ Contributors | |
* Pedro M. Baeza <[email protected]> | ||
* Carlos Dauden <[email protected]> | ||
* Sergio Teruel <[email protected]> | ||
* Jairo Llopis <[email protected]> | ||
|
||
Maintainer | ||
---------- | ||
|
@@ -72,4 +72,4 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose | |
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
To contribute to this module, please visit http://odoo-community.org. | ||
To contribute to this module, please visit https://odoo-community.org. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
# -*- coding: utf-8 -*- | ||
# (c) 2015 Antiun Ingeniería S.L. - Sergio Teruel | ||
# (c) 2015 Antiun Ingeniería S.L. - Carlos Dauden | ||
# © 2016 Jairo Llopis <[email protected]> | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
{ | ||
'name': "Auth Supplier", | ||
'category': 'Tools', | ||
'version': '8.0.1.0.0', | ||
'version': '9.0.1.0.0', | ||
'depends': [ | ||
'auth_signup', | ||
], | ||
|
@@ -16,6 +17,7 @@ | |
], | ||
'author': 'Antiun Ingeniería S.L., ' | ||
'Incaser Informatica S.L., ' | ||
"Tecnativa, " | ||
'Odoo Community Association (OCA)', | ||
'website': 'http://www.incaser.es', | ||
'license': 'AGPL-3', | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
# -*- coding: utf-8 -*- | ||
# (c) 2015 Antiun Ingeniería S.L. - Sergio Teruel | ||
# (c) 2015 Antiun Ingeniería S.L. - Carlos Dauden | ||
# © 2016 Jairo Llopis <[email protected]> | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
from openerp.addons.auth_signup.controllers.main import AuthSignupHome | ||
from openerp.http import request | ||
|
||
|
||
class AuthSignupHome(AuthSignupHome): | ||
|
||
def _signup_with_values(self, token, values): | ||
qcontext = request.params.copy() | ||
values.update(account_type=qcontext.get('account_type', False)) | ||
values.update(account_type=request.params.get('account_type', False)) | ||
return super(AuthSignupHome, self)._signup_with_values(token, values) |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# -*- coding: utf-8 -*- | ||
# (c) 2015 Antiun Ingeniería S.L. - Sergio Teruel | ||
# (c) 2015 Antiun Ingeniería S.L. - Carlos Dauden | ||
# © 2016 Jairo Llopis <[email protected]> | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
from openerp import models, api | ||
|
@@ -11,14 +12,12 @@ class ResUsers(models.Model): | |
|
||
@api.model | ||
def _signup_create_user(self, values): | ||
account_type = values.get('account_type', False) | ||
if 'account_type' in values: | ||
values.pop('account_type') | ||
account_type = values.pop('account_type', False) | ||
res = super(ResUsers, self)._signup_create_user(values) | ||
if isinstance(res, int): | ||
user = self.env['res.users'].browse(res) | ||
if account_type == 'supplier': | ||
user.partner_id.supplier = True | ||
user.groups_id = user.groups_id | self.env.ref( | ||
user.groups_id |= self.env.ref( | ||
'auth_supplier.group_auth_supplier') | ||
return res |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<openerp> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change this to to use the new "cool" tag (and to avoid the need to change it when the other tag will be deprecated) |
||
<data> | ||
|
||
<template id="auth_supplier.fields" | ||
inherit_id="auth_signup.fields" | ||
|
@@ -16,5 +15,4 @@ | |
</xpath> | ||
</template> | ||
|
||
</data> | ||
</openerp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can include here that "Developer mode" should be activated first to have access to "Technical features".