Commit Graph
142515 Commits
Author SHA1 Message Date
Christophe Monniez 3a27ef6cbc [FIX] packaging: add num2words debian depends
The num2words Debian package exists in Debian Buster [0] and Ubuntu
Focal [1].

[0]: https://packages.debian.org/buster/python3-num2words
[1]: https://packages.ubuntu.com/focal/python3-num2words

closes odoo/odoo#70666

X-original-commit: f882512fea32784944ecccdd921c96576869b2e6
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-05-11 11:19:11 +00:00
nounoubensebia d4030ebd1a [IMP] mail: add retry button for multiple records
Add a retry button to enable the user to try and resend multiple emails at once,
purpose is to allow users to easily send back multiple emails which crashed for
a "one-shot" reason instead of asking them to resubmit them one by one.

Task-2492990

closes odoo/odoo#69880

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-11 10:39:42 +00:00
Sylvain LE GAL 90ddddbb87 [FIX] purchase: Bad colors in purchase.order tree view
- set correct decoration-info attribute on purchase.order tree view, replacing unexisting states ('wait','confirmed') by existing ones ('draft','sent')
- Move the decoration-info from tree line to name field to comply with the new display standards

closes odoo/odoo#70158

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-05-11 09:24:02 +00:00
Goffin Simon e5658ce529 [FIX] website_sale: Display discounted price with included tax
Steps to reproduce the bug:

- Let's consider a company in $
- Let's consider two sales taxes T1 (10% included) and T2 (0%)
- Define a fiscal position FP that maps T1 to T2
- Define a product P with T1, price = 11$ and available in the shop
- Define a pricelist PL in € such as 1€ = 2$, show discount to customer and discount P with 50%
- Define a portal user PU with FP and PL
- Log with PU
- Add P in the cart

Bug:

The unit price of P was 2,75€ instead of 2,5€ and the discounted price was 10€ instead of 5€

PS: Before adding P in the cart, the correct unit price and discounted price were displayed.

opw:2472528

closes odoo/odoo#69745

X-original-commit: 5e414d80dd5faf0b90d62dbccc1e6237099ac8db
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-04-27 10:58:15 +00:00
Thomas Beckers 9825bc7c3c [FIX] account_edi_facturx: avoid crash when no edi attachment
When we get the values to embed to pdf, these values can be False if
there is no edi attachment on the account_move so try to assign something
to 'values' will fail.

Now there is a check before assignment.

opw-2526280

closes odoo/odoo#70629

X-original-commit: e1659f8a9041d409d0d303a7c12342b2e73675c7
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-05-10 17:22:11 +00:00
Jérémy Hennecart dd98184c43 [IMP] website_slides: remove the automatic creation of link trackers
Before, each time the name of a slide was modified then a new link
tracker was created.

After discussion, we agreed to remove the automatic creation of link
tracker and let the user creates it manually if he really wants one.

The slides already have a lot of statistics that can be used without
the need of a link tracker.

task-2511961

closes odoo/odoo#69734

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-23 09:50:43 +00:00
Swapnesh 73c7db557b [IMP] stock: allow to customize picking values
Before this commit, It was not possible to customize Picking values.

With this commit, we add a new method which Prepares to Picking values.

closes odoo/odoo#70494

Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-05-10 16:00:55 +00:00
std-odoo 6f71999253 [FIX] website_event_track: fix new track notifications by email
Bug
===
1. Create an event which allows track proposal
2. Follow it and subscribe to "New Track"
3. Log in in incognito and submit a proposal

The email is not sent, because it's sent as the public user, which has
no email address set. And so it the 2 system parameters
<mail.catchall.domain> and <mail.default.from> are not set, we can not
know which email address used to send the email.

Note that this bug also occurs if you create a track with a user without
an email address set.

Task 2510181

closes odoo/odoo#70627

