Commit Graph
107947 Commits
Author SHA1 Message Date
Thibault Delavallée e2f22fed53 [MERGE] mail: clearly separate email from inbox notification management
This merge changes the way odoo handles notifications. Previously
notifications were sent to the odoo inbox and forwarded by email
depending on a parameter on the partner. Now users choose whether to
use odoo inbox or email but not both. Customers only work using
emails from now on.

This merge also features side commits linked to notifications and mail
like making mail tests less dependent on channels, the removal of auto
read in channels, limitation of assigned emails and project subscription
improvements.
2017-02-21 17:30:38 +01:00
Yannick Tivisse 5d2187539e [IMP] sale: Always show Products menuitems under Catalog 2017-02-21 16:46:27 +01:00
Thibault Delavallée c815509709 [IMP] project: automatically (un)subscribe to all tasks when (un)subscribing a project
When subscribing to a project, an user is also subscribe to all existing
living tasks. Active is defined as active tasks not in a folded stage.
As requested.
2017-02-21 16:45:55 +01:00
Thibault Delavallée 505aa1aa0c [REM] mail: remove auto read in channels
Currently using channels and inbox notifications is impossible because
browsing a channel marks all related notifications as done. If an user
has a lot of pending notifications, he cannot go on a channel linked to
documents he is working on. Indeed in that case he looses all notifications.

Auto-read of notifications is therefore removed. The only way of managing
notifications when working by inbox is either in the inbox menu or either
on documents, as reading a document marks related notification as done.
2017-02-21 16:44:04 +01:00
Thibault Delavallée bda3d214d1 [IMP] mail: limit "assigned" email to people asking to receive emails
Indeed people working with inbox should already see a notification in
their Inbox.
2017-02-21 16:43:42 +01:00
Aline Preillon 2950ffaa86 [IMP] mail: improve notification management, either email either inbox
Currently partners have a boolean field to choose whether to receive
notifications only in their Odoo inbox or to receive them in their inbox
and by email. This leads to several issues :

 * if a customer is configured to not receive emails he will not receive
   any notification on sales orders, leads, ... This is not clearly
   indicated to the salesman and it is not easy to know how to change
   that behavior
 * if an user chooses to receive emails and does not use its inbox a lot
   of notifications stay in Odoo. The user has to manually set them as
   done to make them disappear which is redundant.

This commit changes that behavior. From now on customers will always
receive all notifications by email. Indeed Odoo is not a customer oriented
mailbox. Moreover sales orders or discussions on leads send to customers
should always be sent by email as it is the standard communication
mechanism. Users will be able to choose to receive notifications in Odoo
or by email. The choice is no longer inbox or inbox + email, but inbox
or email. Choosing one option or the other one depends on the way the
user wants to work.

Technically the field is moved on the users model and selection keys
are renamed. Notification process is modified

 * notified_partner_ids contains as before specified recipients as well
   as followers matching the subtype
 * customers and users working with emails are notified. During that
   process customers notifications are marked as done to be able to
   track the email state without having needaction. Users notifications
   are currently deleted as we do not track their email state.

The removal of partner field implies changes in various addons that
define partner data with this field set in the values.
2017-02-21 16:42:11 +01:00
Thibault Delavallée eb3a531666 [IMP] mail: small code linting in notification methods
This commit cleans code to separate recipients computation in mail
message from notification mechanism in partner. There is no functional
change. Some variables have been renamed notably to know that
some of the record sets are sudoed during computation.
2017-02-21 16:41:15 +01:00
Thibault Delavallée 927fbe8845 [IMP] mail: make tests less dependent on mail.channel model
Currently almost all mail tests run on mail.channel model. Indeed it is
the only model inheriting from mail.thread and mail.alias when having only
mail installed. However channel model have several specific features and
is not totally a standard mail.thread model. For example notification
recipients are computed a bit differently.

Since 4f9105a4ef mail module has a test
model allowing to perform tests on a very simple mail.thread-like model.
This commit make mail tests use this test model instead of mail.channel
everywhere it is possible. Channel model should be used only when tests
are channel-dependent.
2017-02-21 16:41:14 +01:00
qsm-odoo c5779ec30d [REF] *: replace uses of "<>" in xml domains by "!=" 2017-02-21 13:33:32 +01:00
Simon Lejeune 68745f8041 [REV] website_sale: Enable billing/delivery address on checkout process
This commit break the shipping form for public and portal user.

This reverts commit d3ff48533f.
2017-02-21 11:46:57 +01:00
Thibault Delavallée 80d26e26bb [IMP] mail: notify author of internal notes when replied through gateway
Currently if an user mentions someone in an internal note he is not
notified of any reply as replies create internal notes. This commit
ensure the author of the first note is notified of the reply even
if it is still an internal note.

