Commit Graph
133059 Commits
Author SHA1 Message Date
Damien Bouvy 34226a4fee [FIX] payment: authorized payment should redirect automatically
From the PoV of the customer, there is no difference between an
authorized payment and a captured payment; they should get redirected to
the confirmation page in both cases.

closes odoo/odoo#42780

X-original-commit: 452676737dd657a5d31a88fa89cc136cbe69b96a
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-01-06 15:15:38 +00:00
Victor Feyens 2691c66dbc [FIX] account: use the right company to access partner properties.
closes odoo/odoo#42955

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-01-09 10:04:32 +00:00
Laurent Smet 0cbd941d44 [FIX] account: Restore lost invoice onboarding banner
This feature has been lost when removing the account.invoice model.

closes odoo/odoo#43060

--task: 2154792
X-original-commit: 7615030fb293356fc5540ba65afa66ff71b207c1
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-01-09 14:19:00 +00:00
Jorge Pinna Puissant 7f2428cb07 [FIX] account: recompute base amount tax
- In a multi currency company, create an invoice with the domestic
  currency ($);
- Add a product (500$) with taxes;
-  Change the currency to a foreign one (€);
- The product don't change of amount but only of currency (500€);
- Save the invoice, and print it.

Before this commit, the base_amount_tax of the tax wasn't be updated.
Note that the base_amount_tax it should be expressed in domestic
currency. As this field didn't update in this case, the base_amount_tax
is expressing the amount in foreign currency. As this amount is supposed
to be in domestic, for the sake of the reports, it's change in currency
of the invoice (in this case the foreign one), and it's shown in the
report. The amount shown is not correct.

Now, the base_amount_tax is recompute and setted in domestic currency.

opw-2157853

closes odoo/odoo#43071

X-original-commit: 226a1155124e890d00e33968feb43b9fd6b99fa5
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-01-09 15:00:57 +00:00
qsm-odoo e590609ebb [IMP] web_editor: allow to enable option widgets by enabling another
With this commit, we can now say "on preview/selection of a widget,
also preview/selection these other widgets". For this, add a
`data-trigger` with comma-separated widget names.

A `data-trigger-value` can also be used to indicate the values these
other widgets should have during preview/selection... but this currently
only works for colorpicker widgets thanks to a big big hack that should
be improved later.

Part of https://github.com/odoo/odoo/pull/42986

closes odoo/odoo#42986

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-01-09 13:09:50 +00:00
qsm-odoo 03ee121d6a [REF] web_editor, *: use _onUserValueXXX methods instead of notification
* website

This commit is simply about factorizing the code some more and making
sure the user value widgets always trigger a meaningful 'previewMode'
value.

Part of https://github.com/odoo/odoo/pull/42986
2020-01-09 13:09:38 +00:00
qsm-odoo d3ac066ee5 [REF] web_editor, *: allow to simulate notification of a widget
* website

This commit is simply about making the related method public instead of
private (allow to better see the diff in upcoming improvement commits).

Part of https://github.com/odoo/odoo/pull/42986
2020-01-09 13:07:03 +00:00
qsm-odoo 710d9c2226 [REF] web_editor: factorize user value widget notification code
Instead of triggering three different events 'user_value_change',
'user_value_preview' and 'user_value_reset', user value widgets in the
left panel now trigger only one event: 'user_value_update' with a
'previewMode' parameter being false, true or 'reset'.

This allows to simplify the code.

Part of https://github.com/odoo/odoo/pull/42986
2020-01-09 12:50:22 +00:00
qsm-odoo c197d3f8bf [FIX] web_editor: properly combine we-colorpicker Class attributes
Part of https://github.com/odoo/odoo/pull/42986
2020-01-09 12:50:10 +00:00
Arnold Moyaux e923058568 [FIX] purchase_mrp: ensure that a purchase order is linked
closes odoo/odoo#41115

Related: odoo/enterprise#7177
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-01-09 16:09:12 +00:00
Arnold Moyaux bf7733c2db [IMP] stock: remove useless function
_log_next_activity was on stock.rule and should have been
@api.model. So it should rather be on product template but
it's probably not necessary to have a function for it since
it's only used by orderpoint process.
2020-01-09 16:09:12 +00:00
Arnold Moyaux bce112678a [IMP] product, purchase_requisition, purchase_stock: _prepare_seller args to kwargs 2020-01-09 16:09:12 +00:00
Arnold Moyaux 833a147f5a [IMP] purchase_stock: merge RFQ from RR only for same date 2020-01-09 16:09:12 +00:00
Arnold Moyaux 46a78eb995 [IMP] purchase_stock: day to purchase
Create RFQ with an order by date in futur. It will allow to
discuss RFQ before validate them and to be in time for the need.

