Commit Graph
133712 Commits
Author SHA1 Message Date
qsm-odoo eccf6ed458 [FIX] website_links: properly attach graph widgets to the hierarchy
Simple `this` instead of `self` mistake which prevents the widgets to
trigger up events.

closes odoo/odoo#44617

X-original-commit: 033ad6680794e037566720f35b0285e18f3d2130
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-04 17:09:32 +00:00
Pierre Masereel 56f2a70346 [FIX] point_of_sale: flush order timeout
When an order is synchronized to the server, there is a timeout of 7.5
seconds that is left before considering that the order has not been
synchronized, and should be re-syncronised.

Since syncronization of order in pos_restaurant have been made, there
are more operations than before that are performed, and the
synchronization of an order can take more than that.

The validation of a picking can also take a lot of time, almost when
products are kits and compose of multiple products.

The problem, is that if it takes more than 7.5, the same order will be
pushed again to the server, even if the previous sychro still running,
which will lead to wait the previous request that has the lok on the
same records, all this blocked request can lead to block all workers of
the server because all requests are trying to modify same objects.

So we've increased the timout for flushed orders.

closes odoo/odoo#44615

X-original-commit: 9452c3f873c86a4c8502695720be942a76d4d25d
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2020-02-04 16:39:13 +00:00
Yannick Tivisse d2c8be3220 [FIX] mail: Harmonize _mail_find_partner_from_emails returned values
Purpose
=======

Before this commit, the method _mail_find_partner_from_emails could
return a list mixing partner ids and partner recordset, that could
lead to issue when trying to read the different elements.

With this commit, we ensure that we return a list of records only.

closes odoo/odoo#44608

X-original-commit: 2fbbbd8609fd2e08545ddb1ab8e2d7d22ee4d292
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-04 15:50:56 +00:00
wan be2ee7707a [IMP] inter_company_rules: split sale/purchase and account
Task 2080625
There are now 2 modules:
* account_inter_company_rules
* sale_purchase_inter_company_rules

This allows to use the feature without having to install sale and
purchase.

closes odoo/odoo#43039

Related: odoo/enterprise#7636
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-02-03 10:46:00 +00:00
wan 3b333b2675 [FIX] base: company_id on res.partner associated to company
The fact that there is a company id set means that you cannot select the
partner in a M2o if you didn't select the company in the selector, and
that you cannot open a document where that partner is set if you are not
in the correct company.
This is an issue for inter_company_rules, as you should be able to
select the company to make a so, po or invoice to a company of the same
database.
2020-02-03 10:46:00 +00:00
Odoo's Mergebot f27e845bb0 [MERGE] website_blog, *: review latest posts snippets
*: website

This reviews the latest posts snippet and its options. Theme options
(available in graphene and avantgarde themes) have been made
standard, the hover effects on the images have been rewritten as they
were broken since the snippet's DOM had been altered in bb0cdec459 and
the css rules no longer applied.

The number of posts option has been removed in favor of a fixed number
that depends on the screen size so that the layout looks good on all
devices (3x1, 2x2 1x3).

The list, big picture and horizontal layouts of this snippet have been
fused, and the layout is now an option on the snippet. A new option has
also been added to choose which posts are displayed: most recent or most
viewed. Lastly, a new 'cards' layout similar to the one on odoo.com has
been added.

See sub-commits for details.

task-2152188

Linked to https://github.com/odoo/design-themes/pull/198

closes odoo/odoo#42466

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-04 18:18:13 +01:00
Samuel Degueldre 4751d35e0f [IMP] website_blog, *: review latest posts snippet
* website

This commit reviews the latest post snippet(s). It fixes the list style
option and renames it to "Hover effects", most of the css for those
effects were broken, since the XML had been altered in bb0cdec and the
css had not been adapted, resulting in most rules being unable to target
anything.

The number of posts option has been removed in favor of a fixed number
that depends on the screen size so that the layout looks good on all
devices (3x1, 2x2 1x3), this makes the layout more responsive and
prevents having a select with 10 options where most choices would result
in a poor layout.

The list, big picture and horizontal layouts of this snippet have been
fused, and the layout is now an option on the snippet. A new 'cards'
layout similar to the one on odoo.com/blog has been added as well.

Lastly, a new option has been added to choose which posts are displayed:
most recent or most viewed.

task-2152188
PR: odoo/odoo#42466
2020-02-04 16:08:02 +00:00
Samuel Degueldre 9fc5f14469 [IMP] website_blog, *: make theme-specific snippet and options standard
* website