Tests have been updated accordingly.
2017-02-21 10:39:43 +01:00
Thibault Delavallée 1d9052fc19 [IMP] mail: add tests about replies to internal note through mailgateway
Replying to internal notes should create internal notes and should
not notify anyone. Future commit will change that behavior. This
commit ensure the current behavior is working as intended.
2017-02-21 10:39:43 +01:00
Thibault Delavallée 21720f0a3f [FIX] mail: slighty improve notification email layout
* Limit company image to match buttons size and avoid badly
   sized image
 * Add a margin below internal note notice because it currently
   overlaps with actual email content
 * Avoid having signature direclty included in message by
   enclosing body in a div
2017-02-21 10:39:42 +01:00
qsm-odoo b4d8a270e1 [FIX] web_editor, website: restore content menu feature
Commit 3c9e6c89e7 made big changes to the
link editor dialog... but also broke many features with it.

Commit 9a1ea6dc08 already fixed some of
them but this commit fixes a bigger one. Indeed, the menu edition
feature was totally broken since the changes. Also, the DOM was messy
which broke form navigation, etc.
This commit also simplifies the LESS which was uselessly big.
2017-02-20 17:37:15 +01:00
Florent de Labarre a5361605cb [IMP] account: hide deprecated accounts
To be consistent with other domain added at ee97028

Closes #15432
2017-02-20 16:29:10 +01:00
David Arnold 99f365523b [IMP] base: allow to extend synched of company address
To easily add fields

Closes #15213
2017-02-20 09:27:31 +01:00
Simon Lejeune fbae45703b [FIX] stock: settings: multi location and advanced location
Disabling multi location should disable advanced location, the same way
disabling multi location disable the multi warehouse.
2017-02-17 13:21:58 +01:00
Dhaval Panchal b1b3de1339 [REF] stock: no more global push/pull rules
Global push/pull rules are error prone and can be replaced efficiently
by creating a "global" route.

There was an odd behavior when you delete a route, the different rules
of this route were'nt deleted and thus became global. A lot of users
didn't understand that, so to avoid this unexpected behaviour, we
delete on cascade the push and pull rules when a route is deleted.

To avoid inconsistencies in the system, we also restrict the deletion of
rules when they are used in a stock move or in a procurement. We also
restrict the deletion of routes used in warhouses and order lines.

We change the global pull rule test by applying the procurement rule on
a route and apply this route on a product.

Menu items related to global rules are removed, so are the logic to look
for them in the methods looking for which pull/push rule to apply.

joint work by @dpa-odoo, @pimodoo and @sle-odoo
2017-02-17 13:21:58 +01:00
Dhaval Panchal 9770256f66 [IMP] stock: inventory adjustment report
Do not display the location or lots columns if the user is not working
with them.

Group the inventory lines by locations.
2017-02-17 13:21:58 +01:00
Dhaval Panchal d37a7b1c5d [IMP] stock: picking view
Disolay the procurement group only in technical mode.

Only allow the user to change the picking type while the picking is in
draft.
2017-02-17 13:21:58 +01:00
Dhaval Panchal 10d5c11de3 [IMP] stock: picking type view
- Only display the warehouse and location field when the user is working
with multi warehouses and multi locations.

- MRP defines a stock.picking.type on manufacturing order, so that you can
easily set the source/destination locations and benefit from seeing a
manufacturing vignette in the inventory dashboard. However, the
manufacturing orders do not use every options defined on this view,
specifically the return picking type, the barcode nomenclature and the
packs and lots. This commit hides these options when the vignette is an
MRP one (manufacturing code).

A cleaner patch would have been to adds attrs with an xpath from the MRP
module, but if another modules wants to add another vignette there will
be a problem, so we chose the easiest way here.
2017-02-17 13:21:58 +01:00
Dhaval Panchal da578cb656 [IMP] stock: location route view
Only display the warehouse field if the route applies on warehouses.
2017-02-17 13:21:58 +01:00
Dhaval Panchal cbb9f86b3c [IMP] stock: stock location view
While creating a location, users were able to create a location when
chosing the parent location and it was error prone. We remove the
possibilty to create a location at this place.
2017-02-17 13:21:58 +01:00
Dhaval Panchal f5b0ec4de3 [REF] stock: picking: rename delivery type by shipping policy 2017-02-17 13:21:58 +01:00
Dhaval Panchal db3ebcbc9a [IMP] stock: procurement view
Only display the warehouse field on the procurement form view when the
user is working with multiple warehouses.
2017-02-17 13:21:58 +01:00
Dhaval Panchal 5c837dec2a [REF] stock, etc: rename picking type by operation type
As picking types aren't always used in a picking context, and picking
aren't really meanigful for a lot of people, we rename this concept as
"operation type" in views and in the planner.
2017-02-17 13:21:58 +01:00
Thibault Delavallée 44971c2be1 [FIX] resource: compute working hours of current day using only the current day
Tomorrow never dies; however no need to add its working hours today.
Indeed rrule until parameter is inclusive. This means that in
current implementation next day is included in computation. This commit
fixes that.
2017-02-16 17:34:35 +01:00
Thibault Delavallée 857593068e [REM] resource: remove unnecessary demo data
Resource module defines some demo data that are not used anywhere.
Moreover using resource module on its own does not give interesting
results as this is a tool module used in various addons like holidays
or project issue.