today            Order by         Sheduled date of receipt
|_______________|___________________|_____________________|
days to purchase      vendor LT           security days

Task: 1849912
2020-01-09 16:09:12 +00:00
Arnold Moyaux 56efb55057 [IMP] stock, mrp, purchase_stock: RR check forecasted stock
When the scheduler runs, each orderpoint will check the forecast stock
for an infinite time. As example, if we plan a receipt of 10 products in
4 months and need to deliver 5 products next month, procurement will not
be launched since we have a forecasted quantity of 5.

In order to improve it, the orderpoint will compute the total lead days
from rules, suppliers/production delays, security days,...
Those lead days will be added to today in order to know at which date
the forecast stock should be checked and trigger the replenish document
for today in order to be delivered at the correct date.

Task: 1849912
2020-01-09 16:09:12 +00:00
Arnold Moyaux bdc2280309 [REF] stock: perf orderpoint as batch
Currently orderpoint run one request at a time. However it's not
efficient since compute are some private methods could be executed
one time in batch instead of record by record.

The strategy in order to improve it is:
- Still cut the orderpoints in batch of 1000 (usefull when using a new
cursor with intermediate commit)
- For each batch of 1000, create a list of procurement values and run
them in batch (commit a2a6b099a4 for more info)
- Each time a procurement exception is raised, catch the failing
orderpoint and rollback to the state before run. Remove the failing
order point from the current set and run it again.
- run method try to catch a maximum  errors by continuing to process even it
finds error in order to stack them. It would avoid to run the same set
again and again each time an error is raised.

test_orderpoint_1 took 975s before this patch and 100s after.

Task: 1849912
2020-01-09 15:59:12 +00:00
Arnold Moyaux 2e747cedf4 [IMP] stock, purchase_stock, mrp: Procurement exception
Currently when a procurement fail it will raise a user error.
Some function as run in stock_rule catch the errors and merge
them in a single error.

Also since commit a2a6b099a4 procurements
are executed in batch and in some cases, we would like to have more
information about the error. For example in orderpoint we would like to
know which orderpoint is responssible for which error.

It would also be possible to return an object with the details but
procurements pass through a lot of different method that already have
their own return signature and a simple exception is easier to manage.

Task: 1849912
2020-01-09 12:17:39 +00:00
Arnold Moyaux 476780ced5 [IMP] purchase: rename 'order date' to 'order by'
Task: 1849912
2020-01-09 12:17:39 +00:00
Arnold Moyaux 63fffa0bee [IMP] stock: propagate orderpoint through moves
Orderpoint reference are only set on the first object that is created
from the procurement request. However sometimes we would like to access
it from further object or define another behavior if we come from an
orderpoint.

Now that the we propagate the orderpoint_id, it's important to ignore
po line with an orderpoint AND a chained stock move, else the quantities
will be counted twice by the orderpoint in a 2 steps receipt scenario

Task: 1849912
2020-01-09 12:17:39 +00:00
Arnold Moyaux bc7d644049 [REF] stock: remove lead days and type on RR
- lead_days: number of days to add from today in order to define the
procurement request date.
- lead_type purpose is to define if supplier delays should be added
to procurement request date.

Those fields are problematic with the onboarding. The purpose is to
replace them with an automatic computation.

Task 1849912
2020-01-09 12:17:38 +00:00
Arnold Moyaux d81d12daaa [MOV] stock: orderpoint own file
Move the code from stock warehouse to its own file.

[MOV] stock: adapt warehouse and orderpoint files
2020-01-09 12:17:38 +00:00
Katherine Zaoral 709063442e [ADD] l10n_ar: add demo data for mipyme partner
This will be use to make testing of the MiPyme FCE document types

closes odoo/odoo#43080

X-original-commit: 4365bd25512082bfd70229272c7248720f0383ca
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-01-09 15:34:52 +00:00
Prajapati Hardik c1ad0442e0 [FIX] base,account: let users activate,deactivate for taxes,currencies from list view itself.
Task:2155803
Closes:42845

closes odoo/odoo#43070

