Added a mail_template_field on project stage model (project.task.type). This
fields is used to automatically send an email when a task or issue comes in
this stage.
Recruitment code has been updated to use the mixin method.
When performing automatic tracking it is now possible to automatically send
emails based on a template. This template can either be a qweb template
using its xml_id or a MailTemplate using its record.
This is simply implementing directly in the mixing a feature already present
in recruitment and soon to be added in task, issues or helpdek.
Composer in mass mailing mode currently keeps a copy of the emails in the
document communication history (chatter). It is done by keeping the
mail_message that is used to create the mail_mail record. It is now possible
to customize this behavior. Using auto_delete_message one can choose to not
keep a copy of the sent emails.
Note that the notification field on the mail_mail is used to know if the
associated mail_message has to be unlinked when unlinking the mail_mail.
Auto deletion of sent emails is based on the option on the template used
to generate the emails. It is now possible to bypass the template behavior
if requested, using the auto_delete field in the composer. If this field
is not set, the previous behavior applies.
It is now also possible to tune the message_type and subtype_id of the
posted message. Previously all messages posted through the composer
were comments with a computed subtype being either a comment or a note.
Those values are now default values but can be changed in the wizard
and correctly taken into account when posting the message.
Those modification do not change anything in the default behavior of the
composer and templates. They are mainly introduced for use in future
improvements in various addons, like sending reminder emails that are
not stored.
get_template should accept ids or xml ids. However the id or xml_id is given
to IrUiView.get_view_id that waits for an xml_id. get_template crashed if it
received an id.
This commit solves this by setting view_id to the given id, or resolve the xml_id
through get_view_id.
The dataset of an x2m could be set as changed on a focus event, but if
the form is currently not in editing, it could stay blocked in this
state.
This commit add a check so blur and focus on x2m are better coupled.
opw-665401
A partner can be associated to multiple users.
The condition checking the partner
user has enough karma should therefore
handle it. The previous condition expected
a singleton (only one user for the partner).
With the condition before this revision,
a partner with multiple users could
simply not post new questions on the forum.
opw-667894
The default behavior of session.rpc is to block the ui if it is not
completed in some short delay. This is not really good for various
types of rpcs. The discuss application is actually doing quite a lot
under the hood, and blocking the ui for some of those use cases does not
make sense (exemple: marking a channel as seen)
When editing a form with the arabic language, the date is formatted in
arabic. But the version of the Moment.js library we use for this had
inconsistencies and parsing the arabic date could not work.
Hence, saving would not work since date field values would be invalid.
This commit cherry-pick http://momentjs.com/ commits which solves that:
from version 1.8.4: https://github.com/moment/moment/commit/c9023b5
from version 1.9.0: https://github.com/moment/moment/commit/bd328d5closes#10634
opw-660453
When creating a XLS file with more than 256 columns, the library used
(xlwt) fail since it is targetted to support MS Excel 97 up to
Excel 2003.
But Odoo doesn't has no check and in this given instance (an error
happening in a controller generating a binary filte) the real error
message is lost.
This commit check if the to-be exported data has more than 256 columns,
and if this is the case display an error message without even trying
the export.
closes#10630
opw-660474
This commit does not actually fix qweb2.js, but it works around a
phantomjs bug. The problem with phantomjs is that in some situations,
the xmlhttprequests are dropped with a status 0. It is most likely
related to the issue:
https://github.com/ariya/phantomjs/issues/11195
In our testing framework, it seems to appear when requests sent before
the 'load' event of phantomjs are received after, and also when those
requests are listened with the onreadystatechange handler.
The bug does not appear if we use addEventListener with the 'load' event (at
least, not for a few builds)
This commit does not worsen qweb, and it is also a small improvement in
style (in my opinion).
When categories on the point of sale take too much height, the product
and overflown categories are not visible.
In those instance Odoo wizards would usually:
- use an option to have small categories without pictures,
- have a category "all" with all the product,
- do a custom change to reduce the size of categories or add a scrollbar
This commit add the last customization in stable.
If the category block is bigger than 60% of the page height, the
categories are cropped and a scrollbar is added.
closes#10588
opw-660383
This could allow a malicious flow that made the quotation available
via the website_quote module; allowing you to sign and confirm the
order without actually paying it.
When performing a stock valuation at date,
the stock valuation total wasn't equal
to the sum of each line of the report.
This is because the domain forcing the
date wasn't passed to the `search` call
when no group by was applied.
Indeed, when calling
`read_group` with a group by, the lines in the results
contains the domain used for each line, but when
there is no group by applied, this is not the case, the domain
is not included in the line dict returned by `read_group`.
In such a case, therefore, we must use the domain that was passed to
the `read_group` call.
opw-667761
The definition of "total" as a global variable is done too soon in the
JS. Depending on the order in which the JS modules are loaded, it is
very unlikely that the translations are already loaded at that moment.
opw-666577