Those modules define their own demo data that will have an impact on
resource. It is therefore not necessary to define specific demo data
that does not help the user in any way.
2017-02-16 16:53:54 +01:00
Thibault Delavallée d5aeaeeba2 [REF] hr: remove login and last_login fields on employee model
Those fields are never used anywhere. Moreover attendance module can be
used to track employee log in / log out and compute its attendances.
Let us therefore remove those fields.
2017-02-16 16:51:51 +01:00
qsm-odoo 68a97420c3 [IMP] web: always allow using "id" field in attrs domain in form view
Before this commit, in the form view, if an attrs domain contained the
"id" field, it only worked if the "id" field was explicitely added to
this form view.
As the "id" is obviously known on a form view without the need to be
explicitely added, this commit allow using attrs domain containing "id"
in all form views.

Note: this seems to already work with list views.
2017-02-16 15:45:44 +01:00
qsm-odoo 9494abc28d [IMP] web: allow to restrict operators in domain selector
The domain selector currently determined the list of available
operators according to field types (and used only a subset of
supported ones).
In some context, we might want to restrict this list of available
operators. Indeed, in client-evaluated domains, the "ilike" operator
cannot be used for example.
2017-02-16 15:45:44 +01:00
Martin Trigaux 645df67631 [FIX] point_of_sale: implement todo
The link between the pos.order.line sequence and the config was lost after
creation.
Using the default with next_by_code is incorrect as every pos.config has a
sequence with the same code.
2017-02-16 15:33:26 +01:00
fwi-odoo ebc1d24fc5 [FIX] web_calendar: set default color when not define in the calendar view 2017-02-16 14:48:01 +01:00
Alexis de Lattre 75f928e919 [IMP] purchase: use sequence field on lines
Was present in the view but not used in the order.
Field introduced at 9d4efc8

Closes #15517
2017-02-16 10:02:50 +01:00
Nicolas Martinelli bdccf5bd64 [IMP] sale: unlock button
Add similar behavior to the one available in Purchase.
2017-02-16 09:15:55 +01:00
qsm-odoo 66fc48e89c [MERGE] web, web_editor, website, base: add LESS edition
See subcommits for details.

* Add LESS files edition in frontend
* Change asset bundle error handling
* Improve usability
2017-02-15 10:53:11 +01:00
qsm-odoo 073bfc5b5b [IMP] web_editor: use select2 in HTML/CSS editor
The select DOM element which allows to select the template or
the LESS file to edit has been replaced by a select2 element
to improve usability.

- Add search bar
- Allow to add "customized", "unsaved changes" and level indentation
  a better way (styled and icons)
- Add debug info (full less url / xml_id) only in debug, in small
2017-02-14 16:37:48 +01:00
qsm-odoo 198673bf35 [ADD] web_editor, website, web: new LESS editor
The old "HTML" editor now handles LESS edition. The editor has now a
button to switch between XML and LESS edition. By default, it only
displays the odoo files which only appear in the assets_frontend bundle
and in debug mode, it allows to see all the files that influenced the
page design.

The new editor has a new set of options which allows to use it as a
xml editor only or a less editor only if needed.

Also: make the "include bundles" option appear only in debug mode.

Technical details:

- When saving a modified LESS file, an attachment is created with the
full modified content and an extension view xpaths the bundle where
the original file was added to link this attachment instead. This
relies on the fact that qweb, when generating assets bundle,
replaces missing files by the "datas" contents of the ir.attachment's
which have an "url" field equal to the urls it is searching.

- If a LESS error is introduced, the recent changes in assets bundle
generation (see c248674a5c) will not break
the design but only open a dialog on page loading, with the LESS error.
The user can then go to the LESS editor and reset its changes.

This feature code has been started with original work of @pga-odoo
2017-02-14 16:37:23 +01:00
qsm-odoo 7751c1bfb9 [REF] web_editor, website: split customize_template_get
Commit a2ae219d4e fixed the customize_template_get
function(s) which had been modified for the 10.0 web_studio release.
While the fix also reorganized the structure to make it more efficient
and understandable, it promised that the function would be refactored
in master. This is what this commit does.