X-original-commit: 2e2570328fe1e323917030d682b4f1e757e1fd4a
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-01-09 15:00:09 +00:00
jerome hanke (jhk) f796e6ee5a [FIX] doc: clarity issue for gantt view precision field
self-explanatory

opw-2161939

closes odoo/odoo#43059

X-original-commit: 05a198bc59e7c51bbdf566d5ed99d57cf6542c20
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-09 14:16:56 +00:00
Arnaud Joset 1c3f55484a [FIX] sale: remove duplicated function
Before this commit, function _get_payment_type was declared twice in SaleOrder model.

closes odoo/odoo#43044

X-original-commit: 5eb55d04de4c945377cfb192291146e46b74e05e
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-01-09 12:50:32 +00:00
Martin Trigaux b7cdd05bf9 [FIX] project: translate kanban examples
Using a lazy translator as this file is processed when loading the web
client, no during rendering (the translation memory was not ready yet).
Turn escFormat into a lazymethod to evaluate it only after translation
resolution.

Fixes odoo/odoo#36494

t push de#

closes odoo/odoo#43038

X-original-commit: 05429ca9d09ad49f5f214b082ef524b74c25eeeb
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-01-09 12:09:59 +00:00
svs-odoo bdf818eb64 [FIX] stock: throw back at inventory validation
Before this commit, the breadcrumb was lost when user validates an
inventory adjustment. Now, it's not the case anymore.

fixes #41891

closes odoo/odoo#43037

X-original-commit: b557f47f567182d5c529c131444c59d3315d2268
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-01-09 12:08:54 +00:00
Nicolas Seinlet 3900619fdb [FIX] sale: "see own leads" user can invoice his sale order
closes odoo/odoo#43035

X-original-commit: f2231b3047f4c3a9ad3e481133fca62f9d056354
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-01-09 12:08:32 +00:00
Andrea Grazioso (agr-odoo) 4754717eb5 [FIX] account: fix traceback when sending invoice without template
Create an invoice, click on send and print without an associated
template.

Traceback will occur because the lang parameter is set correctly only
from a template. Adding a fallback in case there is no template setting

opw-2168623

closes odoo/odoo#43008

X-original-commit: 8fd8fdcf0fa6fb26a1797ad2b40fcaf34d23eee2
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-09 08:42:04 +00:00
Andrea Grazioso (agr-odoo) d3b2ce528c [FIX] stock: fix barcode layout printing
Install stock, go to Configuration>Settings, activate "Storage
Locations". Go to Configuration>Locations select locations and print

The reported will not follow the documentation, barcode will be one
after the other and not side by side, arranged in a 2x2 grid.
Fixing require to apply style changes since new bootstrap
code is not handled well by wkhtmltopdf

opw-2162698

closes odoo/odoo#42967

X-original-commit: 7ac26d0ef5631cee38c29535531053fed6afce85
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-08 14:56:50 +00:00
Nicolas Martinelli 0d2e280152 [FIX] stock: update quantity when products are grouped
- Go Inventory > Master Data > Products
- Group by Category
- Go to a product
- Click on 'Update Inventory'

An error is raised because the field `categ_id` doesn't exist on
`stock.quant`.

opw-2161129

closes odoo/odoo#42964

X-original-commit: 901d60cd90f1e6ba0fd6502c04619193d3ca1c7b
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-09 12:29:28 +00:00
Manuel Vázquez Acosta e7349beb06 [CLA] Add Pitufo to Merchise CLA.
closes odoo/odoo#43028

X-original-commit: c062273cc8c5083461a2e8afccbfad641d5139ae
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-01-09 11:28:45 +00:00
Jason Van Malder 6bb1a8cd61 [FIX] web: fix planning roles filter disappearing
Issue

    - Install planning
    - Go on a planning view where you have 2 filters (employee/roles)
    - Unselect all items of one filter

    All the filters disappear.

Cause

    By doing this:

    ```
    if (!_.find(options.filters, function (f) {return f.display == null || f.display;})) {
        return;
    }
    ```

    We break the function's recursion:
    ```
    return self._renderFiltersOneByOne(filterIndex + 1);
    ```

    So the others filters are not rendered.

Solution

    Return the next filter rendering instead of nothing.

OPW-2166932

closes #42703, closes #42433

closes odoo/odoo#43025

