Commit Graph
138994 Commits
Author SHA1 Message Date
Thanh Dodeur d339342bed [IMP] website: adds video suggestions
This commit adds video suggestions to the media dialog

task-2308019

closes odoo/odoo#55293

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-09 12:11:14 +00:00
808343dab9 [REF] *: owl graph renderer
The main purpose of this PR is to convert the GraphRenderer widget into an OWL component.

Along the main changes brought to the module "web", some other changes have been brought:
- the modules "board" and "stock" have been adapted accordingly;
- the function "utils.sortBy" has been given an extra optional parameter "order" (with value 'asc' or 'desc');
- a helper "owlCompatibilityExtraNextTick" has been added. It has the same effect as the "nextTick" helper but should
  be used in a specific situation (see the corresponding documentation for more information).

Task ID: 2090967

closes odoo/odoo#54009

Related: odoo/enterprise#12710
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Florimond Husquinet <fhu@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
2020-10-12 15:52:01 +02:00
Benjamin Frantzen (bfr) 25023e59e2 [FIX]account_edi: set PdfFileReader to strict=False
Determines whether user should be warned of all problems and also causes some correctable problems to be fatal. Since we just want the widest compatibility when reading PDF, strict=False seems acceptable.

TASK ID: 2358822

closes odoo/odoo#59736

X-original-commit: 9fb637577e0c13778e253b4f1329f59459ab0824
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
2020-10-12 11:04:33 +00:00
Sébastien Theys 5af18fbd9e [FIX] mail: ensure discuss composer at the bottom if no message list
task-2358093

closes odoo/odoo#59735

X-original-commit: 07159984999b14d1566706a62d54594753ad9f93
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-12 11:04:07 +00:00
Jorge Pinna Puissant 811444829f [FIX] project: access token on task
- Create a new Project with 'Portal user and all employees' as
  visibility;
- Add a portal user as customer;
- Create a new task in the Project, without assigning the task to
  anybody;
- Connect to the portal as the portal user;
- Send a message on the task.

Before this commit, an Error 403 forbidden was raised, this error occurs
because the task don't have an access token created, this token will be
created when an internal user send a message on the task.

Now, the access token is created if the project has a 'Portal user and
all employees' visibility, and the portal user can post a message on
the task.

opw-2345070

closes odoo/odoo#59733

X-original-commit: 64e93794efb4193b3dfa7aa43360a1ef274e623d
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-10-12 11:00:37 +00:00
yhu-odoo 6424025b65 [FIX] purchase: don't send preview email when PO not saved
When PO not saved, no mail can be send. Sending a reminder preview will
get traceback. In this commit, we check if the PO is saved before
sending the mail.

Also clean some useless code in the send_reminder_preview() and fix the
issue when no json object is return to the widget because of on mail
send.

Task 2339431
PR #57961

closes odoo/odoo#59399

X-original-commit: 83f2cac4b8ba101d6a7736a8ff408a3fdb5422fe
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2020-10-12 09:48:24 +00:00
Rémy Voet (ryv) 89a597761f [FIX] purchase: fix state of extra product
As explained in issues-59664, the commit
f18bdc4fcf2b6b0bdb7699c3b2aa38d332301a84 add
readonly attribute in the `purchase.order.line` state field
to avoid to save bad `state` in the server (then the state of the
PO line != PO line).
But it breaks the feature to add product
when the PO is already confirm (the state will be 'purchase' and the
`product_id` is readonly when state == 'purchase').

To fix both issues, add a `default_state` in the context.
It will "bypass" the attrs of `product_id` and the state of PO
('draft') line won't be save because it is readonly.

resolve #59664

closes odoo/odoo#59729

X-original-commit: 74780e95a2a3db9d9875aea7e644bf064ecf6b46
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2020-10-12 10:16:04 +00:00
Pierre Paridans a84e37bb8a [FIX] mail: plain-text messages word-wrap in Discuss UI
When a user sends a plaintext email to a mail-enabled channel, the
rendering of this message in Discuss have present a horizontal scroll
when the text contains long sentences.

