Commit Graph
40 Commits
Author SHA1 Message Date
Jigar A d92f17cebe [FIX] signup: allow non-admin to invite portal users 2018-08-08 23:44:40 +02:00
Nicolas Martinelli cbce126425 [IMP] auth_signup: hide unusable field from users
The token field is a technical data that the other users are not able to use.
It may be confusing for users to see token on the user interface.
Still show it to administrator for debug reasons.
2018-07-16 14:35:20 +02:00
Nicolas Martinelli 2e4a75cbee [FIX] auth_signup: do not send email to duplicated user
When duplicating a user, an email was sent to a user at the email of the
previous user (as the create is called before changing the email).

opw-1853359
2018-06-25 08:37:24 +02:00
Christophe Simonis 9874adebb8 [MERGE] forward port branch saas-15 up to 40e74240e8 2018-05-16 17:48:37 +02:00
Christophe Simonis a1a03792b6 [MERGE] forward port branch 10.0 up to bcf20cfbec 2018-05-16 17:10:28 +02:00
len-odoo 47cc4fbbab [FIX] auth_signup: add missing dependency on the computation of the signup validity
The field signup_valid is a non stored computed field based on signup_token.
The cache is filled with prefetched values, so in a loop the field is read from
the cache and not recomputed due to the missing dependency.

opw 1843442
2018-05-16 09:01:14 +02:00
Adrian Torres ff7efbb1e8 [FIX] website,sale,auth_signup: prevent shared field deletion
The field `auth_signup_uninvited` is defined in the 3 aforementioned
modules, yet they are independant modules in respects to one another.

This means that whichever module is installed first will create an XMLID
for the field, if this module is uninstalled before the other two: boom!
crash when changing general settings because the res.config.settings
field set by the other two modules no longer exists.

To solve this, we simply ignore the field during ir_model_field.unlink()

Fixes #23171
2018-02-23 10:28:10 +01:00
Nicolas Martinelli 7606878a78 [FIX] account, auth_signup, sale, website_sale: settings robustness
- Delete the tax corresponding to the default 'Sales Tax'
- Access the Accounting settings

Error since record could not be found.

In the case of an `ir.config_parameter` referring to a record ID
(i.e. Many2one), the deletion of this record is not propagated to the
associated `ir.config_parameter`. Therefore, the system tries to access
a deleted record without fallback.

It's not really possible to solve it globally in a stable version, but
we can manually handle these cases by providing a fallback (usually
return `False`).

opw-781864
2017-11-13 13:19:53 +01:00
Christophe Simonis c5f680200c [MERGE] forward port branch saas-17 up to d08b4407be 2017-09-12 12:09:11 +02:00
Thibault Delavallée 028c99db68 [FIX] auth_signup: open correct user for access rights in settings
Actually the signup template user to open is configurable and come from
an ir.config_parameter and is not necessarily the data created in
auth_signup even if it is the default value.
2017-09-08 18:59:25 +02:00
Sanjay Jamod c6aea4afc2 [FIX] auth_signup: fix computation of default template user in settings
Indeed we store an integer that is the ID of the user to copy when
creating the portal user, not a boolean. We therefore have to evaluate
the result instead of comparing it to a boolean. This was introduced
at 689d6d6829.
2017-09-08 18:58:51 +02:00
Yannick Tivisse 781a03b2bc [IMP] res_config: Update file names, xmlids, class names according to guidelines
Now that we only have one model (res.config.settings). Uniformize everything according to the guidelines.
2017-09-01 13:03:18 +02:00
Deep Patel 898224f110 [IMP] web,account,...: Regroup settings, add a nav and search bar
Purpose
=======

Settings are often way too long and hard to scan and sometimes you don't know where to find the settings you're looking for.
By adding a left navigation, you can already have an overview of the settings, and switch easily between them.

Specification
=============

- Add a search bar on all the apps that have settings which can search results from all the installed apps.
  (If i'm on sales settings,and I search anything then it shows results from sales settings and also shows
  all the other matching results from all the other apps such as, Inventory...etc) with app name.
- Able to activate feature from the current page results (no matter if the searched result is from another apps).
- Highlight searched word in results
- Delete the sheet, have a full white background
- Add left navigation bar on setting
- Left navigation bar fixed
- List displayed based on installed apps
- On right panel, by default display current app setting and change accordingly
- [Mobile] Left navigation bar displayed on top
- Add Breadcrumb on top of the page: have the name "Settings" + Save / discard CTA + Search
- Add General Settings on the nav bar
- remove "save this page..." notif in all settings
- Delete all recommanded apps section + all checkbox that install app should disappear:
	payroll: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrSkMzWVpuZ0ZoaFE/view?usp=drivesdk
	Events: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrYXlHMHd2NTM2blE/view?usp=drivesdk
	Manufacturing: Delete Repair - Quality Control - Maintenance - Product Lifecycle Management [LAP][ok]
	Timesheets: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrdFg5XzNydkd2TlU/view?usp=drivesdk
	project: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrraWo3NE04TktwcTQ/view?usp=drivesdk
	inventory: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrQkRaVUR5ekFQYTQ/view?usp=drivesdk
	recruitment: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrbDdqLWQweF80UkE/view?usp=drivesdk
	purchase: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrRlAyUDBnb0trQWs/view?usp=drivesdk
	email marketing: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrOUZONjhvX2k3Y2s/view?usp=drivesdk
	expenses: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrR0JpN1ZpQmtxU3M/view?usp=drivesdk
	attendances: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrralpjZ1VJclNpMWs/view?usp=drivesdk