X-original-commit: dbab68a92ec48b2bb6f21244af1de56691cb43f1
Signed-off-by: Jason Van Malder <jvm-odoo@users.noreply.github.com>
2020-01-09 11:54:05 +00:00
William Henrotin 2c686bf4b9 [FIX] stock: fix wrong domain
Commit 6c4447ef59 set a new domain on picking_type_id of stock rule but
it was wrongly written. This commit make it syntactically correct.

closes odoo/odoo#43009

Task: 2169836
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-01-09 08:54:29 +00:00
Swapnesh Shah 3ea3fa21ef [IMP] mass_mailing_sms: Add missing field in form
Followup on https://github.com/odoo/odoo/commit/14648272dadfbc9e2c7069de76770d5c052cd37f
Field failure_type was visible on the list view only.
In this commit, we display field on form view as well.

closes odoo/odoo#42987

X-original-commit: 5c3c61014d7af995cd54d35aa769e8d92352a531
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-08 17:43:17 +00:00
Guewen Baconnier 0e1707004e [IMP] crm: add name on some lead view form groups to ease inheritance
Crm Lead has a quite complex form view as the same view is used for both
leads and opportunities. There are therefore some duplicated fields, such
as partner_id.

It is therefore complicated to use xpath to locate such fields. Adding a
name on groups containing those lead / opportunity specific fields make
the view easier to inherit using xpath.

closes odoo/odoo#42895

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-09 09:50:43 +00:00
wan 0385745dd4 [FIX] website_blog: babel yyyy vs YYYY
In the format_date function of babel.dates, there is a difference
between `yyyy` and `YYYY`.
`YYYY` should only be used in combination with the week number.

See issue https://github.com/python-babel/babel/issues/419

closes odoo/odoo#42735

Related: odoo/enterprise#7536
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-01-06 16:23:29 +00:00
Swapnesh Shah 126a2e08ec [IMP] mass_mailing: make name required on saved records
Name field on mailing is a technical field coming from its underlying utm
source record, coming from an _inherits. It is not required in view as it
is computed at creation based on subject. Changing it is possible
in debug mode.

However it is possible to try to write a void value, which leads to an issue
as it is technically required. With this commit we make the name field required
at write.

closes odoo/odoo#42368

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-09 09:46:58 +00:00
Nicolas Seinlet 611b4ed95a [FIX] mail: fix activity view when having activities without type
At model level, activity_type_id is not a mandatory field on mail.activity.
Indeed required is added in views, meaning people could have activities
without type.

This make the activity views crash with `TypeError: 'bool' object is not
subscriptable` error when computing aggregated activity data. This commit
fixes that error.

Activities without type are still not displayed in the activity view as
columns are based on available activity types. It means activities without
type have no column to be displayed. As this is a corner case that should
not happen when using activities using the interface this is considered
as a limitation of current implementation.

closes odoo/odoo#42991

X-original-commit: 77f0dd8936df3dddfa3df8041d4b7f7c62595430
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-08 18:14:36 +00:00
Thibault Delavallée 8c18433605 [FIX] event: correctly copy information from event type mail schedulers
Currently an onchange on event type copy the mail schedulers information from
event type to the event. In order to ease inheritance, some white listed
attributes are directly copied using direct getter (line[attribute], see code
for clarity). However mail and sms templates are many2one fields and the
id should be copied, not the browse record.

There is no issue when the onchange is trigered from interface because a
mapping is done. However when calling the onchange in code there is a crash
as the record is directly given to write.

closes odoo/odoo#42990

X-original-commit: 09c6747ea2de108cf512091b7837a71d4ea4662a
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-08 18:13:22 +00:00
Yannick Tivisse 2bbae8e70e [FIX] hr_holidays: Fix number_of_hours_display computation
Impacted versions: 13.0

Steps to reproduce: Add employee, allocate paid leave, set leave in hours.
Standard workweek is set to 40 hours. 5 days 8h per day
Global Time off: Dec.25 00:00:00 - Dec.26 23:59:59

Employee requests one week of leave, during christmas (dec.25 and dec. 26 in the week).
Manager approves.

Current behavior:
Before approval the total hours in the request is 24. The manager approves
and the total hours change to 40. Total remaining hours is also -40.

Expected behavior:
After approval the requested hours should not change and remain 24. The
total remaining hours should also be -24.

This is a similar issue as issue #41848 which has been fixed in #42710

TaskID: 2169161

Closes #42877

closes odoo/odoo#42924

closes odoo/odoo#42983

