Commit Graph
115896 Commits
Author SHA1 Message Date
Swapnesh Shah ec00970f12 [IMP] sms: open link in a new window
Instead of current one

Closes #23097
2018-03-02 16:46:16 +01:00
invitu 7d1775fda3 [IMP] product: use montenary label
Format the product price on the product label report to format correctly
the currency

Closes #22999
2018-03-02 16:43:00 +01:00
Ankit Sathvara 6be9fa3967 [IMP] web,hr: Phone widget is always clickable
With this commit, when a phone number is clicked (in readonly),
 - if voip is not installed, it opens an app according to the user
   choice (e.g. skype), and on mobile, it opens the phone app to
   call the number
 - if voip is installed, in desktop, it opens voip, and on mobile,
   it still opens the phone app to call the number, because webRTC
   is not supported.

This commit also makes the employee form view use the phone widget
for the 'Work Phone' and 'Work Mobile' fields.

Task #30369
2018-03-02 15:45:42 +01:00
Géry Debongnie 0ecfd7bf3e [FIX] sale_timesheet: fix a typo
Someone insisted for a refactoring to land in master.  Because of his
stubborness, a mistake was introduced...  Thank you, mister someone... I
hope that you're happy...
2018-03-02 15:00:21 +01:00
Fabien Pinckaers 09a22e3bef [IMP] base: select countries & state based on exact code, (useful for import and fast many2one) 2018-03-02 14:21:36 +01:00
Géry Debongnie e0e3deac41 [REF] sale_timesheet: adapt to new guidelines 2018-03-02 13:30:37 +01:00
Géry Debongnie be3c89d701 [FIX] sale_timesheet: fix crash in project plan
The Project Plan code is quite new, but does some unconventional stuff.
It looks like a form view, but it is actually a client action with a
custom search view.  The problem fixed by this commit is that when we
try to open the project plan from the project kanban view, it crashes.

It was caused by a bad interaction between the dashboard search view and
the action manager.  The dashboard search view trigger a search event,
which bubbles up to the action manager.  Since the project plan is not
loaded yet, the action manager assumed that the search event was for the
kanban view instead of the project plan.

The fix is to prevent the event from bubbling up, since the project
plan already handles the search event anyway.

Note that we also set the title in this commit to a default value, to
make sure that if we reload the client action, its title is set to a
more interesting value than 'Undefined'.

We also added a few tests, which could have prevented this mess.  Now it
should be easy to add more tests whenever needed.
2018-03-02 13:30:36 +01:00
Fabien Pinckaers 611e62ef0f [IMP] base: invite user copy: shorter and less technical message 2018-03-01 21:18:05 +01:00
Fabien Pinckaers 50416bfc1d [IMP] base: improved message when inviting a user. (...set password ir too technical) 2018-03-01 20:25:42 +01:00
Yenthe V.G e81d922ef2 [IMP] account: remove frenglish
Closes #22793
Fixes #22769
2018-03-01 17:23:59 +01:00
Miquel Raïch 4534f6623e [IMP] base: remove dead code
Was fixed at 07510cdb
Code no longer needed

Closes #21322
2018-03-01 17:16:53 +01:00
qdp-odooandMiquel Raïch 8767ecc693 [FIX] account: support of multi-company in reconciliation widget
Make sure that all propositions/created data will be linked to the company of the processed statement line.
+ adapted QUnit tests

Closes PR #23070.

Co-authored-by: Miquel Raïch (Eficent) <miquel.raich@eficent.com>
2018-03-01 15:19:38 +01:00
Stefan Rijnhart 9a2b2f43bb [IMP] stock_account: product_id in standard price update's accounting moves
When updating the cost on products with realtime valuation, the journal
entries do not have their product_id set, whcih make it difficult to
track/filter on them.

Closes #18492
Closes #22281
Task 60955
2018-03-01 14:10:33 +01:00
Nicolas Martinelli 072111191f [FIX] account, account_asset, point_of_sale, stock_landed_costs: decimal places
The decimal precision 'Account' has been removed in v9, and therefore it
should not be used anymore.

opw-1819517
2018-03-01 11:12:03 +01:00
Martin Trigaux 4592567641 Revert "[IMP] product: set no company on demo data"
This reverts commit 861e21c612.

Failing test
While the purpose seems fine, it needs more work
2018-02-28 17:40:12 +01:00
Miquel Raïch 861e21c612 [IMP] product: set no company on demo data
demo products shouldn't have company if they will be used by other companies
Was the company of the administrator