This commit fixes it by enabling wrapping of the line's word to fit its
container size and prevent horizontal scrolling.

Note: the required CSS rules were already present since odoo/odoo@0e7e18ff71
but a wrapper element (with the class `.o_thread_message_content`) was
introduced in odoo/odoo@4685e4bc7f and
merged between the testing of the fix above and its actual merging in the
Odoo codebase, making it ineffective. We only have to properly re-enable
it.

opw-2341485

Related task ID: 34931

closes odoo/odoo#59719

X-original-commit: 5e66ca8d2c970eed999782bdd59e9082f3967833
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-10-12 08:42:49 +00:00
Joseph Caburnay ae83889da4 [FIX] point_of_sale: pos User can't close a session
Starting this commit: 8f57863707
regular pos User now don't have a read access to ir.property model.
Because of this, if a user opens a session, he won't be able to close
it. We sudo the search to stock.move (because the query parameters
requires reading from ir.property) to make sure that closing a session
will succeed.

closes odoo/odoo#59712

X-original-commit: 5e2763fdc94b63eee637f9679f8ea3a07beb74ce
Related: odoo/enterprise#13981
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Joseph Caburnay (jcb) <caburj@users.noreply.github.com>
2020-10-12 07:55:15 +00:00
Joseph Caburnay be9c8fa303 [FIX] pos_restaurant: table and guests in the receipt
X-original-commit: b87e210d87e71e40d88b0d9f4ca824651651bd8b
2020-10-12 07:55:15 +00:00
Luis González 6430ca499f [FIX] tools/safe_eval: Add missing builtin sorted
Before this commit, the function `sorted` wasn't available on
`safe_eval`, even though it's a Python built-in, which mades it
unavailable for Python-code evaluation, e.g. server actions.

After this commit, the above function is now accessible.

closes odoo/odoo#59715

X-original-commit: a725c8927963848c3f8ada3b71897a54b740cce6
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-10-12 08:12:19 +00:00
Julien Mougenot db41d41739 [REF] board,stock: adaptation to graph Owl
To reflect the changes on the graph renderer, some class names have been
adapted and the graph views in stock reports are now properly
instantiated.
2020-10-12 07:43:43 +00:00
db39211b46 [REF] web: owl graph renderer
We convert the GraphRenderer widget to an OWL component.

Task ID: 2090967

Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Florimond Husquinet <fhu@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
2020-10-12 07:43:43 +00:00
Julien Mougenot 3041d81135 [IMP] web: Allow asc/desc order in utils.sortBy
A string parameter 'order' has been added to the "sortBy" function of
the utils module to decide in which order the array should be sorted.
The default is 'asc'.
2020-10-12 07:43:43 +00:00
Mathieu Duckerts-Antoine 12ae5ef8e3 [IMP] web: owlCompatibilityExtraNextTick
Introduced a function that awaits for an additionnal rendering frame
initiated by the Owl compatibility layer processing.

By default a simple "nextTick" will handle the rendering of any widget/
component stuctures having at most 1 switch between the type of
entities (Component > Widget or Widget > Component). However more time
must be spent rendering in case we have additionnal switches. In such
cases this function must be used (1 call for each additionnal switch)
since it will be removed along with the compatiblity layer once the
framework has been entirely converted, and using this helper will make
it easier to wipe it from the code base.
2020-10-12 07:43:43 +00:00
Xavier Dubuc ec3f5cdaf8 [FIX] mail: ask for confirmation before attachment deletion
also hide all messages with empty body and no attachments

task-2282322

closes odoo/odoo#59675