X-original-commit: 45ffab08a7c1dacc70d331077198f92884b53646
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-10 16:34:01 +00:00
Barad Mahendra 2b55c4f951 [IMP] base,sale_(project): generic improvements for project
Currently, empty help content are not properly added so in this
task add the proper help content on several menu and add module
field service in community.

So in this commit done the below changes:
 - Task form view: change the tooltip of the sale_line_id field
 - Change the empty help content in below menu:
   - reporting > tasks analysis
   - Configuration > Stages
   - Project > Reporting > Project Costs and Revenues
 - base: The industry_fsm module should show up under Apps in community,
with the usual 'upgrade' button

closes odoo/odoo#68940

Taskid: 2465012
Related: odoo/upgrade#2369
Related: odoo/enterprise#17548
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-05-05 06:21:31 +00:00
std-odoo 883f0a3b85 [FIX] event: the registration user should have access to the tickets
Bug
===
The registration users should be able to read the event tickets.

Allow the registration users to see unpublished event record on website
(Jitsi room, sponsors, track...).

Task 2506148

closes odoo/odoo#70615

X-original-commit: 3eef17203661919a067a4f0d8d99c2b3b6fcf233
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-10 14:24:29 +00:00
Rémy Voet (ryv) b23edf5db2 [FIX] mrp: fix multi plan MO
The button plan of in the manufacturing order tree view doesn't
confirm correctly the draft MO selected (but only the related moves).

task-2479111

closes odoo/odoo#70608

X-original-commit: ef9515611ac96368eae14fc941bca15e3724557a
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-05-10 13:29:20 +00:00
mreficent 6c0edacc6e [FIX] stock,mrp: don't unarchive operations from archived warehouses
If you modify an archived warehouse, it may happen that the associated operations get unarchived. Operations should be active only if their warehouse is active.

closes odoo/odoo#70607

X-original-commit: 63167ac8ae6ac08fa54a133ed9089dd872c7d73c
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-05-10 13:21:42 +00:00
Romain Derie 89abece02d [REM] website: remove leftover code of new editor changes
XML call to this JS part was removed with https://github.com/odoo/odoo/commit/740168ce8d27da3d6a7156d2d79655a898394923#diff-9f41c68ba854940dda3361dc32795e2d7e9fc5b83ef7f8afd35a455b493e9930L441
But the JS was not removed.

task-2502679

closes odoo/odoo#70600

X-original-commit: 31e192a441aa3eac0b2d023d4f7d036a1c3dfeec
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2021-05-10 12:29:22 +00:00
Carlos Valverde 1ef4567da4 [FIX] website_event: social icons alignment fix
A revamp of the scss of 's_share' in '14.0' has caused an issue with the
class '.o_wevent_social_link' of 'website_event', making a wrong
alignment of the social media icons used in this module, especially in
'event_templates_page_registration'.

For this reason, this commit fixes this issue by setting the display of
the '.o_wevent_social_link' class as an 'inline-flex', vertically and
horizontally centered.

--

task-2508497

closes odoo/odoo#70593

X-original-commit: 13b1412b57ba70421cc3c879636585a971f33c55
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-05-10 11:09:37 +00:00
guimarc-br c328957c17 Adding the CLA Signature
closes odoo/odoo#70552

X-original-commit: 44e05cd802593f6d18dcdec41fe821e30d7ae893
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-05-07 15:13:07 +00:00
guimarc-br c9ef520bc2 [FIX] stock: add location_out_id field domain into the Putaway Rules menu
[REF] models: use stock to implement location_out_id into the Putway Rules Menu

Description of the issue/feature this PR addresses:

On the Location/Location-ID/PutwayRule we have the fields:

location_in_id = When Product Arrives

locatio_out_id = Store To

As the products arrives in the WH/STOCK location and due the putaway rules goes to other location then we have the fields populated like:

location_in_id = WH/Stock

location_out_id = location opened in the view.

Due this domain setup the list is returning empty, and then the solution that I applied is to check if we have the location selected in the location_in_id or location_out_id and show the entries.