This commit moves the theme specific options from theme_avantgarde and
theme_graphene standard, namely:
- Big picture "list style" (hover effect)
- Big picture "First is bigger" option
- Latest posts horizontal

task-2152188
PR: odoo/odoo#42466
2020-02-04 16:07:38 +00:00
Samuel Degueldre f4c7c0bef5 [REF] website_blog: move snippets to match website snippet organization
Recently, we changed the way snippet are organized in website to allow
for versioning of the snippets' css and frontend js, to prevent new
changes from breaking old versions of a snippet. This commit moves all
the parts of the s_latest_posts and its big picture counterpart (which
are really just two variations of a single snippet) to match this new
organization, such that we can support css and js versioning in the
future.

task-2152188
PR: odoo/odoo#42466
2020-02-04 16:07:18 +00:00
Pierre Masereel 5b4c562fc5 [IMP] delivery: compute sale price of move
closes odoo/odoo#33913

Related: odoo/enterprise#4528
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-02-04 14:37:39 +00:00
Pierre Masereel 2c079fcd10 [IMP] product,delivery: improve unit of measure display 2020-02-04 12:57:52 +00:00
Pierre Masereel bd1edc62f3 [IMP] uom: add and addapt imperial system 2020-02-04 12:57:52 +00:00
Pierre Masereel c89993df67 [IMP] delivery: add estimated price on picking 2020-02-04 12:57:52 +00:00
Pierre Masereel d5fd89df5d [IMP] delivery: better handle package shipping weight
If the shipping weight is changed on a package, we want to update the
shipping weight on the picking to be consistent.

We also want to be able to set a shipping weight on a package that has
no carrier packaging, as we'll use the default one set on the carrier.
2020-02-04 12:57:52 +00:00
Josse Colpaert eebbdb9584 [FIX] account: on CoA install, need to only take the first transfer account
With the commit some time ago #d382288, I removed to take the first,
but you can have multiple transfer accounts in one company.

The best way is to just do a limit=1

closes odoo/odoo#44607

X-original-commit: aab5cb4ce6d7850a042203d62915dcc37f4d8bd9
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-02-04 15:47:32 +00:00
Xavier Morel 01354a3314 [FIX] account, purchase: almost certainly incorrect domains
This started from noticing that purchase somewhat oddly *removes* a
filter (internal_type='other') from a domain which is fairly
rare. Looking at the file histories didn't yield anything of
interest ("v9 accounting") but finally looking at the model revealed
an additional multi-company filter missing from both views.

After consulting with @qdp-odoo, @sle-odoo and @lap-odoo, no good
reason was found for the discrepancies:

* internal_type filter should probably always be there, unclear why it
  would get removed from purchase
* whoever added the multicompany filter *probably* missed that it
  would never be used because there was not one but two views
  overriding it (differently)
* sibling "income" field, as well as the corresponding fields on the
  product category, should match (though they were less incoherent).

closes odoo/odoo#44602

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-02-04 14:44:59 +00:00
William Henrotin 26be4a7bde [FIX] purchase_stock: confuse return move and move dest
Increasing the quantity on a purchase order line will create a stock
move with the delta quantity. In case the purchase order has a return
among its picking_ids, the delta will be wrong.

This is due to the fact a return move is considered like a move_dest
of the original incoming move. The delta quantity will be computed
from the return move which doens't make sense.

This commit excludes outgoing moves from move_dest to avoid taking
return move into account.

closes odoo/odoo#44551

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-02-04 15:07:12 +00:00
Odoo's Mergebot 6ff8479937 [MERGE][IMP] event[_sale]: improve event views (frontend/backend) and ticket sale flow
PURPOSE

Improve global event usability by adding a graph view as well as various
changes on the ticket sale flow.

We also improved the track proposal layout, added a handy button to invite
partners to your event and prepared some data for the event_barcode module.

SPECIFICATIONS

- Add a "Invite" button on the event, that allows sending invitations though
  the mass_mailing / mass_sms features
- Add a graph view for the event.event model
- Allow styling the description and the biography when sending a track proposal
  with basic plaintext2html usage
- Improve event and sale views integration in the event_sale module
  (stat buttons and next activity generation)
- General improvements to the "auto confirm" flow of registrations
- Prepare data for the event_barcode module, to make it "event agnostic"

More details in underlying commits

LINKS

Task ID : 2093336
Enterprise PR: odoo/enterprise#7760