X-original-commit: 60ae42dcda777cd66e4e421dbc02f9ef12a430ef
Related: odoo/enterprise#13974
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-09 17:28:17 +00:00
Paul Morelle 30036759e8 [FIX] hr_holidays: add explicit domain on action
In odoo/odoo@d2238de576 the domain of the
action hr_holidays.hr_leave_action_action_approve_department has been
removed, as the addon was reworked and no domain is needed any more.

However, during a migration from a previous version, the older domain is
not overwritten with an empty value.

With this commit, the domain is set to an empty one, which allows the
migration to correctly update the record.

closes odoo/odoo#59673

X-original-commit: 76c2f412c09ef1169b5cf936f0770cd4200f29e2
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-09 16:55:16 +00:00
David Beguin 4c9e39cfbd [FIX] website: get visitor tz directly from cookie
Since tz is now (from 6eb4762fee) added to the client cookie,
visitor timezone can directly be set when creating the visitor, using the
request.

Jstz can be removed as even for module in ENT that used this lib,
we can get the timezone using Intl lib instead.

This will also reduce the number of request made only to get visitor's
timezone.

This commit reverts part of 17e8402523
Linked ENT PR: 12963

Task ID: 2333825

closes odoo/odoo#59501

X-original-commit: 3d9a2de3575777c87327691319d89f9de6b8eada
Related: odoo/enterprise#13918
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-08 11:45:39 +00:00
Andrea Grazioso (agr-odoo) b439ee1022 [FIX] stock_landed_costs: fix account for non-anglosaxon accounting companies
Steps to reproduce:
1. Activate landed costs
2. Create a product that in the purchase tab has active 'Is a landed
cost'
3. Add this product to a purchase order
4. Confirm the PO, create the bill and create landed costs entry

Since they don't use anglosaxon accounting they expect the
invoice line account to be used for the landed cost. It will come in
empty as it is looking at the stock input account.

opw-2332763

closes odoo/odoo#59626

X-original-commit: f500bec7c1a2de799c0d4deb9b7ee43a69b3b46a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-10-09 11:56:03 +00:00
Andrea Grazioso (agr-odoo) 1126e6614b [FIX] stock_landed_costs: propagate landed costs line from po to bill
Steps to reproduce:
1. Activate landed costs
2. Create a product that in the purchase tab has active 'Is a landed
cost'
3. Add this product to a purchase order
4. Confirm the PO and create the bill

is Landed costs checkbox is not enabled when this product is
being invoiced. Any time you add this product to an invoice manually it
will have it on. They want that same behavior when the invoice line
comes from Purchase Order

opw-2332763

X-original-commit: d8f5ed417deb82151abf7a25ad16ce0720e90780
2020-10-09 11:56:03 +00:00
Achraf (abz) d4d354e3cf [FIX] sale_coupon: promotion program with several identical products
Issue

    - Create promotion program with product_x
    - Create new quotation
    - Add product_x on the first line
    - Add another product_x on the second line
    - Press "Promotions" button

Cause

    The attribut reward_product_qty except singleton but order_line contain more than one element

Solution

    Take the order line with the higher quantity

opw-2350574

closes odoo/odoo#59637

X-original-commit: 30d66b17ea1829e30de176774c7511aab19851a0
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Signed-off-by: Achraf <macadelic80@users.noreply.github.com>
2020-10-09 12:40:21 +00:00
Nicolas Martinelli 9d36b03cbe [FIX] web: report controller in multi-company
- Create 2 companies A & B
- Set a website on company A
- Switch to company B
- Open a done MO
- Open the cost analysis

An AccessError is displayed.

The error arises in:
https://github.com/odoo/enterprise/blob/923cbffe4e60572a5c17ee962d571c037e9cff44/mrp_account_enterprise/reports/mrp_cost_structure.py#L90

The root cause is coming from the call to `/report/html/`, which is
called without any `data`. In this situation, the following adds an
incorrect `allowed_company_ids` in the context:

https://github.com/odoo/odoo/blob/d1413a2f06bcb44b1fbb6dba8658e698c8da4018/addons/website/models/ir_http.py#L196-L205