- About duplicate settings:
	Docsaway: Delete from Sales + delete Default Print Provider
	Attributs & Variants: Delete from Purchases - Manufacturing
	Multi-currencies: delete from Sales
	Unit Of Measures: Delete from Purchase & Expenses
- Add a scroll bar on the left bar when there's too many apps
- Keep the navbar visible even when you search
- Move General Settings to the bottom of the list
- Update on Settings:
    - Accounting:
        - rename automatic rates
        - Anglo Saxon Account: Should be in technical feature
        - Place Accounting Reports section before Taxes section
    - CRM:
        - Phone Validation: Enforce international format becomes
        - Local Numbers: (2 radio buttons proposals) Add international prefix / No prefix
    - Fleet: typo " ... a new car if ..." + text is too long <br>
    - project: fix tooltip for colab pads
2017-09-01 13:02:54 +02:00
Christophe Simonis 017ee5eab3 [MERGE] forward port branch saas-17 up to 877e709871 2017-08-24 13:17:53 +02:00
Olivier Dony 695716efb0 [FIX] P3: remove pycompat.{keys,items,values} helpers
Now that we're closer to switching to P3 for good, these helpers have
outlived their usefulness, and mostly add noise.

All remaining dict.iter*() or dict.view*() must be converted to the
normal keys(), values() or items() calls.

Whenever the result is likely to be used for more than the scope of a
loop, or when the dict needs to be modified during iteration, the calls
must be wrapped in a ``list()``, to protect the new P3 semantics.
Those cases are very exceptional.

Also removed some dead code or improved the API to remove unnecessary
conversions.
2017-08-20 23:25:54 +02:00
Thibault Delavallée 50d302bc6c [MOV] website, auth_signup: support auth parameters in request directly in auth_signup module
Let us completely support auth_signup_token and auth_login in request
session and parameters in the auth_signup module instead of in various
separate places.
2017-08-08 14:56:29 +02:00
Darshan Kalola cfbbc236ae [FIX] auth_signup: access right issues
When another user than administrator opens the mail sending wizard there
is an access right issue. Indeed as sale mail links now contain auth_signup
parameter an access to allow_uninvited config parameter is done. However
this has to be done using sudo because classic users have no access to
config parameters. Fix related to e79eb01a67 .
2017-07-12 09:54:00 +02:00
Denis Vermylen 6977a363e4 [IMP] web, auth_signup: add signup and login values to session
When you receive an url with parameters

 * auth_signup_token: uuid
 * auth_login: login

those will be stored in the session and used

 * when the user will want to sign up in order to be linked to the right
   partner;
 * when he logs in so he's sure to log in with the right account +
   autofill is nice

This commit only adds the support, future commits will support its use.
2017-07-06 12:53:39 +02:00
Denis Vermylen 676022e3af [IMP] auth_signup: display meaningfull and translated error messages
Since 5425316eff errors when signing up will only display two
messages:

 * "Another user is already registered using this email address." or
 * "Could not create a new account."

While Odoo creates a multitude of other comprehensible error messages
such as

 * "Passwords do not match; please retype them."
 * "Signup token '%s' is no longer valid"

This commit now separate UserError and AssertionError from SignupErrors.
Those are still hidden in a general message (see 5425316eff for reasons) while
the other ones are fully displayed.

This commit also improves translations of messages.
2017-07-06 12:53:39 +02:00
Denis Vermylen 689d6d6829 [IMP] website: add signup option in website settings
This commit duplicates the General settings' User Signup options in
the Website configuration, with a clear description of the options.

We also remove the unnecessary usage of safe_eval in auth_signup's
res_config.py. As stored values are repr values of a boolean field
just comparing the string values is sufficient. There is no need to
use safe_eval as it should be used only when necessary.
2017-07-06 12:53:39 +02:00
Yannick Tivisse 100f320217 [REF] base/res_config: Deprecate get_default_foo and set_foo
Currently, all the methods that start with `get_default_` and `set_` are called on a res.config.settings loading or saving.

This commit purpose is to replace all the occurences of `get_default_foo` and `set_foo`. As these methods won't be called anymore, a warning is logged to notice its deprecation.

The generic method `get_default_fields` and `set_fields` could be improved too. The method names and API are not so good:

    Why "default" fields? What you ask for is the current value of the stuff, shown as fields in the model. The values are fed as default values in the wizard, but that's an implementation trick.
    Why "fields"? What you ask for are configuration parameters, and such things.
    Why passing a list of fields? Its value is never used.