Original-signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
X-original-commit: 11a5e3d09dd57d51813fc8151c30a619d4f368b5
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-01-08 17:09:07 +00:00
Yannick Tivisse 416a1cc089 [IMP] hr_holidays: Correctly compute number_of_hours_display
Purpose
=======

Impacted versions: 13.0

Steps to reproduce:
- Add employee
- allocate paid leave
- set leave in hours
- Employee working hours is
  Mo: 8:30-12:30
  Tu-Fr: 8:30-12:30 and 13:00-17:30 (total of 38h per week).
- Employee requests on week of leave
- Total hours in request is 38. Manager approves.

Current behavior:
Before approval the total hours in the request is 38. The manager
approves and the total hours change to 40. Total remaining hours is
also -40.

Expected behavior:
After approval the requested hours should not change and remain 38.
The total remaining hours should also be -38.

Taskid: 2166964
Closes: #41848
X-original-commit: b89565b93d8e6905d4cc3fe9d3de8ddecb43acd4
2020-01-08 17:09:07 +00:00
Julien Mougenot 3c5194a00b [ADD] web: Custom File Input
New component: the custom file input. Its purpose is to define a input of type file
with a custom trigger (button, link, etc.).

Its construction is the following:
- attributes: behaviour of the actual input (route to call, multifile, allowed
    extensions etc.)
- inner template: the trigger that will fire the upload prompt when clicked
Once a file has been uploaded, the component will emit a 'uploaded' custom event
containing the files.

closes odoo/odoo#38423

Related: odoo/enterprise#6031
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2020-01-06 14:37:16 +00:00
Julien Mougenot 34bbdd88c0 [ADD] web: Owl Dialog
New Owl component: Dialog. It does not rely on Bootstrap but behaves the same
and does not conflict with legacy dialogs.
To call this component, you need to define it in the XML parent template instead
of calling it in the JS file, and put a flag in the parent state to toggle the dialog.
Old dialog file has also been slightly updated to ensure compatibility between both
versions.

This commit also updates a list view test which did not wait for click events to
properly trigger and would cause the new dialog system to crash.
2020-01-06 14:37:16 +00:00
Julien Mougenot ab37648cb1 [ADD] web: useFocusOnUpdate hook
Added a new custom hooks: useFocusOnUpdate.
This hook returns a function taking a DOM selector as an argument.
That function will focus the first matching element on the next repaint of
the component.
2020-01-06 14:37:16 +00:00
Mathieu Duckerts-Antoine f2046910bd [REF] web,mail: remove dead code
Removal of dead code (announcement xml and scss files).
2020-01-06 14:37:16 +00:00
Julien Mougenot 3cf49e1913 [IMP] Owl: update to 1.0.0-beta5
Update of the Owl library.
Also added "_lt" to the default test environment properties.
2020-01-06 14:37:16 +00:00
Lois Rilo 35163f7785 [CLA] ForgeFlow (former Eficent) signs Odoo CCLA
closes odoo/odoo#42984

X-original-commit: f975c8ab867030cb7ff91a791f9ffe4b2bab0dde
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-01-08 17:09:26 +00:00
Katherine Zaoral 5171a8c45d [FIX] l10n_ar, l10n_latam_invoice_document: make reference to old open and paid states on invoice
Now use direclty the posted state from account move.

* This was changed in a constraint in l10n_latam_invoice_document module, also extend the constraint docstring
* This old states where also in a view domain in l10n_ar module for account.move view. We remove the field for the view (AFIP Responsibility) instead of fix the state name.

closes odoo/odoo#42982

X-original-commit: 33a5cfe068323f7fc4c92f42fadb8e236954d93a
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-01-08 17:05:57 +00:00
Katherine Zaoral d8e33048ba [ADD] l10n_ar: Fix identification type of Anonymous Final Consumer partner
The purpose of this partner is that we do not need to report to AFIP the identification number.

Since this partner identification was configured as DNI it was throwing an error when validate an invoice for that partner in AFIP, AFIP was requesting us to sent the DNI number.

Now we activate the Sigd "Sin identificar/venta global diaria" identification type (code 99), proper configure the  it to Anonymous Final Consumer partner, with this change AFIP validate the invoice directly and does not request us the identification number.

Now we set this partner sequence to the biggest one so far to show this identification type as the last in the list of identifications types

closes odoo/odoo#42981

X-original-commit: 842306b06984f4357f9e3cfdbb58bad828a1a627
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-01-08 17:01:55 +00:00