Indeed, the `allowed_company_ids` is the one from the website, in this
case company A.

The issue doesn't occur when downloading a PDF from the interface since
in this case the `data` dictionary contains the appropriate context
which is set in:

https://github.com/odoo/odoo/blob/d1413a2f06bcb44b1fbb6dba8658e698c8da4018/addons/web/controllers/main.py#L1958

As a solution, we add the `user_context` in the `/report/html` route.

opw-2341747

closes odoo/odoo#59663

X-original-commit: 932e347a90bfd4bf025e4e8e54ef9c66cc49c5d0
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-09 14:31:20 +00:00
Raphael Collet 0ee01beebe [FIX] core: preferably flush() with an env with a real uid
This fixes a crash in some controllers with `auth='None'` where some
updates are flushed with an environment where `uid=None`.  When there is
an environment with a real uid, preferably use it.

closes odoo/odoo#59658

X-original-commit: 2795c86df54389b858a454cbc1782b1f34f3ba4f
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-10-09 14:06:29 +00:00
qsm-odoo f05866aef3 [FIX] website: solve long dropdown menu problems in navbar
Following [1]. The mentioned commit selectors were to be simplified and
actually did not solve the problem in mobile affixed menu. Also,
targeting "o_affix_enabled" to target the non-affix menu was wrong since
when there is no affix menu, no header has the "o_affix_enabled" class
as its names indicates it. So the mentioned commit fixed half of the
problem and only when the website used the affix menu feature... Let's
hope this new commit fixes everything.

[1]: https://github.com/odoo/odoo/commit/21959599d1c25321865afabe7f70191efdda154e

closes odoo/odoo#59652

X-original-commit: 533a4db8efdf2b16f012e3c9253ae2abc88a344c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-09 13:54:53 +00:00
Thibault Delavallée 131cc12227 [REV] Revert "[FIX] web: add access group to the pdf js template."
This reverts commit odoo/odoo@681306d4e7.

Adding groups on assets parts is not a good idea. Indeed as assets are
compiled and optimized we do not want to serve different assets to different
users.

For example if you have several users in parallel on several workers those
could try to regenerate assets for their users. As each user has different
assets this could lead to big performance issue.

As original commit tried to solve a race condition we can safely remove the
assets fix to avoid issues and work on a cleaner solution.

See original ref odoo/odoo#51804 and odoo/enterprise#10737

This also solves an issue notably in website_slides where access to pdfjs
library was depending on connected users, due to assets mismatch. See
task ID-2352391 .

closes odoo/odoo#59610

X-original-commit: 000af2688e32d19b1874df2e909ccf0ddf636b91
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-09 11:17:29 +00:00
DramixDw d2e6015ce0 [IMP] website: make rvp and countdown closer to wysiwyg
Replacing 'in page' message for the "RVP" and the
countdown snippets so that we avoid to display some element that won't
be there on the saved page.

task-2261649

closes odoo/odoo#51632

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-09 15:22:05 +00:00
Anh Thao Pham (pta) 45eb9f0503 [FIX] account: fix email onchange on invoice template
- Activate debug mode
- Go to Settings > Technical > Templates
- Duplicate "Invoice: Send by email" and edit the copy (Name & Content)
- Go to Accounting > Customers > Invoices and create an Invoice
- Post it
- Send & Print
- In the wizard, select the duplicated template (the content will be updated)
- Uncheck "Email" option, the re-check it
The selected template is still the duplicated one, but the content is the one from the default template.

opw-2345200

closes odoo/odoo#59628

X-original-commit: cd6c54b15ce328b58888a4f33a64ae61c7744a90
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2020-10-09 11:57:38 +00:00
Benjamin Vray 69a942d363 [FIX] website: fix option to open mega menu dropdown on hover
Before this commit, the option to open dropdown on hover did not work
with mega menu.

task-2312878

closes odoo/odoo#59625