Current behavior before PR:

Only looking for the from into the location_in_id

After PR merged :

Looking for the values from the location_in_id or location_out_id.

--

TaskID: N/A
Fixes : PR 67198
Closes : PR 67198

I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

X-original-commit: cd7133f0c8050398fdf5aa28f8a67a7507245c7b
2021-05-07 15:13:05 +00:00
Thibault Francois 3f232cb6e9 [FIX] event_crm: fix False - False lead creation
Use Case
--------
Have two (or more) rules with mutually exclusive domain for that can be
apply on the same event with lead_creation_basis = order

Create a registration that match one of the rule

Problem
-------
The lead for this rule is created properly but there is also
another lead with the name False - False that is created for the second
rule for which the registration does not match the filter

Solution
--------

Create a lead only when there is a non empty record set in the
registration group

closes odoo/odoo#70590

X-original-commit: 43fc8dac5e21a9aecf7b2950a6c3c77d8142ee45
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-10 10:37:40 +00:00
Victor Feyens 20c510e354 [FIX] sale_timesheet: remove dead code
Introduced with
https://github.com/odoo/odoo/commit/009bcc59febb2aefec6ffde3427b01cb08d1b9db#diff-01680392de45e95bdb6995b7594cb37f94684bff0caebfe0a058ca65b7604bccR62
The template code has been removed in
https://github.com/odoo/odoo/commit/2d565e859af5bc23fae4268faae0a4f509bcca8b#

Furthermore, the base method was removed during
https://github.com/odoo/odoo/commit/573ed74c121c1572b3fab6f9553ed7f93f7b3f99#diff-1c3a19ae29764ce81fb0785553c9efb50277e8ec1dbe4535d6e542edecdfba3eL36

Since the feature was removed and the code is dead, it can be safely
removed.

closes odoo/odoo#70581

X-original-commit: afa1825db1b1511e91e693a0429f391d50d7f8b7
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-05-10 08:37:37 +00:00
std-odoo ade7b359d8 [FIX] portal: fix ACL issue during the revocation of the portal group
Bug
===
1. Login as Demo user (no admin access right)
2. Grant the portal access to a partner
3. Revoke the access

An access error is raised.

Task 2501250

closes odoo/odoo#70554

X-original-commit: bc7f8733561992e3b240f34c0cbd17a0cb76d3cd
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-07 15:30:50 +00:00
Munaf Khan c94e187cbe [IMP]partner_autocomplete: company name field length
Currently, in the res.company form view, name field
is extremely short.and in mobile view name field
is hidden by other element because of placeholder
is too long.

after this commit the length of name field is should
be as long as the res.partner one and change the
placeholder (e.g. My Company) instead of (e.g. My Awesome
Company) for idle mobile look.

closes odoo/odoo#70241

Taskid: 2520268
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-10 10:22:40 +00:00
dht-odoo 12469ef4d3 [IMP] various: improve the sequence of menu items
- Currently all menus are out of order in app switcher.
- For example, Sales app is 16 menu away from Accounting,
  Social Marketing app is 25 menu away from Email Marketing, etc.
  So, all menus should be reordered.

- This commit will reorder the menus of the app switcher in order to reduce
  the distance between correlated applications,
  and bring the most common apps upward.
- And in this commit we have left gap of 5 subsequent sequence for further new menus.

PR: #69984
TASK ID: 2513082

Related: odoo/enterprise#17989
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-07 05:54:18 +00:00
Laurent Smet 8382f192a2 [FIX] sale: Fix fiscal pos. mapping taxes to price included
Using a fiscal position to map a tax to a price-included tax doesn't work.

closes odoo/odoo#70565

X-original-commit: a6fe2de9b9879d918f0315982b51fba345a2addd
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-05-07 17:27:38 +00:00
fw-bot 84fb0987f2 [FIX] stock, purchase: performance in Replenishement report
Forward port of #70351