closes odoo/odoo#43420

Related: odoo/enterprise#7760
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-04 17:22:05 +01:00
Patrick Hoste 14ce43f2ee [IMP] event: change name field from event registration + minor changes
PURPOSE

Make 'name' field from event registration mandatory.
Change placeholder for event name to give an example.

LINKS

Task ID : 2093336
PR : #43420
2020-02-04 15:07:43 +00:00
Patrick Hoste 4264f559e0 [IMP] event(_sale): improves registration auto confirm flow
PURPOSE

When the auto confirmation flag is set on an event all registrations
must be confirmed by default.
When the auto confirmation flag isn't set the registrations will be
confirmed as soon as the related invoice is paid.

SPECIFICATION

Add a is_paid field in event.registration which will be updated in a
method as soon as the related invoice is paid. This field is used to
display a ribbon on the registration to emphasize its payment status.

LINKS

task ID : 2093336
PR : #43420
2020-02-04 15:07:43 +00:00
Patrick Hoste 3ed271534e [IMP] event(_sale): improves event_sale informations
PURPOSE

Improve the integration between event and sale, by adding additional information
on both the sale order and the event registration views.

SPECIFICATIONS

- Add a stat button on the registration form linking to the related
sale order instead of a link in the form itself.
- Add a stat button on the sale order showing the registrations count
related to this sale order.
- When changing the ticket type on an attendee it displays an exception
activity on the sale order in order to warn the responsible for taking
action about it.

LINKS

task ID : 2093336
PR : #43420
2020-02-04 15:07:43 +00:00
Patrick Hoste 3f45e782b7 [IMP] (mass_mailing_)event(_sms): adds send invitation button on event form
PURPOSE

Integrate the mass_mailing feature to event in order to send an
invitation to the event you organized.

Task ID : 2093336
PR : #43420
2020-02-04 14:48:31 +00:00
ryv-odoo 67c090e48a [IMP] website_event_track: improve track proposal
PURPOSE

- When creating a talk proposal, the spaces and carriage return were ignored
- Track name change from "Location" into "Room"
- Remove link between image/biography and the related partner and allow the
user to add one when submitting a track proposal.

SPECIFICATION

- Adds the plaintext2html requirement to the controller.
- Adds an input to upload an image on a track proposal.

Task ID : 2093336
PR : #43420
2020-02-04 14:48:31 +00:00
ryv-odoo cec6c77a0b [IMP] event: adds graph view and adds change for event_barcode
PURPOSE

- In order to get an overview over events, add a graph view grouped by
event name and measure by seats available.
- Before this commit you had to install event_sale to see the popup window
in the barcode interface when scanning an attendee. With this commit you'll
see the popup even when event_sale is not installed.

SPECIFICATION

- Add the minimal information about the registration in the event module
and overrides it in the event_sale module to add the necessary informations.
That makes the window popup appear everytime when scanning an attendee.
- Add a "is_ongoing" field on event model to use it as a filter in
event_barcode.

LINKS

Task ID : 2093336
PR : #43420
Enterprise PR : odoo/enterprise#7760
2020-02-04 14:48:31 +00:00
Sébastien Theys ce7cc63b58 [FIX] website_sale: prevent issue with test shop_list_view_b2c
It very rarely happens that the test is failing due to the following error:

`Tour shop_list_view_b2c failed at step
.oe_product_cart .oe_currency_value:contains("825.00")`

The value found in that case is 750 instead of 825, which indicates that the b2c
setting was not correctly activated.

To exclude the RPC themselves from the equation, it is decided here to move the
setting change directly in the Python.

closes odoo/odoo#44599

X-original-commit: 735807cefb7ccf3232f7492b825ce8c42bacbed4
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-02-04 14:04:45 +00:00
Odoo's Mergebot 06d22deb59 [FIX] *: leftover deprecation warnings
@Julien00859 already made a pass on this at some point but there's a bunch of warnings either dynamic or from not the stdlib left over.

Some of them can't really be fixed in-code and have been explicitly ignored instead:

