Commit Graph
133702 Commits
Author SHA1 Message Date
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
Damien Bouvy 18e06fa90a [IMP] web: kanban content container
The 'new' (read: the classes not in the 'compatibility layer section')
classes of the kanban views did not allow to cleanly separate an image
header from a content container.

This commit adds such a container, allowing a very simple layout that
should work all the time for a typical 'card with left image and right
content layout':
```xml
<div class="o_kanban_record oe_kanban_global_click o_kanban_record_has_image_fill">
  <field class="o_kanban_image_fill_left" name="image_128"
         widget="image"
         options="{'zoom': true, 'background': true, 'preventClicks': false}"/>
  <div class="o_kanban_record_details">
    <div class="o_kanban_record_top">
      <div class="o_kanban_record_headings">
        <strong class="o_kanban_record_title">
          <field name="x_name"/>
        </strong>
      </div>
    </div>
    <div class="o_kanban_record_body">
      <!-- some fields here (e.g. tags,...) -->
    </div>
    <div class="o_kanban_record_bottom">
      <div class="oe_kanban_bottom_left">
        <!-- some fields here (e.g. kanban status,...) -->
      </div>
      <div class="oe_kanban_bottom_right">
        <!-- some fields here (e.g. user image,...)-->
      </div>
    </div>
  </div>
</div>
```

Before this commit, the absence of a container for the right side meant
that the top/body/bottom were flex-growed in a flex-direction: row
element, appearing as 3 columns instead of rows.
2020-02-04 10:46:40 +00:00
Damien Bouvy ea4c934728 [IMP] web: allow background-style images for custom models
The `FieldBinaryImage` assumes that the image mixin is used to manage
its fields - this is mostly true, until you use custom fields.

This commit makes using the 'background' option of the Image widget
possible by fallbacking the thumbnail field's name to the name of
the field itself instead of `image_128` when we're dealing with a custom
field.
2020-02-04 10:46:40 +00:00
Nicolas Martinelli 411dd85a80 [FIX] purchase: vendor reference
- Create a product A
  MTO, Buy
  Add a supplier S1 and set a specific reference
- Create a product B
  MTO, Buy
  Add a supplier S2 and set a specific reference
- Create a SO with A & B, confirm
- 2 RFQ are created

The first RFQ is created with the correct reference, but not the second
one.

This is because `display_name` depends on context keys: it is computed
once for both products with `partner_id` set as `S1`, while it should be
recomputed for product B with `partner_id` set as `S2`.

In order to avoid this, we use `with_prefetch()` to avoid reusing the
prefetched value.

opw-2176638

closes odoo/odoo#44564

X-original-commit: d96c1910be8f242455de9b443fc9db82155b4dd1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-04 10:09:27 +00:00
Victor Feyens 1ed07959db [REM] web_diagram: remaining files
The web_diagram module was removed in saas-13.1,
along with the diagram view support but some translation files were
brought back by forwardports.

closes odoo/odoo#44563

X-original-commit: 3f50601736b23dac78720d24d5b67bf6b94f5f43
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-04 10:09:04 +00:00
Nicolas Martinelli a02a4b112a [FIX] l10n_ch: ISR with partial payment
- Create an invoice for 1000
- Make a partial payment (e.g. cash) for 250
- Print the ISR

The ISR contains an amount of 1000 (total amount), while it should be
750 (amount left to pay).

opw-2180538

closes odoo/odoo#44552

X-original-commit: 421bbcd5270b889874dc99a9a8cead0272e1e3da
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-04 08:48:20 +00:00
Jason Van Malder 5b252215dc [FIX] web_editor: replace root style/class attrib
Issue

    - Install eLearning
    - Edit the header > change image
    - Save

    Image not changed

Cause

    We do not take new style/class attrib in account in
    replace_arch_section.

Solution

    Take them in account

OPW-2122947
OPW-2182109

closes odoo/odoo#44541

X-original-commit: 8579c0cae839c615415120b79d6ec22c71f7affd
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-02-04 08:00:14 +00:00
Nicolas Martinelli 17ff09c90c [FIX] repair: set lot
The parameter `lot_id` must be a recordset, not an `int`.

opw-2188752

closes odoo/odoo#44525

X-original-commit: aeafd2a84e309ee4a496f9a109d7fe6b0fb9cd3d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-03 18:08:03 +00:00
Martin Trigaux be7b57a6fa [FIX] account: give a correct example
The computation was incorrect, the answer was 10, not 110 with the
previous formula

Courtesy of Frederico Freire Boaventura

closes odoo/odoo#44514

X-original-commit: 577e1ad8314cac6e61f60f997f338df4b7a1da38
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-03 16:16:20 +00:00
Romain Derie d92f76592c [IMP] website(_blog/_slides): show a toaster when a record is published
This commit shows a toaster when publishing a record through the toggle in the
topbar.
The `_description` field is used to do that, as it is supposed to contains a
'business oriented' descriptive name, see task-37311. Indeed, this field is
used in studio and in mail templates.

task-2144335
2020-02-03 15:25:20 +00:00
Romain Derie 9725e61969 [IMP] website_blog: make footer oe_structure placeholder less visible
task-2144335
2020-02-03 15:25:20 +00:00