X-original-commit: 9b3b1c623867d3618220d8bd8a729701ae46448b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-09 11:54:10 +00:00
Olivier Dony cfa20f3eff [FIX] hr_work_entry: stop shadowing concurrent updates
The `_error_checking()` context manager is used to perform validation
and cleanup after changes on work entries, and is implemented using a
try/finally clause.

This mechanism fails to take into account that the alteration operation
can fail due to a concurrent update (in another transaction). In such a
situation the db cursor becomes instantly invalid, and any attempt to
use it will fail with:
  `psycopg2.InternalError: current transaction is aborted`.
This exception will be raised in the `finally` block, and will therefore
discard the original TransactionRollbackException.

The result: instead of being silently retried as expected,
the transaction fails and the user receives a cryptic error message.

Steps to repro: repeatedly click on the button to validate a leave

Solution: specifically handle PostgreSQL `OperationalError` exceptions
and do not attempt to use the cursor when they occur - just let the
exception bubble up.

closes odoo/odoo#59612

X-original-commit: 7ba47e7215df69b6556a848532e4f33ef4243e83
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-10-09 11:18:21 +00:00
Sébastien Theys a8dad56d6b [FIX] mail: fix discuss search filters and related issues
- don't reset `stringifiedDomain` when changing thread (this led to the
  control panel displaying obsolete filters)
- refresh non-main cache that are currently displayed when there is a known
  change of messages in the same thread's main cache
- refresh non-main-cache on displaying them, to fetch potentially new messages
- fix discuss "select all" conditions

task-2171873
task-2282374

closes odoo/odoo#59644

X-original-commit: b89dc5f949b3ad062fc4197a4152066c207e1bf9
Related: odoo/enterprise#13962
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-09 12:56:24 +00:00
Nicolas Galler 4c2a03aa8f [FIX] mrp: validate BOM lines with same product as BOM
Current behavior before PR:

It is possible to create a BOM that has a BOM line that reference the
same product as the BOM itself.  This is undesirable as when we create a
manufacturing order for this product we will have an error.

It is a regression bug that was introduced in commit
575353e251a0cce3bbff759edaeb56b5718beb11 between v12 and v13.

Behavior after PR is merged:

When saving a BOM it will validate that no product line references the
same product, or the same product variant, as the BOM itself.  Note that
it is allowed to have a BOM for a product variant that references
another variant of the same product.

opw-2347941

closes odoo/odoo#59633

X-original-commit: 917e4c67b4aa14ca71ec6cba4bc6d20a86459f42
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-09 12:05:27 +00:00
Rémy Baranx (bar) 75f21637de [FIX] stock_dropshipping: create dropship rules
Same issue than for commit 203bb4d9c11 but for dropship rules instead of
missing dropship types.

closes odoo/odoo#59629

X-original-commit: 1372cc427e9946b3f6ba81b4e895b145468092a2
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-10-09 11:58:53 +00:00
alt-odoo 2a4b0ede52 [FIX] account: wrong default bank journal returned
If no bank journal with no account set can be found, we should return False
instead of an empty record.

closes odoo/odoo#59609

X-original-commit: ececa74b96accd86bf9e9448d18526a905fed4c9
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
2020-10-09 11:17:02 +00:00
Susana d3faba84ea [FIX] l10n_cl: remove placeholder of l10n_cl_sii_taxpayer_type field from res_partner view
closes odoo/odoo#59562

Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-10-08 20:27:23 +00:00
Lavish Chhatwani 61ed99d56e [ADD] sale_sms: ease sms use in sales application
Purpose of this commit is to add a bridge between sales and sms, notably to
add capability to edit sale order SMS templates for sales managers.

Task ID-2319841
PR odoo/odoo#56297
Upgrade PR odoo/upgrade#1829
Closes #55432

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-09 07:35:59 +00:00
Nicolas Martinelli 31f8af4598 [FIX] point_of_sale: check session in right company
- Create companies A & B
- Switch to company B
- Open a POS session in company B, but do not close it
- Switch to company A
- Set a Lock Date for Non-Advisers