* `setuptools` uses the deprecated `imp` module until v41.6.0
* `zeep` uses defusedxml.lxml which was never intended to be a public / production API, not sure what to do there (cf  mvantellingen/python-zeep#956)
* there are a ton of invalid escapes in non-raw string literals, they're unlikely to ever be relevant so ignore them

closes odoo/odoo#44164

Related: odoo/enterprise#8130
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-02-04 16:21:10 +01:00
Xavier Morel b1e58ab6c6 [FIX] product: deprecation warning triggered by assertion
Replace an assertRaises(StopIteration) by a next() with a default
value.

Following PEP 479, *any* StopIteration reaching the toplevel of a
generator triggers a DeprecationWarning. And while the assertRaises
looks innocuous, both _assertRaises and the underlying
clear_upon_failure are implemented with functools.contextmanager,
which wraps a generator.

As a result, exceptions raised in the assertRaises "body" get
reinjected inside the wrapped context manager[0] and if the exception
is a StopIteration it triggers the warning.

By not using assertRaises we side-step the issue.

[0] https://github.com/python/cpython/blob/b6999e5690c7006b0ba4049cfd638513c982a90c/Lib/contextlib.py#L131
2020-02-04 12:42:35 +00:00
Xavier Morel 672709c125 [FIX] core, base: CryptContext.encrypt is deprecated
However encrypt was marked as deprecated in the same version hash
was added, so we need a conditional check to support <= 1.6.
2020-02-04 12:42:35 +00:00
Xavier Morel de590816d8 [FIX] *: deprecated access to url_ utilities through werkzeug root
In 0.15 accessing werkzeug.urls functions directly through werkzeug
is deprecated, the shortcut will be removed in the eventual werkzeug
1.0.

Fix existing uses of these shortcuts. Also cleanup some imports when
they're not far from a werkzeug* import being altered.
2020-02-04 12:42:35 +00:00
Xavier Morel eae19fc2cd [FIX] core: int() deprecation warning
__int__ should always return an integer, not a bool and not a
completely unrelated type either.
2020-02-04 12:42:35 +00:00
Xavier Morel 7ad955d5b1 [FIX] test_documentation_examples: deprecation warning
assertDictContainsSubset has been deprecated since 3.2 and is not
documented anymore, apparently because the order of its parameters is
less than obvious.

Consequently, remove the call to said dict & replace it with
assertions on item sets.

Note: the odd formatting is because these bits are literal-include-ed
in the documentation as sub-slices (just the relevant code lines), so
ideally they shouldn't be moved around and no additional content
should be added to those specific lines.
2020-02-04 12:42:35 +00:00
Xavier Morel 3bdf930743 [FIX] core: remove import of deprecated imp module
Was already not used, it's just that the import was not
removed. Remove a bunch of other unused imports while at it.
2020-02-04 12:42:35 +00:00
Xavier Morel fab1183907 [IMP] enable deprecation warnings 2020-02-04 12:42:35 +00:00
jbw 7b5664660f [IMP] hr_expense enable attachment preview in journal view
Adding preview of expenses attachment to journal view.

When creating an expense, files can be attached (e.g. scanned receipts).
Those attachment files where not displayed in "Accounting > Accounting > Journals > Purchases" move_line list.
They now appear in the document preview.

Task = 2176443

closes odoo/odoo#44161

Related: odoo/enterprise#8002
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-02-03 15:35:08 +00:00
Cedric Snauwaert 80c67aa26f [FIX] account: outstanding credit widget should be displayed in state in_payment
closes odoo/odoo#44595

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2020-02-04 13:35:34 +00:00
Xavier-Do 9c26d4d870 [IMP] core: rename upgrades-paths to upgrade-path
Since this option is soon to be used, this rename is a last tweek
to make it more logical to use since it will point to a single
upgrade dir most of the time.

closes odoo/odoo#44593

X-original-commit: 1c8e2809fb296abce6114b7da906d48a240df418
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2020-02-04 13:19:02 +00:00
Olivier Dony 39018e7515 [FIX] base_setup: show demo data button only in debug mode
During the port to 13.0 and the new Settings dashboard,
the "Load demo data" button visibility condition was reversed.

Cfr #34290 or https://github.com/odoo/odoo/pull/34290/files#diff-e5df7b873d03867c9527da957b762802L131

closes odoo/odoo#44587

X-original-commit: 61b7d53731623db42896f61a4c2772761d7892de
Signed-off-by: Christophe Simonis <chs@odoo.com>
2020-02-04 12:27:09 +00:00
Odoo's Mergebot fdba9a878f [IMP] website_blog: improve onboarding
The creation of a new blog post is noisy.
The user is disturbed with colors (purple box, blue borders, etc).

task-2144335

closes odoo/odoo#43692

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-02-04 15:20:19 +01:00
Romain Derie 2b0e88a6f0 [IMP] website: allow user to change cover color
Before this commit, the covers from event & blog, which shares the same
template, would be set a fixed bg-primary color which couldn't be
changed.

This commit adds the possibility to change that bg color.

task-2144335
2020-02-04 13:06:08 +00:00
Romain Derie 4eb2aeb8e7 [IMP] website: make cover_properties a mixin field
Next commit will add new cover properties entries for the bg color.
Still, we want a default `bg-primary` class. Instead of addind 3 new default
value in existing cover_property fields, the chance is taken to make a mixin
out of that field to avoid code duplication.

task-2144335
2020-02-04 13:06:08 +00:00
Katherine Zaoral d0cbd2a06d [FIX] account: be able to found the proper transfer account
Properly set the transfer account in the company taking account the accounts defined in th company domain.  We found this error because in l10n_ar module we have 3 chart of accounts based on the company AFIP responsability which actually have same transfer_account_code_prefix. For that reason it was setting a transfer account to the company which is not belongs to the current company.

closes odoo/odoo#44586

X-original-commit: d38228836b8944740f04ca355c997c4b6a346e48
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-02-04 12:25:39 +00:00
Debauche Stéphane e4e84196f6 [FIX] im_livechat: add missing dependency to livechat widget
Bug
===
A dependecy is missing "lazyloader.js"

Task #2118959
opw-2188615

closes odoo/odoo#44577

X-original-commit: ea787bec2631e7d26c7011a88395d29126859c38
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-04 11:32:02 +00:00
aab-odoo 7de76891c1 [FIX] stock: already defined test module
When there are two modules with the same name, an error is thrown
and only one of them is executed.

closes odoo/odoo#44573

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2020-02-04 11:27:24 +00:00
Romain Derie 8fc61fd2b4 [REM] website(_blog/_event): remove filtercolor option on cover
task-2144335
2020-02-04 10:59:22 +00:00
Jeremy Kersten 537644ec3e [IMP] website_blog: activate cover snippet on edit mode enter
As this is the first thing you want to do when creating a blog, it will ease
the onboarding.

task-2144335
2020-02-04 10:59:22 +00:00
Swapnesh Shah 5706ff62df [FIX] account: Set newly created template
Before this commit, Creating New Template from "Send Invoice" wizard doesn't update template_id on the Wizard.

In this commit, We write newly created template_id on the wizard.

closes odoo/odoo#44561

X-original-commit: 454e6ed9d956ac131d6476c95e59b2ab390df5b6
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-02-04 09:55:06 +00:00
Swapnesh Shah c3151daea7 [FIX] account: Use current date as fallback to convert currency
Fixes #43705
Before this commit, There will be tracback on converting currecy if there is not date on tax line.

Now we use current date to as fallback to convert currency.

closes odoo/odoo#44559

X-original-commit: 2b88d71c6e4815334f0edaa24d6041c5facd811e
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-02-04 09:41:30 +00:00
Martin Trigaux d11ee78019 [IMP] bus: unescape notification message
The title of notification is the author name escaped (for security
reasons).

   if (message.hasAuthor()) {
       title = _.escape(message.getAuthorName());
   }

When forwarded to the system notification, it does not need to be
escaped though, as the system notification is not HTML based.

Without this patch, a user named "Bob's friend" sending a message was
creating a notification with the title "Bob&#x27;s friend"

Unescaping the notification body just in case but the HTML of the body
in a mail.messages should be stripped by _notifyIncomingMessage.
Unescaping will just ignored unescaped characters and should do
nothing on messages not escaped.

Fixes odoo/odoo#24846

closes odoo/odoo#44550

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-04 10:33:19 +00:00
Odoo's Mergebot d64bf7e6cd [MERGE] web_studio: model configurator
Improvements for custom models and some default behaviours
linked to the Studio model configurator (Enterprise task).

In a nutshell:
- mark the default `x_name` field of a custom model as 'to be copied'
- improvement for kanban views that makes it easier to user with
  custom models

The interesting part is in the Enterprise `web_studio` module.

Task 2091654
Enterprise PR: odoo/enterprise#7326

closes odoo/odoo#42055

Related: odoo/enterprise#7326
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-02-04 13:16:40 +01:00
Damien Bouvy c2fccc9118 [IMP] base: make name of custom models copied by default
Copying a custom model's record seems pointless by default, since
no field is actually copied.

It makes sense to copy at least the `x_name` field, to make it clear
to the user that the system understood it was duplicating something
and not just creating something entirely new.
2020-02-04 10:46:41 +00:00