We should further simplify the API of both methods to something like

def get_values(self):
    return {}

def set_values(self):
    pass
2017-06-19 17:37:38 +02:00
Yannick Tivisse a38a3e93c2 [MOV] *: Reorganize configuration files according to guidelines 2017-06-19 17:37:38 +02:00
Olivier Dony 5f4db9df66 [MERGE] Forward-port saas-16 up to 5afe894f44 2017-05-16 18:23:15 +02:00
Olivier Dony 5afe894f44 [MERGE] Forward-port saas-15 up to 878fbc75ff 2017-05-16 17:09:45 +02:00
Olivier Dony 9b3ca1af23 [MERGE] Forward-port 10.0 up to 1545995b39 2017-05-16 12:12:30 +02:00
Xavier Morel 01e3514147 [FIX] P3: urllib, urllib2 and urlparse
In Python 3, all of these were "consolidated" under urllib(.request,
.parse, .errors) which is inconvenient.

Since we already have hard dependencies on requests and
werkzeug(.urls, which is a backport of Python 3's unicode-aware
urllib.parse) migrate *everything* to that.

A sticking point is urllib2.URLError, those were (mostly) replaced by
the slightly more general IOError which URLError extends.
2017-05-15 12:26:30 +02:00
xmo-odoo fffaf735f5 [FIX] P3: list -> iterable builtins (#16811)
In Python 3:

* various builtins and dict methods were changed to return
  view/iterable objects rather than lists
* and the separate Python 2 view/iterable builtins and methods were
  removed altogether

This is problematic when using these items as list (which the happens
repeatedly in Odoo), but more viciously when iterating *multiple times*
over them (which also happens, which I've messed up multiple times while
writing this, and which is a pain to debug even when you've just created
the issue).

Convert all code using these to semantics-matching cross-version
helper functions to get the LCD behaviour between P2 and P3, and
forbid the builtins via lint.

issue #8530
2017-05-10 09:39:55 +02:00
Olivier Dony 6921da00b3 [FIX] auth_signup: properly log password reset requests 2017-05-05 17:02:46 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
xmo-odoo 2e6a589f41 [FIX] builtins removed from Python 3
* Reverse wrapper courtesy of @rco-odoo's original P3 branch
* thin compat module stripped down from werkzeug (to augment as needed)

issue 8530
2017-04-27 13:59:33 +02:00
Xavier Morel 3979f6802e [#8530] convert exception handlers to except..as syntax
Futurize fixers:
* lib2to3.fixes.fix_except
2017-04-11 14:53:29 +02:00
Akash Bhavsar 79fd51b2a5 [IMP] base_setup: Improve the General Settings form view 2017-01-03 17:07:02 +01:00
Raphael Collet d0ca2d115e [REF] ir_config_parameter: remove group_ids and simplify
Add `sudo()` to call `get_param` where necessary, and make the web client use a
controller instead of directly accessing parameters.
2017-01-03 16:52:49 +01:00
Raphael Collet 7543afb070 [IMP] base, *: tighten ir.config_parameter access rights
Add `base.group_system` on existing parameters:
 - `auth_signup.allow_uninvited`,
 - `auth_signup.reset_password`,
 - `auth_signup.template_user_id`,
 - `google_redirect_uri`,
 - `mail.bounce.alias`,
 - `mail.catchall.alias`,
 - `mail.catchall.domain`.
2017-01-03 16:52:49 +01:00
Mansi Gandhi 9d5b09fc09 [IMP] auth_signup: connection state label
Change the label of active state label from Activated to Confirmed. Indeed
it indicates the user logged itself at least once. Active / Inactive is
controlled through the active field. An user that logged once is non labelled
as confirmed.
2016-04-20 14:45:59 +02:00
Jérome Maes 4083f54600 [FIX] auth_signup : fix lost in migration
During the migration of auth_signup module
(https://github.com/odoo/odoo/commit/f0db2d72f71e2133f80c6cef0184029ee8e107bf#diff-0155b28f0b719dae20bc5492cf085c37L67),
when splitting file, a fix was lost
(31dc82face). It
allows portal use to access form view of their
document, using the mail/view controller.

This fix is now back, and will make the portal works again !
2016-04-08 13:46:37 +02:00
Virbhadrasinh Gohil 7c513773e9 [FIX] auth_signup: don't crash on user copy
Altering a frozen dict is not allowed
2016-01-14 09:25:09 +01:00
Kinjal Mehta 416903d1b9 [MIG] auth_signup: Migrated into new api. 2015-12-16 13:39:41 +01:00
Kinjal Mehta f0db2d72f7 [IMP] auth_signup: split files. 2015-12-16 12:20:45 +01:00
Kinjal Mehta 327de507a7 [MOVE] auth_signup: Moved files in related models and views directory. 2015-12-16 12:20:41 +01:00