The error message 'Please close all the point of sale sessions...' is
raised.

The message shouldn't be raised since the session is not in the company
we are setting a lock date.

We filter the session based on the company.

opw-2351930

closes odoo/odoo#59529

X-original-commit: a1445bf45fadf21a4af5dd2791efda4a4450a825
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-08 14:55:10 +00:00
Lois Rilo a6644a7dd6 [IMP] base: use avg group_operator for currency rate
If records are grouped by date, the avg aggregation
makes a more meanignful value

closes odoo/odoo#59577

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-09 08:31:42 +00:00
Thibault Francois 7f10e89d21 [IMP] crm_livechat: add country from visitor to lead
Issue
-----
Automatic assignation assign leads mostly based on country.
So far the country need to be set manually on the lead.

Solution
--------
Since we have the information on the website vistor
works, set the country on the lead from the visitor
website. Unless the visitor is link to a partner
with a country. In that case setting a country
will cancel the address sync from the partner to the lead.

closes odoo/odoo#59575

X-original-commit: eff2b357db179e6e62f3db58ca2d90cc61c3748f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-09 08:21:23 +00:00
Romain Derie e38e64b36f [FIX] website: prevent redirect loop on / if no homepage
Since 3d65424708d, if the homepage does not exists (no page with '/' as URL,
no page set as homepage), it would loop between / controller and _serve_page.

task-2250381

closes odoo/odoo#59548

X-original-commit: 07b701c581bd960bed42fcf97fae0dfed0332656
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-10-08 16:32:15 +00:00
std-odoo 406cf8e80d [FIX] website_slides_survey: fix certification share button
Bug
===
In the user profile view, we can see the certifications of the current user.

If we click on the share button, we are redirected to the course instead
of opening the share modal.

Technical
=========
Since 1f52435966 we use an on-lick event to
redirect the user when he click on the card. We use the JS event instead
of an standard anchor because nested anchors are forbidden in HTML.

That cause an issue if we click on a child anchor and if we stay on the
same page (which is the case when we open a bootstrap modal) because the
on-click event will be triggered.

We can not just stop the click propagation otherwise the modal won't be
opened.

Also, as the bootstrap modal element (`website_slides.slide_share_modal`)
is inside the element with the on-click event, so, if we click anywhere
on the modal, we will be redirected...

So, the solution is to open manually the modal, to stop the click
propagation and to move the modal element.

Task-2337693

closes odoo/odoo#59545

X-original-commit: 2a63f98bd359907169d14539feaa99a1d83263f0
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-08 16:14:14 +00:00
Joseph Caburnay 6aeb905958 [FIX] point_of_sale: include active orders in search results
When searching in the order management screen, we only include
results from orders saved in the server, which excludes the
orders currently saved locally. In this commit, we allow the
search to include those locally-saved orders.

closes odoo/odoo#59539

X-original-commit: 0fd87bca3041e680deb628e1952e995e4a2dba54
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-10-08 15:46:01 +00:00
Joseph Caburnay 5939e22141 [FIX] point_of_sale: searched orders should start at page 1
Create few validated orders. Then create other orders such that the
validated orders will be found at page 3. Search for an order
from the validated orders. BUG: You will see these searched orders
in page 3.

This commit fixes this issue by putting the search results in
page 1.

X-original-commit: 0a400313136ff7a7359d6105200522e859ce865d
2020-10-08 15:46:00 +00:00
Swapnesh Shah 589e91b4ad [IMP] account: correct term for supplier
We are using term "Vendor" on all views.

closes odoo/odoo#58873

