Commit Graph
117931 Commits
Author SHA1 Message Date
Thibault Delavallée c879fb0f00 [IMP] calendar: improve scheduling meeting activities
After feedback from various uses, some improvements are made on the form view
to schedule an activity linked to meeting type

 * renaming the button to be more obvious that the user will be redirected
   to the calendar to schedule the meeting;
 * remove the note field to have a smaller form;

This commit is related to task ID 1819812. Closes #24169.
2018-06-08 17:39:30 +02:00
Thibault Delavallée 6b4ccf3e34 [MERGE] mail, various: make (some) templates bioutifoul
Purpose of this commit is to enhance quality of templates proposed by Odoo
and make them use notification layout when send by emails. Those emails
are cleaner and more up to date compared to other emails.

Main work of this merge is to ease the propagation of setting the
notification layout specification through various layers of mail.thread
post processing and to improve the various templates proposed in several
applications.

Impacted modules in this merge: event and event track, project (including
rating), gamification, product email template.

This merge is linked to task 51122. Closes #24052.
2018-06-08 17:27:25 +02:00
Géry Debongnie 247299b35b [FIX] web: increase timeout for warning in logs
Before this commit, it could happen quite frequently that the runbot
displayed a warning (coming from the JS) when some tests/tours were
executed.  This is the standard warning that some modules are not yet
loaded.  This is not harmful in anyway, but is visible in the runbot
logs.

With this commit, we increase the timeout to 6s.  This is not really a
good sign, hopefully cold starts for building assets will not
increase again in the future.
2018-06-08 16:53:50 +02:00
sed-odoo 22ee6df66b [IMP] fleet: Allow to search vehicles based on assignation logs
Purpose
=======
We can not get the list of vehicles who have been assigned to a driver.

Specification
=============
The user is able to get the list of the vehicles assigned to a specific driver, by searching the driver's name with the "Assigned to" filter.
2018-06-08 16:04:32 +02:00
Christophe Monniez 0e117c873c [REM] packaging: add sassc to the rpm package
Since 565277acbb sassc is used as a
fallback when the python libsass is not available.

With this commit, the saasc package dependency is added to the rpm to
avoid installing libsass with pip.
2018-06-08 15:47:07 +02:00
Pratima Gupta 37ea5dc316 [IMP] product_email_template: make email templates bioutifoul
Purpose of this commit is to enhance quality of templates proposed by Odoo
and make them use notification layout when send by emails. Those emails
are cleaner and more up to date compared to other emails.

Including
  * when sending the template attached to the product, specify the layout
    to use to encapsulate the notification email;

There is a huge ugly demo data of odoo online contained in this product.
After some thinking we choose not to modify it as demo data update will
belong to another task.