closes odoo/odoo#70557

Related: odoo/enterprise#18215
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-05-10 08:54:32 +00:00
Romain Derie 0381ca4c7f [FIX] website: fix race condition on link popover tour
Attempt to fix race condition:
> Tour edit_link_popover failed at step Change the URL
  (trigger: #o_link_dialog_url_input)

According to the runbot build screenshot from the error [1], when clicking on
the navbar `Home` menu, the previously deleted link on the `<p/>` is not really
deleted.

According to the runbot logs, some extra calls are done to `/`, probably coming
from extra preview calls.
It might be coming from the fact we click on the link itself to exit the right
panel URL edition.

This commit click on a non-link element to exit the right panel URL edition,
avoiding to show a popover for nothing.

[1] See the image on pull request

closes odoo/odoo#70487

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-05-06 15:24:29 +00:00
Anjali 124ccac937 [FIX] mrp_subcontracting: added a missing separator in filter
Before this commit:
 There is no separator between "Subcontractors" and "Archived" in the filters of
'contacts' module, So on clicking on both filters thus executes a "OR" search,
which is incorrect.

After this commit:
 We have added a separator so that the search becomes
 "Subcontractors" AND "Archived"

Task-id:2524695

closes odoo/odoo#70464

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-07 11:29:58 +00:00
nounoubensebia 691838f308 [IMP] mail: improve external server wording
improve external server wording in settings by:

- adding a @ to the domain so that users won't add it themselves
- removing the .odoo since it's an external server domain
- making Alias Domain not take more then a single line

Task-2507856

closes odoo/odoo#69369

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-07 14:04:30 +00:00
Andrea Grazioso (agr-odoo) 34b7870f21 [FIX] repair: correctly group invoices
Have 2 repair records with the same partner_id, ready to be invoiced
In list view select both records and click Action>Create invoices
In the wizard check 'Group by partner invoice address', create invoices.

Separate invoices will be created, but while grouping 1 invoice should
be created joining the 2 repairs

opw-2476539

closes odoo/odoo#70434

X-original-commit: 8f6e2fa1096f57ace6c84ae6083ab77ee37a69a1
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-05-05 16:40:32 +00:00
Swapnesh Shah acb9e5fe49 [FIX] mrp: do now allow to select cancelled mo
Before this commit, User can select Cancelled MO before selecting Product.
but it is already blocking since we already have constrains to not allow ubnuilding
Cancelled MO.

With this commit, We are always showing Done MO.

closes odoo/odoo#70316

X-original-commit: 48c0efcc97e35e00ec5803235a89a2c18e821990
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-05-04 10:31:16 +00:00
Martin Trigaux bb96addbed [FIX] transifex: escape ' in urls
Translation "Let's go"
Makes a Transifex search text:'Let\'s go'
That should be converted to q=text%3A'Let%5C%27s+go' in the URL

Removing the ' works from time to time but not always

closes odoo/odoo#70561

X-original-commit: 5f6d6cf1b4c76a2f0031c269501054e816c65e97
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-05-07 16:33:26 +00:00
Valentino 958e6fdcc2 [IMP] l10n_ar: Update eCommerce module displayed name
Feedback received: change the name from 'Argentinean Website' to 'Argentinean eCommerce'  in order to stay consistent with the functional name of stadand Apps

closes odoo/odoo#70361

X-original-commit: 7afb8e3193615d54f9e1b40a453eaf7f6c456dad
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-05-04 17:50:41 +00:00
Lucas Perais (lpe) f576c96a88 [FIX] web: route /web/session/modules returns a list
Since the changing of assets (8cc066173d)
the /web/session/modules route returned a stringified set instead of a list

After this commit, the route returns a list

closes odoo/odoo#70545

X-original-commit: 54e4a48996826dd8ea16a84517b46a847d6daf3f
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-05-07 14:31:02 +00:00
Laurent Smet 5c1f28cce4 [FIX] account: Fix dashboard 'Oustanding' amounts with shared outstanding accounts
- Share outstanding accounts between multiple journals
- Create payment for each of them
- Go to dashboard
=> "Outstanding Payments/Receipts" amounts are wrong

closes odoo/odoo#70564

Ticket: 2517499
X-original-commit: 39fb6b2990e5d6fda0d5f12dbd64d26ef77b9d0c
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-05-07 17:06:02 +00:00
Achraf (abz) 4d4557b596 [FIX] account: Prevent user to change product via journal items after posting
What are the steps to reproduce your issue ?

    1. Go to Account/Journal Items
    2. Open a posted item
    3. Change product

What is currently happening ?

    The product is changed in the account move

What are you expecting to happen ?

    The account move lines cannot be changed when the status is posted

How to fix the bug ?

    Make the field read-only when the status is posted

opw-2517325

closes odoo/odoo#70533

X-original-commit: 1b8f7ad00e9274b4b8f82ef77864997286611593
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-05-07 11:59:20 +00:00
Ivan Yelizariev 5889baa345 [FIX] sale: fix search "invoices is not set" for sale.order
BEFORE this commit query "invoices is not set" was tranformed to
query "order_line.invoice_lines.invoice_id is False", which doesn't make sense,
because invoice_id is required fields and hence always set. Hence, result of
the query was always empty.

AFTER: just check that there is no invoice_lines. Strictly speacking, is not the
same as checking result of compute method, but because invoice_lines are
supposed to be lines for invoices of out_* type, the result should be the same.

---

opw-2516124

closes odoo/odoo#70526

X-original-commit: 4ed6527cb414ee11d9bfac43a78dcc68ce233d07
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2021-05-07 10:38:19 +00:00
Odoo's Mergebot 1ea99712f2 [REF] web,*: hide buttons that doesn't work in webviews
Some features of the PDF.js library doesn't work in the
webview of the mobile apps.

Initially 'window.print' is defined as an empty function in
webviews unlike browsers where it is already ready.
After that, PDF.js needs to monkey patch 'window.print' and
saves a reference to the original definition, which is not
yet fulfilled in by the mobile app (Java part).
So the print of PDF.js doesn't work in webviews and end
users will need to download the file before printing it.

Regarding the Download button, the 'download' attribute is
not supported by the webview as you can see in:
https://bugs.chromium.org/p/chromium/issues/detail?id=432414
As there's many ways to download a file in Odoo it's not
a big deal to simply hide it in PDF.js.

Because it's quite complicated to fix this, we decided
to hide the features that don't work (Download / Print)
or don't make sense (Open file).

Task-id: 2200168

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#70375

Related: odoo/enterprise#18134
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2021-05-07 14:01:44 +02:00
Romeo Fragomeli 8a755d5833 [REF] web,*: hide buttons that doesn't work in webviews
Some features of the PDF.js library doesn't work in the
webview of the mobile apps.

Initially 'window.print' is defined as an empty function in
webviews unlike browsers where it is already ready.
After that, PDF.js needs to monkey patch 'window.print' and
saves a reference to the original definition, which is not
yet fulfilled in by the mobile app (Java part).
So the print of PDF.js doesn't work in webviews and end
users will need to download the file before printing it.

Regarding the Download button, the 'download' attribute is
not supported by the webview as you can see in:
https://bugs.chromium.org/p/chromium/issues/detail?id=432414
As there's many ways to download a file in Odoo it's not
a big deal to simply hide it in PDF.js.

Because it's quite complicated to fix this, we decided
to hide the features that don't work (Download / Print)
or don't make sense (Open file).

Task-id: 2200168
2021-05-07 11:01:27 +00:00
Thibault Delavallée d978b9e1c0 [IMP] various: update query counters according to latest runbot run
Base: seems related fields take only 1 extra query instead of 3

Crm: assignment seems to have been slightly improved. Some randomness still
happens.

Hr Holidays: seems it was further improved beyond space frontier

Hr Work Entry Holidays: seems it was further improved

Test mail: those tests were a bit random, seems random is gone (hopefully)

Test mail full: updated local counters

Test mass mailing: seems we gained one query, updated local counters

closes odoo/odoo#70504

X-original-commit: 8c215b3d60929166b3e60e2a4dfb2a6c70439046
Related: odoo/enterprise#18194
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-07 08:18:04 +00:00
Swapnesh d7f24257b3 [FIX] mrp: display correct uom on by products
Before this commit, It was always showing all
Unit of Measures in By Product lines.

With this commit, We are showing UoMs based on Category
of Selected Product's UoM.

closes odoo/odoo#70367

Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-05-06 16:52:25 +00:00
abd-msyukyu-odoo a03c882a56 [FIX] web: fix kanban view progressbars related to records in another group (groupby:week)
* IMPACTED VERSIONS

  12.0+

* HOW TO REPRODUCE

locale :  Locale is en_US (or other SUNDAY based)
view:     CRM - My Pipeline - Kanban view
groupBy:  date_deadline:week (Expected closing)
records:  one record with a planned activity, on date_deadline = 2021-05-02 (SUNDAY)
          one record with no planned activity, on date_deadline = 2021-05-09 (SUNDAY)
remark:   don't keep any other record in MAY for better visibility

* PROBLEM

The progressbar of the week containing 2021-05-09 displays information about the record
from the week containing 2021-05-02

* CAUSE

1. PostgreSQL `date_trunc` function follows ISO8601 which essentially means that
  the start of a WEEK is always MONDAY. There is no argument to change this.

2. _read_group_format_result
  https://github.com/odoo/odoo/blob/27da86a138089c1838e4b94f8a6976995b9c1fff/odoo/models.py#L2210-L2219

  - Computes a label for a group of records.
  - Follows the locale for the label of the week, based on a date which is
    always a MONDAY because of `date_trunc`.

3. read_progress_bar
  https://github.com/odoo/odoo/blob/88957afca09662af7eaa19df1e40b3699e45e79e/addons/web/models/models.py#L167-L175

  - Associates a group label to a record.
  - Follows the locale for the label of the week, based on the date of a record
    which can be any day of the week. If the record is related to a SUNDAY and
    SUNDAY is the first day of the week, it would have been in a group with a
    different label in (2.) than in (3.) prior to this change.

* FIX

In 3., before associating a label to a record, we truncate the date to the
ISO start of the period, so that the label is determined for a record in the
same conditions than in 2. The locale is still used to get language-dependent
outputs with babel, but the grouping will always follows ISO8601 (date_trunc).

* TEST

Added a test for this problem case

TASK-ID : 2517848

closes odoo/odoo#70498

X-original-commit: 4560925b26fa79740b9618fd9241d3517b64f43f
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-06 17:56:20 +00:00
Xavier Morel 79a4d11e24 [FIX] *: bunch of mismarked translation specifiers
`_(xyz)` will wrap them in an underscore.js object, which when used in
a string context will just return the string. So it's basically a
no-op, but it certainly doesn't translate the terms.

closes odoo/odoo#70476

X-original-commit: 92352ed2b5524c97b0aeeba3193c6a8d93ed82a1
Related: odoo/enterprise#18172
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-05-06 12:06:22 +00:00
yhu-odoo edc372a04e [IMP] (sale_)stock, product: route for packaging
Route is now can be set to apply on packagings. Bravo!

Task-2357259
PR #68654

Related: odoo/upgrade#2444
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-05-06 13:36:34 +00:00
yhu-odoo 02bffa5f40 [IMP] stock: smart putaway for packaging
Apply smart putaway rules on move with packaging.

Task-2357259
PR #68654
2021-05-06 13:36:34 +00:00
yhu-odoo 688d655305 [IMP] {purchase, sale}_stock, product: packaging revamp
1. add packaging to PO lines
2. packaging on PO/SO lines can be propagate to MO
3. add package type to packaging
4. on picking types, we can choose to only reserve full packaging. That
means if you want 1 pallet(100 units) and you have 50 units in stock. It
won't be reserved.
5. suggest suitable packaging for PO/SO/MO line according to the product
qty

Task-2357259
PR #68654
UPG PR odoo/upgrade#2444
2021-05-06 13:36:28 +00:00
Romeo Fragomeli c1c225eff2 [IMP] web: add the detection of iPadOS
Before this commit, the iPad with iPadOS was not detected as
'isMobileDevice'.

Now the detection is more accurate.
2021-05-05 10:20:06 +00:00
Romeo Fragomeli e7d6a68a56 [REV][FIX] web: pdfjs: hide buttons that doesn't work in webviews
The commit odoo/odoo@7a40d528 is reverted as the following commit
will do same behaviour without "Monkey Patching" the lib PDF.js
2021-05-05 10:20:06 +00:00
yhu-odoo bf26c3c221 [FIX] stock: cleanup picking state
Cleanup unused "none" and "partailly_available" state for stock.picking.

Task-2357259
PR #68654
2021-05-04 15:05:52 +00:00
Nicolas Seinlet acf306e4fb [IMP] gamification: skip useless computations
- use real join
- skip useless join on res_users and gamification_challenge
- skip null end_date criteria to compute less reached goal

closes odoo/odoo#70503

X-original-commit: 091d20d314f8301f0cbec292ec7b6fca906fd39e
Signed-off-by: Christophe Simonis <chs@odoo.com>
2021-05-06 17:53:38 +00:00
oco-odoo 995f6fbb86 [FIX] account: reconciliation models: fix priorities when matching amls from payments
Since the payment refactoring, the structured reference of a payment is stored in its ref field, not payment_reference like for invoices. This caused payments never to be matched with highest priorities, as payment_reference_flag was always false, and only communication_flag could match.

To reproduce:

- Have a reconcile model with match_total_amount=False.
- Create a statement line with communication a1b2c3 for 1000
- Create 3 payments:
> 500, with memo a1b2c3
> 500, with memo a1b2c3 (so, the same one)
> 500, with memo d1e2f3
- Open the reconciliation widget for your statement line

===> The 3 payments are matched, while only the two first ones should have been, as they were exact matches for the communication, and should hence have received higher priority.

closes odoo/odoo#70394

X-original-commit: b5800c9d2088df2bb9c4fbe0fed91c7ef24299c5
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-05-06 15:17:32 +00:00
oco-odoo 255c63ff26 [FIX] account: cash basis taxes: generate correct exchange difference when using the same cash basis taxes on multiple lines
To reproduce the bug:
1) Create a cash basis tax for 42%
2) Make an invoice with two lines at 100$, each using this tax
3) Post and register full payment of the invoice

==> An exchange difference has been generated, doing +100 -100. One of its two line has tax_ids set, while the other does not. This makes the base amount shown in the generic tax report wrong: 100 instead of 200.

Actually, this exchange difference entry shouldn't have existed in the first place, as there is no rounding issue to compensate for here. It happens because the grouping keys computed for the two base lines are the same, and the second line overwrites the totals of the first one instead of adding them to its own.

closes odoo/odoo#70283

X-original-commit: 60770f0b99bedd3dcb695e2191dc83c45ef0b594
Related: odoo/enterprise#18107
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-05-06 15:10:28 +00:00
Swapnesh Shah 15e66f98f5 [FIX] stock: disable links on forecasted inventory report
Disable the link on the forecasted inventory report  graph view, as it leads us to a undesired list view with traceback on opening it.

closes odoo/odoo#70488

X-original-commit: 64afb484b9785a4d739fef1207405a502d668ab8
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-05-06 14:27:55 +00:00