X-original-commit: 9998babd59c3ae1858a857033dcf2ce7f4c53ca2
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-09-29 21:51:11 +00:00
Wolfgang Taferner 8dcc8bc217 [FIX] account: wrong implementation of journal account check
In case we have an account type which is allowed it is not needed to check the account allowed as it would fail although the account type is allowed before, so we need to do the check correctly as it was done in previous versions.

closes odoo/odoo#59547

X-original-commit: 220a1ffe69ddd9e4b45f31bf2911f1b6c3bfdfd7
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-10-08 16:31:31 +00:00
Benjamin Frantzen (bfr) a900f96619 [FIX]l10n_it_edi: update to new account_edi
edi_document_ids was ir.attachment but is now account.edi.document.

See https://github.com/odoo/odoo/pull/52407

closes odoo/odoo#59540

X-original-commit: 6a5c19d8011a5b480cbd3bccee3d2ab409807258
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
2020-10-08 15:46:28 +00:00
Andrea Grazioso (agr-odoo) fb17680703 [FIX] stock: fix update of quantity in internal package transfer
Activate Delivery Packages option in the settings, and check "Move
Entire Packages".
Create a product, and update the quantity on hand (e.g. product X with 5
quantity in package Y in location shelf 1)
Then,create an internal transfer (e.g. package Y from shelf 1 to shelf
2), check a first time the 'done' box and save.
Finally, edit, uncheck and check again the 'done' box in the same
operation and save.

You will see (tracking message in the chatter) that the initial quantity
is wrongly updated (doubled apparently).
After saving, the 'done' box will be unchecked and the transfer cannot
be validated with the following error message :
"You cannot move the same package content more than once in the same
transfer or split the same package into two location."

This occur because on uncheck and recheck done checkbox the quantity is
added again to the related move.

opw-2350335

closes odoo/odoo#59494

X-original-commit: 2dbb8ef133bb49356ff1f7dacb2be8e7ed934697
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-10-08 10:35:41 +00:00
Vanneri 4db54fd906 [CLA] signature for Vanneri
closes odoo/odoo#59538

X-original-commit: d8c61bc71a5e86ec56ed3da6bd1c2a8c426ccdde
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-08 15:41:22 +00:00
Adrian Torres f4bd4f7b60 [FIX] base: allow custom fields to use time module
After commit 06a8c5264eb6e87c29ad1d23a14e12dd45aa281c it is no longer
possible to pass bare modules to `safe_eval`'s context, however during
the aforementioned commit only the wrapped datetime and dateutil modules
were updated in ir_model's SAFE_EVAL_BASE context, thus the bare `time`
module was still being passed (and this triggered a traceback whenever a
custom computed field that used the time module was computed).

The fix is simple: pass the wrapped time module to the `safe_eval`
context instead of the bare one.

This commit also introduces a regression test to verify that the passed
modules actually work in custom fields.

opw-2347711

closes odoo/odoo#59560

X-original-commit: 02e816877ec12471a1446ba894b5cfca309979da
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
2020-10-08 18:41:08 +00:00
Goffin Simon c40e20c496 [FIX] sale: Update pricelist when discount_policy = 'with_discount'
Steps to reproduce the bug:

- Let's consider two pricelist PL1 and PL2 with discount_policy = 'without_discount'
- Let's consider a product P
- PL1 has 10% on P and PL2 has 20% discount on P
- Create a quotation Q with PL1
- Add P on Q (the 10% discount is correctly applied)
- Change PL1 to PL2 and click on Update pricelist

Bug:

The 20% discount on P was not applied.

opw:2352577

closes odoo/odoo#59541

X-original-commit: 9f1280e275fd851fce17bf82c603fdc50a8ef94e
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-10-08 15:46:54 +00:00
Julien Castiaux ed22cea4a4 [FIX] base: fix exception retro-compatibility-aid
Restore the old signature of except_orm.

opw-2354525
opw-2355980

closes odoo/odoo#59531

X-original-commit: 29e844a86508b39031fa8c3f1a2ef3735f71e6f2
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2020-10-08 14:59:47 +00:00