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
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...
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.
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>
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#18492Closes#22281
Task 60955
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.
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.
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.
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.
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.
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.
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#23334Fixes#23333
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.
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
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$
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 .
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.
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.
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;
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.
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.
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.
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.
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.