Closes #21220
2018-02-28 17:33:22 +01:00
Thibault Delavallée 768e34756c [REV] hr_timesheet: revert commit 4e9138f8f9.
No purpose, no explanation, incorrect commit message, no review from
technical and functional team, no task, separate features mixed in same
commit, incorrect code.

As /dev/null and its related POs manage timesheet applicationplease ask us
for guidance and review before committing that kind of commits. Many thanks.
2018-02-28 14:29:59 +01:00
Thibault Delavallée 2d82d3a4b9 [REV] hr_timesheet: revert commit bfed0c82e6
No purpose, incorrect commit message, incorrect tag, no review from
functional team, no task.

As /dev/null and its related POs manage timesheet applicationplease ask us
for guidance and review before committing that kind of commits. Many thanks.
2018-02-28 14:29:50 +01:00
Kishan Gajjar bfed0c82e6 [ADD] hr_timesheet: Added employee_id field to form view so that default values passed in context can be set and send to server when save record 2018-02-28 13:30:06 +01:00
Kishan Gajjar 4e9138f8f9 [IMP]hr_timesheet: Only reset task_id if project_id is different thant task_id.project_id
- set employee_id if there is default_employee_id in context
2018-02-28 13:30:06 +01:00
Christophe Matthieu 7922dcbe48 [FIX] web: increase unit test speed
The method removeSrcAttribute is critical, because each changes trigger
this one. this method must be optimized to the maximum to be the fastest.

Before this fix, removeSrcAttribute method search the image and iframe for
all body nodes instead of search only in the inserted nodes, and the method
are very slow.
2018-02-28 11:55:20 +01:00
Christophe Matthieu b9a763ba3c [FIX] web_editor: avoid unnecessary slowdown of the web client
create range method slow down all the web client because the handler who
use this method it's in the module (not in the widget method) and called
for each click and keyup. We need only this handler for the iframe or the
website, used by the rte.
2018-02-28 11:55:20 +01:00
Vandan Shah 74a813542f [IMP] note: Use first stage as default stage_id if is stage_id empty
UI improvement:
If there is no stage then there will be no button(no status bar) but there will be stages but task or note etc.. will not be in any stage then there will be 'undefined' so by click on that ('undefined') user can move to any stages. To avoid this behavior we add a default stage in note.
2018-02-28 11:27:02 +01:00
Vandan Shah 476d125b63 [IMP] web: Status widget dropdown should be displayed on right side in mobile view 2018-02-28 11:27:02 +01:00
Simon Lejeune 79d1529c57 [FIX] stock: tests and inactive locations
`child_of` used to return inactive records, it doesn't anymore
2018-02-28 10:33:44 +01:00
Raphael Collet e724858d50 [REF] models: use parent_path to implement parent_store
This replaces the former modified preorder tree traversal (MPTT) with the
fields `parent_left`/`parent_right`.  Each record is associated to a string
`parent_path`, that represents the path from its root node to itself.  The path
is made of the node ids suffixed with a slash:

              a                 node | id | parent_path
             / \                  a  | 42 | 42/
           ...  b                 b  | 63 | 42/63/
               / \                c  | 84 | 42/63/84/
              c   d               d  | 85 | 42/63/85/

This field provides an efficient implementation for parent_of/child_of queries:
the nodes in the subtree of record are the ones where `parent_path` starts with
the `parent_path` of record.  It is also more efficient to maintain than the
MPTT fields, and less sensitive to concurrent updates, because the value of
`parent_path` does not depend on sibling nodes.
2018-02-28 10:33:44 +01:00
Raphael Collet 80f1ac3599 [REF] never defer parent_store computation
Simplify the implementation of parent_left/parent_right by removing this
optimization.
2018-02-28 10:33:44 +01:00
Raphael Collet af05bf2027 [IMP] test_new_api: tests on parent_store 2018-02-28 10:33:44 +01:00
mreficent 38fde3bc01 [IMP] account: support company_id in community reports
Was PR #23259. Courtesy of Miquel Raïch (Eficent)
2018-02-28 10:29:38 +01:00
David Arnold 56eead8356 [IMP] purchase,sale: use full map_tax signature
Some call signatures have not been aligned with the taxes/product/partner
signature
introduced by the tax cloud module and necesary by some localization modules