The customize_template_get route of the website module was also removed
with commit 5a030db3eb as it was an useless
duplicate of the web_editor customize_template_get route.

The old route handled two totally different features of odoo: getting
all the page-related views to allow their edition with the HTML editor
and getting the "toggable views" which appear in the "Customize"
website menu. The parameter "full" allowed to determine which one the
route was supposed to do and was useless until website was installed to
add its feature (by extending the route behavior). In both cases, views
informations are returned, only the number of views differs. The
above-mentionned fix already did part of the refactoring by returning
the same info structure for each view in both cases.

Now, the function has been split. The web_editor customize_template_get
route is renamed as get_assets_editor_resources and returns the info the
HTML editor needs to work (the "assets" term is in prevision of the
new LESS editor).
A new website route "get_switchable_related_views" has been created to
return the info the "Customize" website menu needs.
Both use the renamed ir.ui.view function "get_related_views" (old
ir.ui.view customize_template_get function) which now returns a
recordset and not a list of dictionnaries.
2017-02-14 16:32:15 +01:00
qsm-odoo ab78680d58 [IMP] web, web_editor, website: small refactoring of LESS files
This commit comments some LESS files to help the user to understand
for what their content is used (preparing the LESS editor feature).
2017-02-14 16:32:06 +01:00
qsm-odoo 8924abc0f1 [IMP] web, web_editor, website: add meaningful bundle names
As the user will be able to customize the bundles thanks to the LESS
editor, this commit give them meaningful names.
2017-02-14 16:31:51 +01:00
qsm-odoo ba72397fee [FIX] base: decode utf-8 for bundle ir.attachment files
If a bundle contains a file whose URL does not match any file in the
filesystem, its content is searched in the ir.attachment records.
The problem was that the content was base64-decoded but also had to
be utf-8 decoded to make its use work (like it would have been done
if the file was found in the filesystem).
2017-02-14 16:31:36 +01:00
qsm-odoo c248674a5c [IMP] base: handle LESS compilation error a better way
Before this commit, when a LESS bundle compilation failed, web pages
were displayed without any style and the error appeared in the DOM
thanks to a custom ::before style which was ugly and not selectable.

Now the error is displayed like any other error in Odoo: in a dialog
with selectable content. The pages are also displayed with the last
style which was successfuly compiled.
If odoo dialog are not defined (a page without any javascript), a
fallback has been implemented to show the LESS error with a JS alert.
2017-02-14 16:29:27 +01:00
qsm-odoo 9a1ea6dc08 [FIX] web_editor: link dialog (init & classes)
Commit 3c9e6c89e7 made big changes
to the link dialog.

This commit fixes two bugs it introduced:
* The color class preview was not properly set when opening a dialog
  (so changing nothing and saving would change the result)
* New btn color classes were wrongly initialized. It did not use less
  generation and made the button text always white. This could
  introduce bugs when using different colors in themes.

Note: this code is already being refactored anyway.
2017-02-14 16:25:56 +01:00
fwi-odoo c93be09f2e [FIX] web: caret misplaced
Due to the library algorithm to place the datetimepicker,
the div containing the input was no longer relative so the caret was misplaced.
Put back the position relative and place the datetimepicker relative to the input.
2017-02-14 15:10:01 +01:00
fwi-odoo 7015ec5062 [IMP] web: update fontawesome 4.5.0 to 4.7.0 2017-02-14 14:14:42 +01:00
qsm-odoo 9049d953ca [FIX] website: restore company edition option
Commit d1a8d54aca broke the feature without mercy.

The mentioned commit introduces a nice improvement to allow the edition
of the company logo directly from frontend. However it also breaks the
option for non-logo parts (example: clicking on the address on the
contact us page). It also leaves most of the option code behind, which
makes useless code being executed for nothing.

This commit restores the company option the way it was and simply
deactivates it for the logo edition, which was the desired behavior.
2017-02-14 12:33:53 +01:00
Thibault Delavallée cf1df16aea [IMP] payment_*, website_quote: change callback_eval string to parameters
callback_eval is currently a code string that is evaluated directly
at payment confirmation. This commit changes it to have parameters
on the record and method to call on it. Moreover a hash done once at
transaction creation ensure that a modified transaction does not allow
to execute code on other records.
2017-02-13 16:58:47 +01:00
Kinjal Mehta 9363b63a5c [IMP] sale, report: small fixes in sale onboarding 2017-02-13 14:25:42 +01:00
Fabien Pinckaers 6bfb8a1765 Merge branch 'master-automation-rem-fp' 2017-02-10 15:25:27 -08:00