Coming from a bug in web_settings_dashboard. Invited user didn't have any rights
when created from the dashboard, which was leading to an error.
This bug leaded to a new discussion. Better to have basic employee having user
rights for all main applications. For bigger entreprises there is an admin that
will carefully remove extra rights, if necessary. The target is small businesses,
it makes sense that every way to create a user gives the same result.
In conclusion, each new user has a full access to the applications by default
How is it implemented ?
We added an inactive default user which original access right to the groups
'base.group_user' and 'base.group_partner_manager' in base. Each
application will extend the default user's access right by adding the maximal
access right for this application.
On user creation, we will use by default the 'group_id' field from the default
user. We will in the same time remove the ugly 'default_groups_ref' key which
was passed sometimes in the context for some fields in some views, and sometimes
nothing.
So, the user can modify the access rights for the default user, but he should be
aware that removing project user access rights for a default user will prevent
a *created on the fly in a task* user will not be able to access the task.
Before this, setting up the discount on a pos_config was a bit
confusing. Although iface_discount was enabled by default on the
pos_config, the discount button would not show up in the actual POS. The
reason for this is that the discount button only shows up when a
discount product has been set, and there is no default for that.
So in order to make things a bit clearer the following has been done:
- Group discount related options together
- Only show discount product and default percentage field when using discount
- Rename 'Discount percentage' -> 'Default percentage'
- Default iface_discount to False (because a discount_product_id has to
be manually set anyway)
- Make discount_product_id required when discount is enabled
- Only allow discount_product_id candidates that have available_in_pos set,
because the POS frontend only loads those products
This reverts commit ab303435d3.
Changing a feature one week before freezing a new saas, without review,
without spec, without testing, does not seem to fit the R&D process.
This commit will be set in a branch, tested and reviewed accordingly.
'color' is now a kind of magic field for the many2many tags widget, it
should not be used for something else.
This was half-fixed in 9.0 with f847701 and this commit solves it
properly.
opw-653124
Goal : Don't display the internal reference from one of the product template
as it was currently the case, because it was a related field to a one2many.
Here, we use the same behavior as for weight,volume or standard price fields.
If only 1 variant, i.e. no variant used, take the default_code from the template
If more than 1 variant, do not display anything.
Templates have been updated to match the general layout of the
notifications and emails in Odoo. This module has its own
commit because those templates were already complex and well
designed.
Some chatter messages have also been removed. Too much messages
are produced when creating and updating events.
Templates used to send invoice / quotation / PO by email are cleaned. Custom
style is removed. Content is simplified.
For sale, only one template is kept through the various addons. Previously to
this commit there are 3 templates: standard, portal and online quote. Those
template are similar except the link to get the sale order. Now the base template
contains some logic that should be sufficient to cover all cases. This breaks
the modular approach but is easier to use for users. As templates are still mako
it is not possible to use inheritance. So having a base template knowing some bits
of overriding modules is necessary if we want to avoid having the same template
duplicated.
The template used for notifications is updated. The general layout
is now
header: logo -- action buttons, contextual actions
separator
body
signature
Sent by company using Odoo
Action and access button in notification emails are added. Override
mail_thread methods to add a specific link + an access buttons to
everybody if the slide is published.
This makes every template holding images crash. As this feature will shortly be
fixed in 9, let us temporarily comment its use and wait for the forward port of
the fix.
The notification box remains on the form until either:
- the user closes it explicitly, or
- the user edits the record, or
- the form view is refreshed (switch to another record, or refresh form).
Add a method `once` to `EventDispatcherMixin`, as it is convenient.
Make `FormView` trigger events `to_view_mode` and `to_edit_mode`.
Since c04065abd8 (introduction of
accounting v9) bank statement lines can not have an amount of zero
anymore. So when we validate an order in the POS client we need to get
rid of paymentlines with an amount of zero.