Closes #23334
Fixes #23333
2018-02-27 17:35:26 +01:00
Florent de Labarre cc10778927 [IMP] stock: allow inherance to find a picking
Closes #23300
2018-02-27 16:44:36 +01:00
Christophe Matthieu 832b4721f3 [ref] account: proposition for reconciliation respect access rules is sql
Simplification of the search method of the lines lines (for the
propositions) of the two requests in one. The sql query returns the two
matching lines without filtering after the request because we inject the
rules of access rules directly into it.
This is an optimization in terms of clarity and speed. In addition to the
fix because the previous browse does not use access rules.
2018-02-27 15:35:23 +01:00
Christophe Matthieu 659ee94204 [IMP] account: remove comments useful for forward-port 2018-02-27 15:35:23 +01:00
Yannick Vaucher cf4020a3ce [IMP] account: Don't redefine builtin str 2018-02-27 15:35:23 +01:00
Christophe Matthieu bdfd1ebf0c [REF] account: create 'account.reconciliation.widget' model
Contains widget reconciliation methods. This refactoring does not modify
the feature, some errors have been notified in the code but not modified.
2018-02-27 15:35:23 +01:00
Fabien Pinckaers 39780b5037 [IMP] crm: improved dema data, to show a beautiful pipe by default 2018-02-27 13:22:15 +01:00
Suraj Shukla ebe58d9267 [IMP] web: Calendar: mobile UX improvements
The following tweaks have been applied on mobile devices:

 - remove left and right arrow in control panel
 - enable swipe navigation (instead of left/right arrows)
 - replace 'Today' button by a calendar icon
 - remove static text 'Attendees:' in events
 - shorten header content in week mode to prevent them from
   overlapping
 - ensure that the calendar fits in the screen

Also introduce a mobile test suite for the calendar view.

Task #31449
2018-02-27 12:18:55 +01:00
Aaron Bohy d36695cbc7 [REF] web: Calendar: apply coding guidelines 2018-02-27 12:18:55 +01:00
Christophe Monniez 02d826e1a7 FIX] web: increase timeout of test_01_js
The web test suite is increasing, so the test duration increases too.
6 minutes is not enough on some runbot instances.
2018-02-27 08:50:39 +01:00
qdp-odoo 9bc9c86470 [IMP] account, account_bank_statement_import: create res.partner.bank only when statement lines get processed
Previously, bank accounts were created at the line creation, even if the partner was unknown. That was a very weird behavior since
- that use case of a res.partner.bank belonging to no one is meaningless
- the default partner was actually set to the current'user company, which was even more wrong.

This has been already improved by https://github.com/odoo/odoo/commit/7b322d08de2b5343cdf6935a7ae4a12f1fd61958 but that first patch ignored the use case of res.partner.bank created thr$
2018-02-26 18:05:06 +01:00
Thibault Delavallée f727e9d9b6 [REF] rating: avoid storing rating_value on mail.message
Currently the rating value coming from the rating application is stored
on the message it belongs to. However storing it is not necessary as
there is no direct search using it. Having a computed field is sufficient
for all use cases we currently have in Odoo.

Removing the store allow to gain queries. Indeed the field is not
computed anymore after each message creation meaning we save queries
by not having to check existing ratings. It allows to gain a lot of
computation as mail.message is a critical model.

On the whole community runbot when installing all modules this leads to
a gain of more than 14K queries on 585K which means 2.4% of performances
increase. Considering the code size of this optimization this is quite an
interesting result.

Looking at test_mail performance tests we gain several queries (2/3) for
each new message which is coherent with the model change.

Finally it allows to lessen the performance difference between tests done
with test mail only and tests done with other modules already installed.
This is especially simple mail thread-enable records.

Related to task ID 51523. #Closes #23294. Done with blessing of @jem-odoo .
2018-02-26 16:58:35 +01:00
XavierDo 2966d4faed [IMP] product: rename product.uom into uom.uom
Also rename product.uom.categ into uom.category to
 give it a decent name.
2018-02-26 14:27:26 +01:00
XavierDo 6a378e3839 [IMP] product: move uom in a new addon
Moves UoM models, test and data to a new addon in
order to be able to use uom without product.
A simple example is be to be able to use UoM for
timesheets.

This commit only move code, and adapt xml ids
without chaging any feature or functionnal
behavior.
Note: 'product' module now depends on new
'uom' module.
2018-02-26 14:27:26 +01:00
Thibault Delavallée 9de5d41754 [MERGE][REF] mail, various: remove dead code and perform some small code renaming and optimization
Purpose of this merge is to clean a bit various methods and remove some
dead code. All those commits come from other work-in-progress branches
in mail aiming at improving performances and reducing code size. We can
already merge some light cleaning in order to lessen diff and ease
understanding of real feature-based branches.