This commit is related to task ID 51122 (and PR #24052).
2018-06-08 15:39:18 +02:00
Pratima Gupta 2e2aaa218e [IMP] gamification: make email templates bioutifoul
Purpose of this commit is to enhance quality of templates proposed by Odoo
and make them use notification layout when send by emails. Those emails
are cleaner and more up to date compared to other emails.

Including
  * calls to message_post now use the light notification layout. It is
    given as parameter to the message_post process;
  * some cleaning in templates;

This commit is related to task ID 51122 (and PR #24052).
2018-06-08 15:38:49 +02:00
Pratima Gupta c5419e61d9 [IMP] event, website_event_track: make email templates bioutifoul
Purpose of this commit is to enhance quality of templates proposed by Odoo
and make them use notification layout when send by emails. Those emails
are cleaner and more up to date compared to other emails.

Including
  * registration and reminder templates that are send directly by email
    are improved to directly include the notification layout in the body
    itself;
  * improve layout of badge template;
  * use notification layout when sending badge;
  * improve layout of track confirmation template;
  * use notification layout when sending templates based on stage change;

This commit is related to task ID 51122 (and PR #24052).
2018-06-08 15:35:25 +02:00
Pratima Gupta a461eba04c [IMP] project: make email templates bioutifoul
Purpose of this commit is to enhance quality of templates proposed by Odoo
and make them use notification layout when send by emails. Those emails
are cleaner and more up to date compared to other emails.

Including
  * reception acknowledgment template is moved from demo to data to ensure
    people have a template to copy and use for their stages;
  * improve layout of rating request template;
  * use notification layout when sending template-based emails;
  * rename the admin spam template so that templates are correctly ordered
    when viewing them in list;

This commit is related to task ID 51122 (and PR #24052).
2018-06-08 15:31:59 +02:00
oco-odoo d4cd8be48f [IMP] web: add decoration support for all field widgets (#25160)
It is sometimes useful to be able to customize slightly the color of a
field depending on some conditions on the current record.

For example, imagine that we want to show a VAT number field in green/red, if
it was validated or not. To do that, we can add a field with an
onchange, and simply add decoration-danger and decoration-success
attributes to the field.
2018-06-08 15:20:49 +02:00
Pratima Gupta 9eb89131f3 [REF] rating, project: sending request is now a classic message post
This allows to better control the posting process, notably using custom
layout to encapsulate emails. Previously to this commit a simple email was
send using a template. Now this template is used to post a message on the
record asking for customer request.

New parameters are added on the request send method

 * a subtype, allowing some custom behavior with followers; by default the
   behavior is to log a note with the customer being in the recipients list;
 * composition_mode can be given and propagated to message_post_with_template
   allowing a comment or mass mailing mode;

This commit is related to task 51122 (and PR #24052).
2018-06-08 15:20:04 +02:00
Pratima Gupta cc63d420b8 [IMP] mail: update light notification template for a cleaner design
* increase logo size, because big logos are necessary;
 * correctly set cellpadding / spacing to 0 to avoid loosing some pixels
   when having several embedded tables;
 * remove summary mail_notification as it should be used only to some
   customer-specific part of emails;

This commit is related to task 51122 (and PR #24052).
2018-06-08 15:20:04 +02:00
Pratima Gupta 1184f7872d [IMP] mail: ease the use and specification of notification emails layout
This commit proposes to ease the use and specification of layout used to
encapsulate email body when sending notification emails. This is done
through two means

 * message_post_with_template now supports the custom layout parameter
   that allows to set the layout to use when sending notification emails
   in the message_post process. We have to rely on the context as it is
   the current way of using it in the composer. It is likely to change in
   a near future;
 * composer now supports through context (as we have no other choice)
   specific notification values to give to the notification layout rendering;

This commit is related to task 51122 (and PR #24052).
2018-06-08 15:20:04 +02:00
Pratima Gupta caf400fa7c [IMP] tools: allow more items in styling white list when sanitizing
Some of the templates Odoo proposed do not display well on all email readers
as too much styling attributes are sanitized. This commit adds some styling
in the white list to allow having stylized templates while still having a
coherent white list.

This commit is related to task 51122 (and PR #24052).
2018-06-08 15:20:03 +02:00
Thibault Delavallée 9e811c608c [IMP] test_mail: add a tag on performance tests
It allow to easily recompute performance-related tests when working on
mail thread features. Tags are awesome.
2018-06-08 15:20:03 +02:00
RomainLibert a8aa0bcbbe [IMP] hr_holidays: add accrual allocations support
We need to support the accrual allocation for leaves.
This is a special type of allocations that adds some leaves to the
allocation every X amount of time worked.

This kind of allocations is especially used in the USA, but can also be
used in other contexts (eg: In Belgium we could allocate 20 days per
year for the legal leaves)

These allocations have support for :

  * A max balance limit
  * Going in negative (if set on the leave_type and the manager
    approves the leaves)
  * Removing the unpaid leaves from the quantity of days worked
  * Setting an end date after which it does not allocate anymore leaves

Task #46114
Closes #22292
2018-06-08 14:41:05 +02:00
Laurent Smet d49ab568a2 [IMP] account: compute tax lines on account.move with onchange
Allow the user to set taxes on lines when creating manually a new journal entry, and tax lines will be computed automatically thanks to an onchange based on new unstored fields.

Was task: 33802
Was PR #19029
2018-06-08 14:23:14 +02:00
Unknown d6d3081953 [IMP] hr_recruitment: Add kanban state to recruitment pipeline
Purpose
=======

recruitment pipeline lacks a kanban state management

Specifications
==============

Add kanban state management like what is already done in project:
- A kanban state was added to the recruitment pipeline. The kanban colored dot is visible in the kanban view and in the form view.
- A search filter on the kanban state was also added.

Project : RD for Dummies
Task : 1819164
2018-06-08 12:58:40 +02:00
Géry Debongnie e1f2e72384 [FIX] web: properly apply css in mobile search view
In some cases, if the device is in a mobile mode, but does not support
touch, then the mobile search view is shown, as expected, but the css
is not applied.

Maybe this is not a big deal in practice, since the only way to notice this is
to use odoo on a browser with a small window and no touch emulation, but
this is still annoying and wrong: if the mobile search view is
displayed, the its css should be applied in all cases.

We simply fix the css rule to make it work like expected.
2018-06-08 10:29:00 +02:00
David Monjoie e861e6dddb [FIX] purchase_stock: fix wrong date after forward-port 2018-06-07 16:12:48 +02:00
jem-odoo 3c1e886ced [IMP] purchase: add access rule for report
When splitting purchase and stock, the access
rules of the report was wrongly moved to
purchase_stock. This commit restores balance
in the universe.
2018-06-07 15:47:16 +02:00
RomainLibert 631891dc5d [IMP] hr_expense: add draft state to expense lines
We need to be able to change an expense report before submitting it, for
this we add a new step in the expense process (a draft state for the
expense sheets).

Task #41700
Closes #24806
2018-06-07 13:55:06 +02:00
Siddarth Gajjar d4b5668c1a [IMP] calendar: generic improvements
We need the calendar view to be consistent in the usage of time formats
currently the week column (on the far left) is not consistent with what
we display in the meeting time slot.

It is currently not ovious that you can add and view anybody's calendar
so we need to add a placeholder.

In order to create a meeting you have to click on create which is not
explicit.

Task #1838108
Closes #24675
2018-06-07 13:40:10 +02:00
XavierDo 133eeb1bbf [ADD] mail, mass_mailing: allow a user to resend a mail with failures
When a mail is in failure state, a red envelope appears next to the message
in a thread but it was difficult to send the mail again.
This tasks will allow users to send mail again easily, or mark notification
as cancelled if the user want to ignore this failure.
A notification will appear in sender systray while mail are in failure.

Task: #46158
PR: #24628
2018-06-07 11:46:28 +02:00
XavierDo aa7fb8c723 [IMP] mail: add warning when partner email is invalid
Change the border and cross color of a recipient in mail
composer when the email is invalid (doesn't contains "@").

When sending an mail from composer the user will see easily
if an email adress is invalid and will cause a NO_VALID_RECIPIENT
error.

Task: #46158
PR: #24628
2018-06-07 11:46:28 +02:00
Christophe Simonis 2ab7ad8361 [MERGE] forward port branch saas-11.3 up to c00df14654 2018-06-07 11:43:07 +02:00
qdp-odoo e0591346a4 [FIX] purchase: fix test_main_flows.
The action 'account.action_invoice_tree2' has been changed into a server action, so we want to open the tree view of invoices by modifying some values of the action we should now use the xml reference 'account.action_vendor_bill_template'.

Additionally, the help tooltip is now completed as would do the server action
2018-06-07 11:28:11 +02:00
Olivier Colson c00df14654 [FIX] purchase: anglosaxon reconciliation test: delete rate demo data at the beginning of the test
This is mandatory to ensure consistency of the data generated by the test, as stock pickings created from a PO are by design always created for the current date (there is no way forcing this), meaning that they always use today's exchange rate for their valuation.

Despite the fact we rewrite the date of the valuation moves artificially, we cannot correct the debit and credit values, since the anglosaxon entries get automatically reconciled (and you cannot modify a reconciled entry).

So, we have to make sure that "today"'s rate will always be the last rate we created in order to ensure complete control of the test. This deletion will have no further impact, as the transaction will be rollbacked at the end of the test.
2018-06-07 10:01:17 +02:00
RomainLibert b6642f1b70 [IMP] hr_holidays: add support for taking leaves differently
We would like to be able to take leaves using different units, currently
we only support taking leaves by hours because we use datetimes.

We need to support three units:
 * days
 * half days
 * hours

These units will be defined on the leave type.

Task #40995
Closes #21760
2018-06-06 17:04:07 +02:00
Prakash Prajapati d8a5141c17 [FIX] mail: Add a mark as read option on systray message dropdown
- 'Mark as Read' icon will be shown by moving the mouse over the message
- if it's channel then make it Mark as Seen
- if it's inbox notification then mark all message as read
- The inbox notification icon has been changed

This commit is related to task ID 1817646
2018-06-06 17:01:26 +02:00
Mathieu Duckaerts-Antoine 299ebb2cdf [IMP] mail: add moderation on channels
Purpose of this commit is to allow moderation on incoming messages in
discussion channels. On some channels on which moderation is required
messages should be in a pending moderation stage. Moderators can accept
or refuse messages as well as always allow or ban messages coming from
a given set of emails.

Channels now have an option to be moderated. Moderators can be added on
channels. They have access to a specific UI in Discuss to see and take
action on messages waiting for moderation.

Concerning mail.thread message that are pending moderation are not notified.
It means nobody receives a notification about them. Moderation process calls
the notification once the message is validated.

Various features included in this commit :

 * a model is added to store the decision about emails, allow or ban;
 * access rights are updated so that only moderators can modify moderation
   fields on message;
 * specific bus notifications are send to moderated people as well as to
   moderators on incoming emails as well as when a decision is taken;
 * options are added on channels to send explanations to moderated emails;
 * options are added on channels to write and send guidelines explaining
   why and how moderation is performed;
 * a reminder is send daily to moderators with remaining messages to moderate;
 * discuss UI is adapted and a new channel is added below Inbox and Starred
   giving access to moderation tools;
 * chanenl UI is adapted allowing to moderate directly inside channels;

This commit is linked to task ID 29521. Closes #21921.
2018-06-06 16:01:33 +02:00
Thibault Delavallée eeab18d753 [IMP] test_mail: assert_email now allow email_from, not only a partner-based author
Some tests could require it.
2018-06-06 15:58:23 +02:00
Thibault Delavallée de0b9e519d [IMP] test_mail: add an assert method for bus notifications content
Purpose is to ease the check of bus notifications content by having a tool
method doing it.
2018-06-06 15:58:23 +02:00
Christophe Simonis 969eb3fa2f [MERGE] forward port branch saas-11.2 up to c834c0f587 2018-06-06 15:46:36 +02:00
Olivier Colson 976499ac78 [FIX] purchase: anglosaxon valuation: use date instead of date_invoice for currency conversions. 2018-06-06 15:24:59 +02:00
Olivier Colson 6e51f4cdd9 [FIX] purchase: anglosaxon reconciliation test: set proper date to generated credit note
The date of the invoice is used for currency conversion in anglosaxon stock valuation. Before this fix, the tests crashed between june 6th and december 31th, as the demo data define a currency rate for USD on june 6th. Using the proper date on the credit note ensures the good rate (the one in application when making the credit) is always applied.
2018-06-06 15:12:34 +02:00
Christophe Simonis c834c0f587 [MERGE] forward port branch 11.0 up to 10da9045a6 2018-06-06 14:37:16 +02:00
Sanjay Jamod a4df9f8c93 [IMP] account: vendor bill creation upon email reception
This allows to set up a mail alias per purchase journal. Then share that email address to your supplier, or use it internally to forward the vendor bills received by mail, to automatically create an empty vendor bill with the mail attachments linked, and the partner might be filled if the source email matches a supplier.

Thanks to the document preview on the side, it's now super easy and super fast to copy the vendor bill info from the received PDF into the account.invoice object. This would eventually be improved later on (IAP).

Was task: 37703
Was PR #22158
2018-06-06 14:17:03 +02:00
qdp-odoo a6b75d401d [REF] mail_thread: refactoring of _find_partner_from_emails()
More flexibility equals more powa
2018-06-06 14:17:03 +02:00
Nicolas Martinelli 10da9045a6 [FIX] purchase: fix test
The `price_unit` on `stock.move` is not rounded since it is a technical
field. Therefore, the comparison might fail depending on the rate (which
happens after June 6th because of `base.rateUSDbis`).
2018-06-06 13:45:00 +02:00
Christophe Simonis 116826e02d [MERGE] forward port branch 11.0 up to e7aff3775f 2018-06-06 10:47:53 +02:00
Olivier Dony 86ae4b90a3 [IMP] mail: make connection test attempt to send an email
The "connection test" was only attempting to establish a socket to the
SMTP server and then trying to login, if credentials were setup.

This would catch basic config errors but would fail to detect setups
were the SMTP server would forbid relaying, because of missing
credentials, missing STARTSSL mode, and other more complex cases.

By actually beginning a real SMTP session and sending the MAIL FROM,
RCPT TO and DATA command, we make sure that the server appeas willing to
relay emails from the current user address to an arbitrary recipient
address. Then we close the session before actually sending the message.

In order to have a valid destination domain with a valid MX server, we
use an odoo.com recipient address for the test, which should prove that
the destination server will relay to arbitrary addresses (unless the
destination server is an Odoo.com MX server ;-))
2018-06-06 10:26:30 +02:00
Olivier Dony c72eec46f9 [FIX] mail: do not shadow SMTP errors with QUIT
When an exception is raised during the course of a normal SMTP session,
smtplib's `sendmail()` method will close the channel automatically,
so any further attempt at sending SMTP commands will fail with an
SMTPServerDisconnected error, even just calling `smtp.quit()`.
This will shadow the original error, and make debugging harder.

Fixes #1493
2018-06-06 10:26:22 +02:00
Olivier Dony 6ef27bb913 [REM] core: remove deprecated v7 onchange support
Old API support has been dropped as of 11.0, and the old onchange system
should have been discontinued along with it.

New-API onchange mechanism is automatically triggered without requiring
any extra markup in view declarations, as explained in the
documentation:
- https://www.odoo.com/documentation/11.0/reference/orm.html#porting-from-the-old-api-to-the-new-api
- https://www.odoo.com/documentation/11.0/reference/orm.html#onchange-updating-ui-on-the-fly
2018-06-06 10:25:58 +02:00
Olivier Dony 025e65a925 [REV] Revert "[IMP] base: select countries & state based on exact code, (useful for import and fast many2one)"
This reverts commit 09a22e3bef, which was
attempting to fix a use case that was actually working.
It also created a duplicate `name_search()` method for res.country, in
addition to the one aliased to `location_name_search()`

It is indeed supported to import countries and states, using the
country code or state code as the imported value. These will be matched
uniquely thanks to the special `name_search()` performed for import,
forcing the `operator`.
And this is done while still allowing proper auto-completing for normal
UI case, where the "exact code match" will only promote an extra result
at the top of the suggested matches, rather than limit the results to a
single match.

The confusion apparently stemmed from the test case using "UK" as the
country code. UK is not a valid ISO country code, so it would never
match as expected.
2018-06-06 10:22:19 +02:00
Martin Trigaux e7aff3775f [FIX] calendar: shows the event failing
When importing many events (e.g. google synchronisation), it is not clear which
one is failing

opw-1855471
2018-06-06 10:21:23 +02:00
Lucas Perais (lpe) 087dd851a2 [FIX] event: events smartbutton on partner display if user has rights
With a user that do not have access to the the Event module,
go into Contacts > open a contact

Before this commit, a ACL error was thrown. This was because of the presence of
a smartbutton refering to events in the form view of the partner

After this commit, the form view of the partner displays correctly

OPW 1851783
closes #24931
2018-06-06 10:12:02 +02:00
Ivan Yelizariev f81963addd [IMP] base: correct link in comment
To describe the date format on babel website
Closes #25085
2018-06-06 10:11:47 +02:00
Goffin Simon 9d943f7a99 [FIX] web: Button delete on SO line unclickable
Due to ef540eb006, the button delete was not clickable on a SO line
on safari.

opw:1848652
2018-06-06 09:59:49 +02:00
Tomas Alvarez 1db6c8d0ad [FIX] mail, web_editor: allow tel links in email templates (#24926)
Before this commit: links like `tel:+1-555-555-5555` were being replaced
both in javascript (prefixing `http`, when using the summernote editor)
and python (prefixing the base url, when they were added directly to the template).

After this commit: the replacement is avoided on links with `tel` scheme.

This is related to commit: 8b97a39
2018-06-06 09:57:53 +02:00