Commit Graph
107968 Commits
Author SHA1 Message Date
Jeremy Kersten 83bfdb0d21 [IMP] website_portal*, website_project*, website_quote, website_blog: add record pager in portal
+ fix re-use websitue_url in get_access_action
2017-02-24 08:51:26 +01:00
Jeremy Kersten d89210e1fd [FIX] website_portal: align center the th row from portal
TD text is right align, but TH text is left align.
No jealous: now centerd
2017-02-24 08:51:26 +01:00
Jeremy Kersten f4ae1a63c7 [FIX] base: fix dev mode when view is no more in addons-path 2017-02-24 08:51:26 +01:00
Raphael Collet c59d79da3c [IMP] models: better argument 2017-02-23 14:48:44 +01:00
Raphael Collet 68c9f1a673 [FIX] models: missing argument 2017-02-23 14:47:20 +01:00
Raphael Collet 6a768cd1de [MERGE] models: refactor BaseModel._auto_init 2017-02-22 17:39:08 +01:00
Raphael Collet e78269664d [IMP] tools: use information_schema instead of pg-specific tables 2017-02-22 15:24:08 +01:00
Raphael Collet f8e573db23 [REF] models: refactoring of foreign keys 2017-02-22 15:24:08 +01:00
Raphael Collet dc82ff59ac [REF] models: in _auto_init, delegate field schema updates to fields
The fields objects are responsible for creating their column/table and indexes.
The methods that update the schema are overridden to handle cases specific to
each type of field.
2017-02-22 15:24:07 +01:00
Raphael Collet d024c76021 [REF] tools: add functions for SQL schema manipulation
This helps factoring out a certain number of similar queries, and removing a
few methods from `BaseModel`.
2017-02-22 15:24:07 +01:00
Raphael Collet 8225f36497 [IMP] models: speed up schema update for models
Simply remove most `commit()` statements from code that updates the database
schema.  This improves the performance of the schema update by 30%.
2017-02-22 15:24:06 +01:00
Raphael Collet b3c97f08bb [FIX] mail: when initializing aliases, force reflection of models 2017-02-22 15:24:06 +01:00
Raphael Collet dfec1fa778 [FIX] base_sparse_field: remove pre_init_hook 2017-02-22 15:24:05 +01:00
Raphael Collet daa1eb1fc4 [IMP] base: remove ir_model_* tables from base.sql 2017-02-22 15:24:05 +01:00
Raphael Collet 2b46025dd5 [REF] models: use Registry.post_init() for reflecting models, fields, relations and constraints 2017-02-22 15:23:48 +01:00
Raphael Collet b6103d0b1b [REF] models: foreign keys use Registry.post_init() instead of BaseModel._auto_end()
Also use Registry.post_init() for the creation of foreign keys in
`_sql_constraints`.
2017-02-22 15:22:26 +01:00
Raphael Collet a1d061080e [REF] models: improve the API for post-init functions
Add a method to the registry to register function calls that must be done after
methods `_auto_init` and `init` have been invoked on all models.
2017-02-22 15:22:26 +01:00
Raphael Collet d0591c18e5 [REF] base: refactor the API of model, field, constraint and relation reflection
Simplify the API as much as possible, and delegate all the implementation
details to the models `ir.model`, `ir.model.fields`, `ir.model.constraint` and
`ir.model.relation`.
2017-02-22 15:16:35 +01:00
Raphael Collet 3214ca9820 [ADD] test_new_api: add checks on a model's schema 2017-02-22 15:16:34 +01:00
Raphael Collet 3ae219f773 [IMP] base: minimize recomputations triggered by model and field reflection 2017-02-22 15:16:34 +01:00
Raphael Collet c605ffa62a [IMP] base: remove management of deprecated indexes
Those indexes have been removed in version 10.0 or before, dropping them on
module upgrade is no longer necessary.
2017-02-22 15:16:21 +01:00
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