It contains

 * some renaming in notification methods to match the _notify prefix used
   in most of them;
 * removal of  some dead code coming from old implementations of chatter;
 * removal of unnecessary context switch in email sending process;
 * small cleaning of notification group methods in various addons;

It allows to gain some queries in various test_mail performance test as
stated in the test_performance file update. When notification emails are
sent 4 queries are gained with this merge. On the whole community runbot
the impact is small (about 1K queries) probably because most of email
sending part is skipped on runbot.

This merge is related to the task Id 59039. #Closes #23089.
2018-02-26 14:24:47 +01:00
Thibault Delavallée 86350c56ff [REF] various: clean override of _notify_get_groups
Overrides of _notify_get_groups are used to add some buttons in notification
emails and control the display of "Access document" button. This commit
cleans some overrides :

 * accounting: portal users that are not the customer have no access to the
   invoice and should not have the access button;
 * project: remove unnecessary override on project model and consider portal
   users have access to the document through customer portal;
 * sale: portal users that are not the customer have no access to the sale
   order and should not have the access button;
 * website_blog: display access button to everyone only if the post is
   published; otherwise keep standard behavior;
 * website_forum: display access button to everyone only if the post
   has not been closed or deactivated; otherwise keep standard behavior;
 * website_slides: display access button to everyone only if the slides
   has been published; otherwise keep standard behavior;
2018-02-26 14:15:12 +01:00
Thibault Delavallée 6eda1dcb7a [REF] mail: simplify email send code and remove unnecessary methods
Send methods of mail.mail model are set private and simplified. Those
methods have been written when a lot of overrides were necessary to
generate notification emails. Since then the flow has changed but
methods have not been updated completely. This commit therefore simplified
a bit the call chain and parameters.

This commit is purely technical and does not hold any functional change.
Purpose is to clean code in order to prepare future changes in mail
application.
2018-02-26 14:15:08 +01:00
Thibault Delavallée d46e358d3e [REF] mail: rename notification methods related to recipients
This commit renames some internal mail.thread methods linked to the
notification process. This is the next commit of a series aiming at
improving code readability and method finding through prefixes. See
notably cae1c3977f, cdfe479e2e and fc1348dd3d.

This commit does not change any functional feature. It does only
rename notification-related methods, using the _notify prefix to
ensure they are private and to mark they are part of the notification
process.
2018-02-26 14:14:12 +01:00
Thibault Delavallée 2238408d51 [REM] mail: remove unnecessary context switch in mail send method
Commit 0d3d0e9563 added a key in context when sending emails to know
the target model name. It was used at that time to forge for footer of
notification emails.

Since that time notification emails have evolved a lot. The code based on
that context key has been removed. Context key has been transformed into a
context switch. However it is not used anymore and can be removed. It allows
to clean a bit the code and save a context switch.

This commit is purely technical and does not hold any functional change.
Purpose is to clean code in order to prepare future changes in mail
application.

This commit allows to gain some queries in mail sending process, meaning
removing context switch is interesting. One query is gained when using
the send process. Complex performance test involving several message post
gain 3 queries each.
2018-02-26 14:14:10 +01:00
Thibault Delavallée 97ee12e9c7 [REF] mail: simplify parent fetch when posting a message
1d57a09112 added a two-steps parent fetch when posting a message
on a discussion thread. At the time this commit was done responsible were
notified of the first thread message. It was helpful to notify them of the
original email that created the thread instead of the "document created"
generic message. Indeed for documents like leads or issues having the
original email containing the customer question is interesting when being
notified. This is why this commit was done.

However since quite a long time responsible notifications have changed.
They now receive an email notification telling they have been assigned on
a document. This commit is not necessary anymore and we therefore remove
it in order to clean a bit the message_post process.

This commit globally reverts 1d57a09112. Please note that @beledouxdenis
agreed after a long thinking.

This commit has a slight impact on mail performance tests, allowing to save
one query in some more complex test case.
2018-02-26 14:11:32 +01:00
Thibault Delavallée 74d4b3902d [REF] mail: consider body in message_post is always html
Purpose of this commit is to simplify a bit message_post API. It has
a content_subtype parameter allowing to receive plaintext content.
It is then automatically converted into html.

This commit removes the parameter and consider the content is always
html. Code calling message_post should handle the conversion. In Odoo
the only use was in the chat_post controller that now perform the
plaintext to html conversion before calling message_post.

This commit is purely technical and does not hold any functional change.
Purpose is to clean code in order to prepare future changes in mail
application.
2018-02-26 12:15:31 +01:00