Skip to content
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

New addon: website_portal (backported from v9) #68

Merged
merged 7 commits into from Sep 30, 2015
Merged

New addon: website_portal (backported from v9) #68

merged 7 commits into from Sep 30, 2015

Conversation

LeartS
Copy link

@LeartS LeartS commented Aug 14, 2015

Backport + adjustments. I'm going to backport also website_portal_sale.

'category': 'Website',
'summary': 'Account Management Frontend for your Customers',
'version': '1.0',
'license': 'AGPL-3',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Odoo v9 modules are no longer AGPL. You should put LGPL-3

@pedrobaeza
Copy link
Member

Travis errors seems unrelated.

Functional: 👍
Technical: Some remarks

bouvyd and others added 7 commits September 17, 2015 17:52
- manage your sale documents from the frontend in the 'My Account' page
- move 'My Orders' page from website_sale to website_portal to manage your orders and quotations
- update website_sale_digital and website_sale_stock controllers and view
…rtner details frontend page so we do not interrupt the customer flow when browsing through his documents
Split of website_portal into a generic (and mostly empty) website_portal and a sales-related website_portal_sale (sales order, quotes, invoices)
This allows other modules to extend website_portal without depending on sales
Fix initialization errors of the bare backport, remove new (v9) API
from javascript, some layout adjustments, PEP8 python code.
@LeartS
Copy link
Author

LeartS commented Sep 17, 2015

@pedrobaeza Addressed your remarks and rebase on top of current 8.0

@pedrobaeza
Copy link
Member

👍

@rafaelbn
Copy link
Member

  • Login as admin
  • Create a new user, desactivate all permisison and activate portal as screenshot:

17-09-2015 18-57-27

  • Set a password to the user portal
  • Logout as admin and login as portal
  • You will get:
Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

@LeartS
Copy link
Author

LeartS commented Sep 18, 2015

@rafaelbn I tried that on a local demo instance and it worked.

On the runbot build of this PR, it gives that error, right. But I tried the build of the base 8.0 branch of website (so without this module) and it still gives the same error! So it's a problem with the base branch.

@rafaelbn
Copy link
Member

Hi @LeartS,

I have done same test with database clean without modules installed and the error is the same.
If I give to the user permission in HR as employee and it doesn't fail, so it look and permissions error to messaging

21-09-2015 16-53-42

21-09-2015 16-54-03

2015-09-17 16:55:34     ERROR   server  werkzeug:87 _log

Error on request:
Traceback (most recent call last):
  File "/srv/openerp/instances/openerp-oca-runbot/sandbox/lib/python2.7/site-packages/werkzeug/serving.py", line 177, in run_wsgi
    execute(self.server.app)
  File "/srv/openerp/instances/openerp-oca-runbot/sandbox/lib/python2.7/site-packages/werkzeug/serving.py", line 165, in execute
    application_iter = app(environ, start_response)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/service/wsgi_server.py", line 216, in application
    return application_unproxied(environ, start_response)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/service/wsgi_server.py", line 202, in application_unproxied
    result = handler(environ, start_response)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/http.py", line 1290, in __call__
    return self.dispatch(environ, start_response)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/http.py", line 1264, in __call__
    return self.app(environ, start_wrapped)
  File "/srv/openerp/instances/openerp-oca-runbot/sandbox/lib/python2.7/site-packages/werkzeug/wsgi.py", line 588, in __call__
    return self.app(environ, start_response)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/http.py", line 1437, in dispatch
    result = ir_http._dispatch()
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/addons/crm/ir_http.py", line 13, in _dispatch
    response = super(ir_http, self)._dispatch()
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/addons/website/models/ir_http.py", line 148, in _dispatch
    resp = super(ir_http, self)._dispatch()
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/addons/base/ir/ir_http.py", line 175, in _dispatch
    return self._handle_exception(e)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/addons/website/models/ir_http.py", line 196, in _handle_exception
    return super(ir_http, self)._handle_exception(exception)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/addons/base/ir/ir_http.py", line 145, in _handle_exception
    return request._handle_exception(exception)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/http.py", line 666, in _handle_exception
    return super(HttpRequest, self)._handle_exception(exception)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/addons/base/ir/ir_http.py", line 171, in _dispatch
    result = request.dispatch()
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/http.py", line 684, in dispatch
    r = self._call_function(**self.params)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/http.py", line 310, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/http.py", line 307, in checked_call
    return self.endpoint(*a, **kw)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/http.py", line 803, in __call__
    return self.method(*args, **kw)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/http.py", line 403, in response_wrap
    response = f(*args, **kw)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/addons/web/controllers/main.py", line 478, in web_client
    menu_data = request.registry['ir.ui.menu'].load_menus(request.cr, request.uid, context=request.context)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "<string>", line 2, in load_menus

  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/tools/cache.py", line 122, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/addons/base/ir/ir_ui_menu.py", line 381, in load_menus
    menu_root_ids = self.get_user_roots(cr, uid, context=context)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/addons/base/ir/ir_ui_menu.py", line 355, in get_user_roots
    return self.search(cr, uid, menu_domain, context=context)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/addons/mail/mail_group_menu.py", line 42, in search
    context=context, count=False)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/addons/base/ir/ir_ui_menu.py", line 117, in search
    limit=None, order=order, context=context, count=False)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/models.py", line 1645, in search
    return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/models.py", line 4658, in _search
    self.check_access_rights(cr, access_rights_uid or user, 'read')
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/models.py", line 3496, in check_access_rights
    return self.pool.get('ir.model.access').check(cr, uid, self._name, operation, raise_exception)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "<string>", line 2, in check

  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/tools/cache.py", line 122, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3115363-68-7449a0/openerp/addons/base/ir/ir_model.py", line 800, in check
    raise openerp.exceptions.AccessError(msg % msg_params)
AccessError: ('AccessError', u'Sorry, you are not allowed to access this document. Only users with the following access level are currently allowed to do that:\n- Human Resources/Employee\n\t- Administration/Settings\n\n(Document model: ir.ui.menu)')

Could you change tittle " New addon: website_portal (backported from v8) #68 " to " New addon: website_portal (backported from v9)"

@LeartS LeartS changed the title New addon: website_portal (backported from v8) New addon: website_portal (backported from v9) Sep 22, 2015
@yajo
Copy link
Member

yajo commented Sep 28, 2015

@rafaelbn @LeartS Indeed I tested right now in a local Odoo and it works fine. It is definitely a bug in the runbot.

Why is it that these fields are required when the user fills its form?:

captura de pantalla de 2015-09-28 16-48-39

@rafaelbn
Copy link
Member

Tested in runbot for me is a 👍
@yajo about you comment this is a Odoo default

@yajo
Copy link
Member

yajo commented Sep 30, 2015

Then 👍 for me.

pedrobaeza added a commit that referenced this pull request Sep 30, 2015
New addon: website_portal (backported from v9)
@pedrobaeza pedrobaeza merged commit 72fe7b9 into OCA:8.0 Sep 30, 2015
@LeartS LeartS deleted the website_portal branch October 27, 2015 15:12
bealdav pushed a commit to akretion/website that referenced this pull request Feb 10, 2017
[8.0][website_sale_require_legal] Require legal terms for checkout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants