Commit Graph
143764 Commits
Author SHA1 Message Date
std-odoo 137843de5f [IMP] portal_rating: remove the flicker of the "portal rating" widget
Purpose
=======
Remove the flicker of the "portal rating" widget when we load the page.

Specifications
==============
Currently, the portal rating widget is composed of 2 parts
- A Python template
- A JS template

There's also 2 widget, one widget who is linked to the Python template
and which instantiate another widget (which will render the JS template).

That's why we have a flicker, the button of the widget is rendered in
Javascript.

The purpose of this commit is to simplify that, to have only 1 widget
and to have as munch as possible in the Python template.

Technical
=========
We still need 2 different template (Python / JS) because in the
non-fullscreen view, after editing our review, we do not want to refresh
the page, but we want the average rating to be updated.

Task 2322583
2021-07-16 11:32:57 +00:00
std-odoo 97f0f648f1 [IMP] website_slides: open rating composer in fullscreen mode
Purpose
=======
Currently we can write a review in the slide fullscreen view.
But if we click on the button "review", we are redirected to the reviews
page. Instead, we want to open the rating composer and to stay in the
page.

Task-2322583
2021-07-16 11:18:11 +00:00
std-odoo db7b15988b [IMP] portal: allow better customization of the portal rating composer
Purpose
=======
Add a new option on the portal rating composer, "hide_rating_avg" in
order to hide the global rating on the button and allow to fully
customize the button. Also allow to customize the text style and to
add an icon on the button.

Add the dependency "portal_chatter.xml" from portal rating on the portal
composer Widget. It already has the dependency "portal_chatter.xml"
from the simple portal module, but because the second file was not in
the dependency, the view was not inherited if we add the widget in a
fullscreen view.

Task 2322583
2021-07-16 11:02:41 +00:00
Alvaro Fuentes aa4fad64ce [FIX] web: fix web_read_group total groups count
Fetching all the groups from the DB causes MemoryError on some DBs
Example Accounting > Accounting > Journals > Miscellaneous menu:
```
 Traceback (most recent call last):
   File "/tmp/tmpbnah9jtp/migrations/base/tests/test_mock_crawl.py", line 176, in crawl_menu
    self.mock_action(action_vals)
   File "/tmp/tmpbnah9jtp/migrations/base/tests/test_mock_crawl.py", line 267, in mock_action
    mock_method(model, view, fields_list, domain, group_by)
   File "/tmp/tmpbnah9jtp/migrations/base/tests/test_mock_crawl.py", line 380, in mock_view_tree
    self.mock_web_read_group(model, view, domain, group_by, fields_list, limit_group=5)
   File "/tmp/tmpbnah9jtp/migrations/base/tests/test_mock_crawl.py", line 425, in mock_web_read_group
    data = model.web_read_group(domain, fields_list, group_by, limit=limit)["groups"]
   File "/home/odoo/src/odoo/14.0/addons/web/models/models.py", line 96, in web_read_group
    all_groups = self.read_group(domain, ['display_name'], groupby, lazy=True)
   File "/home/odoo/src/odoo/14.0/odoo/models.py", line 2248, in read_group
    result = self._read_group_raw(domain, fields, groupby, offset=offset, limit=limit, orderby=orderby, lazy=lazy)
   File "/home/odoo/src/odoo/14.0/odoo/models.py", line 2387, in _read_group_raw
    result = [self._read_group_format_result(d, annotated_groupbys, groupby, domain) for d in data]
   File "/home/odoo/src/odoo/14.0/odoo/models.py", line 2387, in <listcomp>
    result = [self._read_group_format_result(d, annotated_groupbys, groupby, domain) for d in data]
 MemoryError
```

This issue was observed during the upgrade requests upg-18830, target
14.0; and upg-61934 (legacy), target 13.0

The issue can be reproduced on a clean DB with just account_accountant
installed and ~2 millions account moves on a Misc journal.

closes odoo/odoo#73855

X-original-commit: a9b3d9cf9bfd2bf4c9b0904059f1606ad6e04ee4
Signed-off-by: Christophe Simonis <chs@odoo.com>
2021-07-16 11:29:29 +00:00
Goffin Simon dc7678ea15 [FIX] point_of_sale: Language not in en_US
When the user is not in en_US language, unit_name is always different of Unit

opw:2581462

closes odoo/odoo#73847

X-original-commit: 2da20136988afaa93f472da4726091452c61cd37
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-07-16 11:11:27 +00:00
Nicolas (vin) dca79a966a [IMP] account: Update journal accounts tooltips on config
To bring more clarity to the uses of the accounts
that can be set in the accounting settings, update
their tooltips.

Task id #2573145

closes odoo/odoo#73844

X-original-commit: 5367fc1a4faa0cae1e4e3125aa7ab7d3022be72b
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Nicolas Viseur <vin-odoo@users.noreply.github.com>
2021-07-16 10:57:27 +00:00
Raphael Collet 1cd06491cf [FIX] note: broken kanban view
The view is broken because read_progress_bar() calls read_group() with
two groupbys in eager mode.  The method read_group() is overridden for
model `note.note` and does not handle that case: the returned result is
incorrect.  We modify the override to call the default read_group() in
that case, which eventually fails and makes read_progress_bar() fall
back on its naive implementation.

closes odoo/odoo#73839

X-original-commit: 6443e22feea914639f143a94a802b52a74a8ce19
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-07-16 11:16:34 +00:00
Ivan YelizarievandNicolas Seinlet a88a912bd4 [FIX] mail: speed up read_progress_bar
This commit fixes the performance issue in getting statistics for
``activity_state`` (colored clock icon for overdue/today/planned) in
CRM.  The query has been tested for several years on a large database
(Odoo's own production database).

Performance test on 29 K crm.lead records (activity_state):

With a filter for 10 records:

```
| measurement        | before | after |
|--------------------+--------+-------|
| number of queries  |     25 |     5 |
| query time, ms     |     12 |    95 | (*)
| remaining time, ms |     32 |     7 |
```

All records:

```
| measurement        | before | after |
|--------------------+--------+-------|
| number of queries  |   1326 |     5 |
| query time, ms     |   1739 |   129 |
| remaining time, ms |  47934 |    17 |
```

As we can see in the last results, the time went from almost 50 seconds
(not responsive at all) to 150 milliseconds (responsive).  The time
increase in (*) may be caused by imperfect measurements, which are raw
and not averaged measures.

---

opw-2346901
task-1915411

X-original-commit: 1088e73c9a897902f9d2d70df980fe2a5ed23492
Co-authored-by: Nicolas Seinlet <nse@odoo.com>
2021-07-16 11:16:34 +00:00
Ivan YelizarievandRaphael Collet feecd15956 [FIX] web: speed up read_progress_bar
The method is used to get progress per column in kanban view
(green-yellow-red-red lines in Project, CRM etc).  There are two main
usages:

1. get statistics for ``kanban_state`` (red/green circles)
2. get statistics for ``activity_state`` (colored clock icon for overdue/today/planned)

Before this commit all cases were handled by calling search_read and then
counting records per group in a python script.  This is very inefficient,
especially for ``activity_state``.

This new implementation relies on ``read_group`` when possible, i.e.,
when both grouping fields (kanban column and progressbar field) are
stored (case 1).  It then falls back on a naive implementation inside
``_read_progress_bar``.  Cases like 2 above can be addressed by
overriding ``_read_progress_bar``.

We also added some minimal test to ensure that we don't break anything.

1. Performance test on 60 K project.task records (kanban_state):

With a filter for 6 records:

```
| measurement        | before | after |
|--------------------+--------+-------|
| number of queries  |      8 |     5 |
| query time, ms     |     11 |     7 |
| remaining time, ms |     21 |     9 |
```

All records:
```
| measurement        | before | after |
|--------------------+--------+-------|
| number of queries  |     67 |     5 |
| query time, ms     |    300 |    55 |
| remaining time, ms |   1780 |    12 |
```

---

opw-2346901
task-1915411

X-original-commit: 153621bdbab94a2a94a5bbfcabb4111cbc5970d8
Co-authored-by: Raphael Collet <rco@odoo.com>
2021-07-16 11:16:34 +00:00
Julien Banken ceb78ebf14 [IMP] mass_mailing: cosmetic changes on the tree view of the mass mailing model
PURPOSE

This commit aims to apply some cosmetic changes on the mass mailing
tree view to improve its usability.

SPECS

- New precedence order for the mass mailing views: With the kanban view,
mailings tend to pile up. When there are a lot of mailings, it can become
tricky to find a specific mailing given that the names of the mailing are
often generic and redondant (e.g. "Don't Miss Out", "Special Offer", ...)
For this reason, we will encourage people to use the list view by giving
the list view a higher precedence over the kanban view.
- Add progress bars for the delivered rate and the open rate (in the tree view).
- New column order for the tree view.
- Remove the unused and invisible field 'mailing_type' from the tree view.
- Set the fields 'mailing_model_id' and 'campaign_id' as optional.
- Minor decorator update.

LINKS

Task id: 2588188

closes odoo/odoo#73276

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-16 07:44:11 +00:00
Anjali b2aec0973c [IMP] event: add placeholder and 'daterange' in quick create kanban
This commit adds placeholder for the event name, and 'daterange' widget
on 'date_begin' and 'date_end' fields on the quick create kanban view
for the events.

TaskID-2584118

closes odoo/odoo#72906

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-16 10:53:48 +00:00
Tom De Caluwé 4c267aa9e6 [IMP] website_form_project: set user as task customer
When a task is created from the website form, if the user is logged in, add it
as the partner on the task.

task-2366706

closes odoo/odoo#71794

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-16 11:33:14 +00:00
Nicolas Bayet 6ab81fe053 [FIX] web_editor: paste multiline
Inserting text that contain multiline does not work.
One "\n" is removed.
Two "\n" become only one.

Task ID: 2602881

closes odoo/odoo#73835

X-original-commit: 89450137653526d9947bc21410cc4163e8b9b440
Signed-off-by: Antoine Guenet <Zinston@users.noreply.github.com>
2021-07-16 09:55:23 +00:00
Laurent Smet c369232454 [FIX] membership: Fix not determinist tests where SEPA is the first available payment method
closes odoo/odoo#73727

X-original-commit: 1c56d595537d375f406427aa580bd604ad0145b3
Related: odoo/enterprise#19659
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-14 14:18:15 +00:00
Odoo's Mergebot 3aeba91b93 [MERGE] lunch: Improve perf + general UX (back2basics)
closes odoo/odoo#73475

Taskid: 2586326
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-07-16 13:17:16 +02:00
Yannick Tivisse d7ddd5de53 [IMP] lunch: Store the lunch location on lunch orders 2021-07-16 12:02:56 +02:00
Yannick Tivisse fcc22bbabf [IMP] lunch: Add filters to allow composing a menu 2021-07-16 12:02:56 +02:00
Yannick Tivisse 0abdb3cf94 [IMP] lunch: Allow to reorder a previous order from "My Orders" 2021-07-16 12:02:56 +02:00
Yannick Tivisse 95ae10e8ef [IMP] lunch: Move extras from product category to lunch supplier 2021-07-16 12:02:56 +02:00
Yannick Tivisse 01ae6a69f2 [IMP] lunch: Improve general UX (back2basics)
TaskID: 2586326
2021-07-16 12:02:56 +02:00
Yannick Tivisse 6fd6034631 [IMP] lunch: Syncronize suppliers/products active value 2021-07-16 12:02:56 +02:00
Yannick Tivisse e7ef2dabbd [IMP] lunch: Improve error message 2021-07-16 12:02:56 +02:00
Yannick Tivisse 66876df938 [FIX] web: Pass session context to search panel
Purpose
=======

If the counters are enabled, this could lead to inconsistent counts,
as the session context (with allowed_company_ids) is not passed, and the
multi-company rules are not applied properly if we fall back on another
company that the ones on which the user is logged.
2021-07-16 12:02:56 +02:00
Yannick Tivisse cecd7a3448 [MOV] lunch: Split model files according to guidelines 2021-07-16 12:02:56 +02:00
Yannick Tivisse 7778031977 [IMP] lunch: Remove lunch.product.report model
The cross join with res.users caused dramatic performances issues.

TaskID: 2586326
2021-07-16 12:02:56 +02:00
Benjamin Frantzen (bfr) e9960ec275 [FIX] account_edi_ubl: convert narration to text before setting it in the xml.
closes odoo/odoo#73818

X-original-commit: 20490dc384310c1de4ec5fe02f90af030cc18ca7
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
2021-07-16 07:55:31 +00:00
Ajroo 3ee601e1eb [CLA] Sign CLA Ajroo - Kasper Declercq
closes odoo/odoo#73802

X-original-commit: 092c92631071aaf207e1756d258d2021fab0a0c8
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2021-07-15 17:49:12 +00:00
Nicolas Bayet a66e5c660d [FIX] web_editor: properly set the url for youtube embed
There was a typo setting the url of youtube when pasting
youtube url and trying to embed it.

closes odoo/odoo#73711

Signed-off-by: Antoine Guenet <Zinston@users.noreply.github.com>
2021-07-14 12:30:03 +00:00
Sébastien Theys 90869b7683 [IMP] web: allow extra class in legacy popover
Popover has some style by default (eg. padding), but it is not always desirable
(eg. if the content has a scrollbar, having padding to the right of the
scrollbar is not good).

-> Add a class to allow overriding the default style in the legacy popover.

closes odoo/odoo#73655

Note: the new popover already has this prop.
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-07-13 16:30:53 +00:00
Jacky (trj) d07cfad181 [FIX] point_of_sale: characters overlap in the receipt with html2canvas
Some characters were overlapped in the printed receipt or receipt sent by email because the library html2canvas doesn't handle well the css wrapping (e.g. in the German localization) by default.

closes odoo/odoo#73594

X-original-commit: debab4026f4f4bf380cba3bcb65c223cc4e1bbc9
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-07-12 16:44:34 +00:00
Thanh Dodeur 1ba76d21f3 [IMP] base: ensures that tests are not using demo data
Before this commit, some tests were indirectly using demo data.
For example `env['res.partner'].search([])` would return demo data in
addition to the partners created for the tests.

This commit changes that by ensuring that the records used are limited
to the records made for the tests. Some values have been adjusted to
account for the lower amount of available records.

closes odoo/odoo#72553

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-06-28 09:42:58 +00:00
Benjamin Frantzen (bfr) 5319b71b66 [IMP] account_edi: decouple attachment from the state of the edi_document.
Before this commit, for an EDI to be successfully posted, returning an attachment from 'post_invoice_edi' was required. In some cases this caused problem:
- When an EDI is posted in two steps, sometimes the attachment is generated in the first step and nothing is returned until the second step. This forced to do some hack where the reference to the attachment in a seperate field to be able to return it after the second step.
- When an EDI doesn't have a file to return (maybe we just send data over an API and get a response without any file involved).
Now, the attachment are removed from account_edi flows. When returning from 'post_invoice_edi', it is still possible to return an attachment whose reference will be kept in the edi_document, but will not change the state of the document to 'sent'.
To make the state change to 'sent', 'post_invoice_edi' must return {'success': True}.
Nothing has changed in the 'cancel' flow, meaning that the buttons related to canceling or reseting an invoice to draft are now based on the state and not on the existence of an attachment on the document. Also, when an invoice is successfully cancelled, the reference to the attachment is STILL removed from the document, since the document does not represent an electronic invoice anymore.

closes odoo/odoo#70040

Related: odoo/upgrade#1946
Related: odoo/enterprise#13220
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-16 09:08:55 +00:00
Benjamin Frantzen (bfr) e615d4ad8b [IMP] account_edi: added hook when retrying EDI & reword some text
In some cases, non-generic operation needs to be done when retrying to process and edi.document.

For example : for web-services with two steps, if there is an error we need to restart the two steps (and therefore reset the internal state of the edi to the first step, typically by deleting the transaction_id). In case of a warning, we want to retry the second step. This can only be done in the non-generic part of the code, so a hook is added in `account.move`.
2021-07-16 09:05:43 +00:00
Florent de Labarre 9e1e0ebb02 [FIX] core: better error message on wrong related path definitions
Before this commit, if a related field's path definition contained a
non-existing field (either because of a typo or field removal) the ORM
would simply send a generic Python KeyError that didn't really help in
debugging.

With this commit, we raise our own KeyError stating which related field
has the wrong path definition and exactly which field within the path is
incorrect.

See test for an example.

closes odoo/odoo#31889

Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
2021-07-16 10:17:30 +00:00
Samuel Degueldre eb70a581b9 [IMP] test_lint: add no-const-assign and no-debugger rules
Assigning to const variable is always a programming error, and we almost
never want to have a debugger in production code (for those cases, an
ignore comment can be added).

closes odoo/odoo#73821

Related: odoo/enterprise#19694
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-07-16 08:24:05 +00:00
Guillaume (guva) 738f48ba66 [FIX] Internationalization : missing terms for pos
The terms 'Set Customer' and 'Deselect Customer' was missing
in point_of_sale.pot

opw-2596436

closes odoo/odoo#73800

X-original-commit: 9e7253b620915c7773dabf705107418c61dac722
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: guva-odoo <guva-odoo@users.noreply.github.com>
2021-07-15 17:41:24 +00:00
Guillaume (guva) 7466779f2b [FIX] mrp: issue with products with variants
Step to follow

- Create a product with 2 variants and set route to Manufacture
- Create a BOM for the product
- Create an MO for one of the variants
- Save (in Draft State)
- Edit
- Change to the other variant
- Confirm
- Finish the MO Order
- Look at product moves on MO

Cause of the issue

In MrpProduction._onchange_move_finished method, self.move_finished_ids
was not empty before being assign.

Solution

Removed the records from self.move_finished_ids before
 assign another one to it.

opw-2572644

closes odoo/odoo#73563

X-original-commit: 5e34a02c3d897d888bf52b1977c25047326b76a8
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: guva-odoo <guva-odoo@users.noreply.github.com>
2021-07-16 07:44:28 +00:00
Yann Papouin 7aa19d908d [CLA] Corporate signature for DEC
closes odoo/odoo#73090

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-01 14:51:58 +00:00
aaj-odoo 0c6ce6cf44 [IMP] website_event_track_quiz: improve ux for quizzes on tracks
Right now, if we want to add a quiz to the event track, we need to
create it from the m2o field available in the form view. But it is
not very intuitive as user will have to select 'Create and Edit'
option from the m2o drop-down. Quick create is not really helpful
here. Also, trying to add question for the quiz will pile up the
modals which looks messy.

With this commit, in the event track's form view, we:

 - Remove the m2o for `quiz_id` (from the track form view, not from model)
 - Introduce "Add Quiz" header button, which redirects user to form view
   of the quiz, with no option to create new quiz directly as only one quiz
   should be linked to quiz. Also, once the quiz is added, this button will
   be hidden.
 - Introduce new stat button "Go to Quiz", which redirects user to the form
   view of quiz (again, does not allow creation from the same reason). This
   button is visible only if the quiz is already added for the track.

Apart from that,  re-arrage the quiz form view  `event_quiz_view_form` by
putting 'Event' and 'Event Track' fields on the same line, and we utilize
the same view while creating / updating quiz from the track.

Note:

Since the creation of quiz is now done in its own form view (with action button
"Add Quiz" from track's form view), we are passing the default `event_track_id`
while creating the quiz. It means that we don't need to compute it anymore.
Instead, now we need to compute the `quiz_id` on the track, based on the
`event_track_id` field alreay set on the quiz.

So, we introduce new One2Many `quiz_ids` field to compute the `quiz_id` on the
track, and we remove `event_track_ids` from the quiz. Basically, the logic of
setting `quiz_id` (on the track) and `event_track_id` (on the quiz) is inverted
with the commit, and the demo data is updated accordinlgy.

TaskID-2486552

closes odoo/odoo#70067

Related: odoo/upgrade#2522
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-24 04:34:39 +00:00
Adrien Widart fdd86433c6 [FIX] sale_stock_margin: convert purchase_price
When confirming a SO, if the costing method of a product's category is
not `Standard' and if the SO's currency is different from the company's
currency, the cost of the product won't be converted to the SO's
currency

To reproduce the error:
1. In Settings, enable:
    - Margins
    - Multi-Currencies
2. Create a product category PC:
    - Costing Method: FIFO
3. Create a product P:
    - Product Type: Storable
    - Product Category: PC
    - Sales Price: 200
    - Cost: 100
4. Update P's quantity to 1
5. Create a pricelist PL:
    - Currency: EUR
6. Create a SO:
    - Pricelist: PL
    - Order Lines:
        - 1 x P
7. Add field "Cost" to the tree view of the order lines
    - The value is correctly converted
8. Confirm the SO

Error: The cost of the order line is now 100€. This is actually the USD
cost, it should be converted

This code applies the same conversion as when the cost method is
standard:
https://github.com/odoo/odoo/blob/8a8ff03f6111f377bcd9c2b0f584c450b82a4182/addons/sale_margin/models/sale_order.py#L42-L48

OPW-2563442

closes odoo/odoo#73786

X-original-commit: 04e4cd91637c836b4d856b8638d88c5cf1770421
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-07-15 15:11:18 +00:00
Benjamin Frantzen (bfr) 6e04057401 [IMP] l10n_it_edi_sdicoop: normalize codice fiscale.
Codice Fiscale can be 16 length (letters + digits) for physical people.
Codice Fiscale can be 11 digits prefixed or not with 'IT' for companies.

An error is raised if the codice fiscale is not saved in the correct format. When registering to l10n_it_edi_proxy, we try to normalize the Codice Fiscale if possible.

Also, when entering the vat in the partner, the Codice Fiscale is automatically set normalized.

closes odoo/odoo#73774

X-original-commit: 3741e141e5a468b8ce0413f4f7d7fc05751b0c1b
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
2021-07-16 06:59:17 +00:00
Goffin Simon b36fef7185 [FIX] hr_expense: Wrong journal entries
Steps to reproduce the bug:

- Let's consider an expense E paid by the company
- Validate E and post journal entries

Bug:

Two journal entries were created:

1. Outstanding payments (debit) / Account Payable (credit) as draft
2. Expense (debit) / Outstanding payments (credit) as posted

With the this fix:

Only the second entry is created and posted

This reverts commit 25ac51e01a2084afd7a4d5e9c4c87a50ea787b93.

opw:2510663

closes odoo/odoo#73715

X-original-commit: 3add44d462deebb2b7600d0bd2d86a4af8b2ab4e
Signed-off-by: William André (wan) <wan@odoo.com>
2021-07-14 12:51:33 +00:00
snd cc67b5ac95 [FIX] account_edi: more global account.move lock
In some specific cases, a serialization error can happen on the account
move if it's not a move to cancel. If it happens, the full process
starts again for that move, which includes the requests sent to the
PAC in MX accounting.
It will send 2 CFDI files for the same invoices and the PAC will
interpret that as 2 different invoices, which is a problem.

This fix ensure that the concerned account moves are always locked
to avoid this kind of issue
opw-2489399
opw-2529134

closes odoo/odoo#73789

X-original-commit: bcc4934f80bea4ce70b9edfb22fd40030c5f0063
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-15 15:58:28 +00:00
Benjamin Frantzen (bfr) cf2d7fb1fb [IMP] l10n_nl: add Kvk and OIN to res.company form views
closes odoo/odoo#73615

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-13 09:42:19 +00:00
Anh Thao Pham (pta) 23ebf96cb6 [FIX] account: fix account resequence for "other" lines
Linked to commit https://github.com/odoo/odoo/commit/3e6b7dfd4854069724dde2df43ab2eb7d850e9b5

Resequence wizard will not show if "other" lines are generated to reduce the set
to display in preview, because those lines don't have "id" to be used as t-key in
the resequence template.

opw-2590273
opw-2581306

closes odoo/odoo#73811

X-original-commit: 70baff1aac1ab39c4e27f8078d404e8fdfa325db
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2021-07-15 23:58:36 +00:00
Jigar Vaghela 18a823e379 [FIX] l10n_in: HSN report not have right quantity and UOM
This is already there before refactoring in saas-12.4
you can check here https://github.com/odoo/odoo/blob/saas-12.3/addons/l10n_in/models/account_invoice.py\#L73

also add id in group by becouse if there is invoice line have same product,qty and uom then qty is wrong.

For example:
we have there is the same product with the same quantity and UOM like

```
 Product | quantity | UOM
 =========================
 Mobile  | 2        | Unit
 Mobile  | 2        | Unit
```
then tax line is not split so report count qty is 2

opw-2563120

closes odoo/odoo#73803

X-original-commit: 49e6bc9c499a511d479282dc67c1560e1c6bae5b
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: Jigar Vaghela <jva-odoo@users.noreply.github.com>
2021-07-15 17:49:42 +00:00
Jérôme Vanhaudenard f63fed5caf [FIX] point_of_sale: Don't reconcile already reconciled lines
At the closing of the POS, we try to reconcile
all lines involved in the closing.
If for any reason, a line is already reconciled
(I.E. Debit=0 and Credit=0 is considered as reconciled),
the closing fails because we cannot reconcile an already
reconciled line.

OPW-2602410

closes odoo/odoo#73783

X-original-commit: 4fd374b3f97eee1e706842ce1e28d0ad7a50315a
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-07-15 14:20:10 +00:00
Jeremy Kersten b290bceada [FIX] http_routing: is_frontend can be unset on request
AttributeError: 'HttpRequest' object has no attribute 'is_frontend'

e.g.: when we call request.redirect in ensure_db(), before that the _dispatch
method check if it is a is_frontend route or not.

closes odoo/odoo#73759

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-15 10:27:57 +00:00
Jeremy Kersten 3dd891ed6e [FIX] http, web: support type URL as location
Despite that Werkzeug documentation specify:
    'location (str) – the location the response should redirect to.'
Werkzeug support URL as location.

So now Odoo will support URL for request.redirect as argument too.

This commit closes #73729
2021-07-15 10:25:02 +00:00
Jeremy Kersten 4d3b29c7b7 [IMP] web, product: reintroduce _get_placeholder_filename on model
Re-introduce after discussion with AL the function that allow to specify
a custom placeholder for a specific model.

It has been removed because no more used since we use avatar mixin for
res.users and res.company. But it doesn't means that each model should add
his own mixin and controller and ... Keep it simple!

Use it for product and product template to have a default placeholder more
representative of the model.

Courtesy of xlu-odoo for this design

opw-2513801

closes odoo/odoo#73576

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-14 14:57:17 +00:00