Commit Graph
150453 Commits
Author SHA1 Message Date
Pouya Malekinejad 4cc4037726 [FIX] account: Tax grids stay when removing a tax from invoice line
Currently, when the user removes a tax from an invoice line (tax_ids), the tax grid stays on the account move lines,
after this commit, when the tax is deleted in invoice line, the related tax_tags are removed from `aml.tax_tag_ids` which is the correct behavior

task ID:2843666

closes odoo/odoo#90950

Pr: #90836
X-original-commit: 27b3d3412b347ef7fb62626d5087eaf34621395a
Signed-off-by: Laurent Smet <las@odoo.com>
2022-05-11 11:28:55 +02:00
nni-odoo adccedb3dc [IMP] l10n_id_efaktur
Improved e-faktur document to adapt to the most recent requirements from partners and end users.
Changes include:
- Remove writing the row for "FAPR"
- Remove unused section (components that make up the "FAPR" line)

2783987

closes odoo/odoo#91013

X-original-commit: ee7a8ce740d1ec1ce6bdc0e992b8fee4fa975bdb
Signed-off-by: Florian Gilbert <flg@odoo.com>
2022-05-11 09:22:04 +02:00
nni-odoo 7b1e2014d6 [IMP] l10n_id
Improvement on Indonesian Localization. Changes include:
- Reducing the amount of Chart of Account to only essential and popular ones amongst end users.
- Updating the taxes to refer to the newly updated Chart of Accounts.

2783987

X-original-commit: 5af469755e2669483ab8d81564627da58218ec6b
Part-of: odoo/odoo#91013
2022-05-11 09:22:04 +02:00
Stanislas Gueniffey ac175c98e1 [IMP] define xml_utils.cleanup_xml_node
Intended to cleanup qweb xmls:
- remove blank (empty) nodes and/or nodes with whitespace text
- fix indentation
- remove indentation (needed for some xml signatures)

closes odoo/odoo#91006

X-original-commit: b7d7adb4f5a9873350511c227d5fbf54c8f38ce8
Signed-off-by: William André (wan) <wan@odoo.com>
2022-05-11 09:21:59 +02:00
Krzysztof Magusiak 2490982fce [FIX] sale_project: Expecting an ID in write for Many2One
When we are writing on a Many2One field, we are supposed to pass the id
of the object, in this case we are passing directly the object which is
working with the ORM, but is not expected in overrides as the
documentation suppose that an int is passed.

community PR refused in stable:https://github.com/odoo/odoo/pull/88736

closes odoo/odoo#90992

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-11 09:21:55 +02:00
Alexandre Kühn 7394650865 [FIX] mail: fix typo onMobileAddItemHeaderInputSource
The method was moved in models but we forgot to remove the prefix
`_`, as it's now a public method. As a result, the feature was
not working.

closes odoo/odoo#90991

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-11 09:21:51 +02:00
Brieuc-brd 6606f8fc1f [REF] mail: MessageSeenIndicator, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2835895

closes odoo/odoo#90002

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-11 09:21:39 +02:00
Camille Spiritus e720cfe901 [IMP][l10n_ch] account: allow for QR bills to be printed in batch
The only option to print a QR Invoice was to go on the invoice page and to click on the Print QR Button.

This PR allows for a user to print multiple QR codes, selected from the Invoices view.
The download occurs normally if all invoices are valid and QR-printable.
A wizard opens when the whole invoice selection isn't valid. It allows to download the invoices as a single pdf or to see a list of the ones that could not be printed in the QR format.
The wizard's text depends on the number of QR-valid, ISR-valid and classic (non QR, non ISR) invoices that the user tried to print.

All invoices for which a print is asked will be printed with a QR bill if it is possible. If not, this will check if printing in the ISR format is possible. Lastly, if none is possible, the classic invoice will be printed.
The behaviour allowed for the removal of the QR PRINT and ISR PRINT buttons on the single invoice view, for a behaviour closer to the original guidelines.

Bills can't be QR printed.

Corrected QR-Bill CSS.

task-2726507

closes odoo/odoo#82341

Signed-off-by: Laurent Smet <las@odoo.com>
2022-05-10 16:23:44 +02:00
Yannick Tivisse 1a71354b41 [FIX] rating: Avoid searching ratings in for loop
From 40 ms to 0.3 ms
From 1440 to 1341 request when crating 100 SO

Before this commit, the res_id field of the rating mixin was a simple integer.
It worked but the cache of the rated record was not be updated when new rating
were created.

This commit change it to a Many2oneReference to improve this behavior.

closes odoo/odoo#90968

X-original-commit: 1a6dd617a3c3be106e6fc7f1924243bca368edf7
Related: odoo/enterprise#27143
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-05-10 15:16:51 +02:00
Arnaud Joset ffd0e24a95 [IMP] test_mail_rating: Add performance tests
X-original-commit: 2b3b679a843f516cc8e767e46cb48fea3088682a
Part-of: odoo/odoo#90968
2022-05-10 15:16:50 +02:00
Yannick Tivisse 27e17cad1a [FIX] sale: Use orm-cached _xmlid_to_res_id instead of ref
X-original-commit: 1a9133dcdd6a25e29b00eae3e4478801b3d9efca
Part-of: odoo/odoo#90968
2022-05-10 15:16:50 +02:00
xO-Tx f0fe283c76 [FIX] web_editor, *: fix image options visibility
*: website

Issue: from 15.0 onwards all image options are available on "/shop".

Details:

On 14.0, images options were removed for unsupported images (we had
a message "Quality Options Unavailable" - see [1]) and images related
options on old editor toolbar were hidden too.

On 14.4 and after [2], images options from the toolbar (crop, width,...)
were moved to a separate 'ImageTools' option and as a consequence, they
don't respect the same visibility rules as 'ImageOptimize'. Other
options were added in XML and they have the same issue, they are visible
as long as the target is an 'img'.

This is a list of options that should be available for unsupported or
partly supported images:

[A] For "t-field" images (shape & quality options are available only if
the image is supported for processing):

- Shape
- Filter
- Width (image width)
- Quality
- Transform (crop)

[B] For external images or images unsupported for processing:

- Description
- Tooltip
- Transform (crop, transform)
- width (CSS width)
- Alignment
- Style
- Padding
- Animate

[C] For illustrations:

- Same as [B]
- Dynamic colors

The goal of this commit is to fix this visibility issue on the JS code
of image options.

[1]: https://github.com/odoo/odoo/commit/84417a174bc2bb76730cc89783d3426a3a3b07d9
[2]: https://github.com/odoo/odoo/commit/d934b81aaae8d68b5579d1489b1fbe8ea347b4ed

task-2724946

closes odoo/odoo#90224

closes odoo/odoo#90832

X-original-commit: 8e6ca51ed3ebf121acfc7cb1ab992984d0764c90
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-05-10 15:16:44 +02:00
qsm-odooandxO-Tx b17a30f2d9 [FIX] website: hide the "animation launch" option for imgs in dropdowns
Since [1], that feature was lost because a `_computeWidgetVisibility`
was duplicated inside of the same class. The feature is now restored,
indeed the option does not make sense as animations will always launch
on every dropdown openings no matter the configuration.

[1]: https://github.com/odoo/odoo/commit/187acb938f70a2130d25fa76079221339c742f1e

X-original-commit: bde55751608b1679bd6599238a4da6279b8f74fa
Part-of: odoo/odoo#90832
Co-authored-by: xO-Tx <mou@odoo.com>
2022-05-10 15:16:44 +02:00
Merlin (megu) 339cdffb68 [FIX] account: use company name or id as suffix for journal alias name
Loading the demo data of Accounting app when only Japanese language is
installed will raise an error because there is a non-unique alias_name

Steps to reproduce:
1. - Run odoo with parameters `-d [db_name] --without-demo all
--load-language ja_JP -i l10n_jp,account_accountant` (you can also
install those apps using the UI but only Japanese should be installed
so it will be in Japanese)
   - Or create a trial database on odoo.com with Accounting installed,
using Japan as country and Japanese as language
2. Activate debug mode and go to Settings, scroll to the bottom and load
the demo data (`デモデータをロード`, last link in 'Developer Tools')
3. A validation error is thrown

Solution:
When building the alias name, if the name of the journal is not in
ascii, use the journal's code or type followed by the company's name. If
the company's name is not ascii, use the company id as suffix

Problem:
When a journal with non-ascii characters in its name is created, its
alias name fallbacks to the journal's code. In the demo data, two
journals have the same code. It will try to create the second journal
with the same alias name, violating the unicity check in
`_clean_and_check_unique`.

opw-2831638

closes odoo/odoo#90969

X-original-commit: 91d26b32250a74684dacad8350ac4452fa082384
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2022-05-10 14:16:59 +02:00
Alexandre Kühn 44dcd64aa9 [IMP] mail: introduce MessageView/clockWatcher
Task-2831082

closes odoo/odoo#90957

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-10 14:16:55 +02:00
Philippe Wauthy c6c60fe6dc [IMP] hr_holidays: relabel kind of time off
The field "Kind of leave" was a bit confusing, here we re-word the
labels to make clearer what is its purpose.

closes odoo/odoo#90942

Taskid: 2693319
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-05-10 14:16:51 +02:00
Ivan Yelizariev 5bf898d58a [FIX] core: use non-breaking space for currency symbol
In some languages and layout the currency symbol might be wrapped in a separate
line, which is not acceptable from accounting point of view. Fix it by replacing
space with a special symbol.

STEPS for v15:
* install MX localization;
* create a Spanish speaking customer
* generate a pdf:
1) Create quotation with products
2) Add IVA 16%tax
3) print a report

BEFORE: the currency symbol is incorrectly displayed on a separate line
AFTER:  currency symbol is always with the amount

---

https://github.com/odoo/odoo/pull/89722
opw-2829138

closes odoo/odoo#90961

X-original-commit: 684687226b87022bc9f9ba7667b295e545100645
Related: odoo/enterprise#27138
Signed-off-by: William André (wan) <wan@odoo.com>
2022-05-10 13:22:42 +02:00
Xavier Bol (xbo) 33a49d2bd8 [FIX] project: prevent creation of private tasks for others
Before this commit, the current user can create a private task for
another user.

This commit fixes the access rights to avoid the user to create private
tasks for another user.

closes odoo/odoo#90938

X-original-commit: 106826b1ffcd9a18ce5d4674c526bce4f2efca9e
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
2022-05-10 10:09:42 +02:00
mafo-odoo f48d9a68bc [FIX] purchase: no reset custom description in PO if qt change
Step to reproduce:
	Install purchase
	Create a purchase order
	Set a vendo and a product that has this vendor in its
	vendor list
	Set a product name in the line of the vendor in the product
	purchase section (you will need to add the field)
	Change the description of the product
	Change the quantity of the product

Expected behavior:
The description stay the custom input you just set

Current behavior:
The description is reset to its default value

Explanation:
When changing the quantity the vendor from the product vendors can change.
Then its vendor product name and code can change and thus the default
description in the purchase order. To solve that we need to differentiate
a custom description from a default one and only update the descritpion
when the quantity changes if the descritpion is a default one (and not a
sutom one)

opw-2827667

closes odoo/odoo#90923

X-original-commit: 96bbe252ecbb94600632a1a5cb449b8d2810d2c0
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Fockedey Martin (mafo) <mafo@odoo.com>
2022-05-10 09:07:55 +02:00
Alexandre Kühn da40fedde0 [IMP] mail, *: pass record instead of local id in props
*: hr_holidays, im_livechat, snailmail, website_livechat

Task-2847927

closes odoo/odoo#90882

Related: odoo/enterprise#27110
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-09 20:58:31 +02:00
alt-odoo c962fe4e19 [FIX] hr_holidays: prevent deletion of allocation with taken leaves
In case we try to delete an allocation, we should add a check if there
are already taken leaves, otherwise it could lead to an incoherent
situation with validated leaves without allocation while their
associated time off type is requiring allocation.

closes odoo/odoo#90932

X-original-commit: 45567dddacae82f9b4e985703cbb9e7736e9beb0
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Alex Thuyls (alt) <alt@odoo.com>
2022-05-09 19:56:56 +02:00
William Braeckman 4bf43e21de [FIX] account: fix terms in sitemap when it is not enabled
The /terms page may be disabled/enabled in the company settings, however
the page would always be present in the sitemap whether it is enabled or
not.
This commit adds a method that checks for this settings before adding it
to the sitemap.

TaskId-2820292

closes odoo/odoo#90930

X-original-commit: 729b99a789b52c09be0272cefa3bb0eaccd6803c
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-05-09 19:56:53 +02:00
Guillaume (guva) d00fdb9310 [FIX] account: reconciliation on reversed move
With this commit, we make sure that all lines are fully reconciled when
reversing a move.

Steps to reproduce:

- Create a Journal Entry, with eg a line with 300$ debit/credit and two others
lines to make the journal entry fully balanced
- Then reverse the move
-> Only one line is marked as fully reconciled, the other one is marked
as partially reconciled.

This is because each line was passed in the reconcile method with
all the counterpart lines, even those which didn't belong to it.
Therefore, all the firsts lines was marked as partially reconciled
until the last one, which passed with the only counterpart line
left.

With this commit, we group the lines and counterpart lines by account,
and reconcile them.

opw-2810392

closes odoo/odoo#90928

X-original-commit: 0a03d029f93f6c0f31f6617c00943aa2dfcd937b
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Guillaume Vanleynseele <guva@odoo.com>
2022-05-09 19:56:50 +02:00
Demesmaeker 7a146e6f0b [FIX] sale_purchase: change to _action_cancel
An activity should be posted only when a SO is cancelled, this happens
after _action_cancel as action_cancel doesn't always cancel the order.

sale_purchase was forgotten in commit
7c8f15d4141d4ae130da59d58ee2eaff39e363c4

closes odoo/odoo#81569

Related: odoo/enterprise#26866
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-05-09 19:05:41 +02:00
Demesmaeker 27a6d5dfcc [IMP] sale: ask confirmation for SO cancellation
Before this commit, when cancelling a SO, the wizard opened only when
there were draft invoices or delivered picking in the order.

In order to complete the notification flow of the SO and avoid
unexpected  cancellation of orders, the user must now confirm
cancellation and gets to possibility to send an email notification.

task-2660895

Part-of: odoo/odoo#81569
2022-05-09 19:05:40 +02:00
Adesh Jolhe (adjo) 53415c6b16 [FIX] web: fix the border issue on kanban cards
Before this commit, when we go to the project kanban view:
the color displayed on the left of the card isn't totally responsive
when zooming in. there is a gap between content and border of kanban card.

This commit fixes the issue by aading the outline to remove white
space between border and content.

task-2720976

closes odoo/odoo#90897

X-original-commit: 89bc3255ef1496a033389e9c6d3c6eeef46115a3
Related: odoo/enterprise#27116
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-09 17:05:55 +02:00
Adesh Jolhe (adjo) 6324db6838 [FIX] project: fixed portal chatter avatar icon size
Currently, when we go to the project sharing and task chatter in
the portal view the avatar icon of portal chatter
contains more size than the avatar icon size of normal chatter

so this commit fixes the issue by applying a CSS property so that the icon
has the same size in the portal chatter.

task-2720976

X-original-commit: 220565b56493fe13d0c1757da8a0554295ebae19
Part-of: odoo/odoo#90897
2022-05-09 17:05:55 +02:00
Adesh Jolhe (adjo) 1bd3bce8df [FIX] web: fix the color_picker widget alignment issue
Currently, when we go to the planning > config > resource
(editable list view without any record) and create a ersaource
the color picker widget is resized vertically instead of horizontally.

In this commit we have fixed the issue, when there is no record in
the planning_resources list view, the color_picker widget gets 72px width by
default, so we have added a condition that if there is a color_picker widget
in a field, we will calculate the width based on the total fields in the view.

task-2720976

X-original-commit: d047080c18ea4c9314df5f2aefdfb6b7deeef45a
Part-of: odoo/odoo#90897
2022-05-09 17:05:55 +02:00
Adesh Jolhe (adjo) 38bb37c386 [FIX] web: fix the display issue with kanban examples wizard
Before this commit, when we go to the project.task > kanban examples wizard:
small display issue if we zoom in the wizard until we see the scroll bar,
then the left border of the menu disappears.

The commit solve the issue by adding a property height : fit-content that
will adjust content according to the height.

task-2720976

X-original-commit: cabf5bef9c1f0470c171e9f375bb29fc749ad8fa
Part-of: odoo/odoo#90897
2022-05-09 17:05:55 +02:00
Adesh Jolhe (adjo) 16e81f7bee [FIX] hr: align the job title on my profile
Before this commit, when we go to the systray > my profile:
the job title is not correctly aligned with the other fields.

This commit aligns the job title field with the other ones.

task-2720976

X-original-commit: 5f09258c3e8b0cc4a0b283e7ea0a0b4b3fd39c91
Part-of: odoo/odoo#90897
2022-05-09 17:05:54 +02:00
Adesh Jolhe (adjo) c836013826 [FIX] project: fix the green and red icons visibility on example wizard
Before this commit, when we go to project.task > kanban examples wizard:
the kanban state icons are missing in the description.

This commit fixes the issue by adding the d-inline-block class.

task-2720976

X-original-commit: 2593fb1e51354096c1aa6107023e05a199b49593
Part-of: odoo/odoo#90897
2022-05-09 17:05:54 +02:00
Denis Ledoux dd2958a760 [FIX] mail: allow regular users to create mail non-dynamic templates
closes odoo/odoo#90896

X-original-commit: 96770827e42615c43b70bdae6529fb76ac66c518
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-05-09 17:05:43 +02:00
Florian Damhaut 618d94988f [FIX] payment_ogone: allow any key size
Since odoo/odoo#85759 we are allowed to use other hashing algorithm
with OGONE's payment acquierer.

The V15 fw-port of this PR missed to unlock the max key size.
The goal of this PR is to fix the issue where 32+ length key
were not accepted in V15 and later.

opw-2766648

closes odoo/odoo#90895

X-original-commit: 534d16a6000c603025897bae225e0955317f411f
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-05-09 16:04:52 +02:00
Alexandre Kühn 2fae2f08b6 [FIX] calendar:tests: patch date in qunit test
Before this commit, the qunit test with activities in
calendar was relying on the current date to assert code
that show "today" activities.

This was working most of the time, but could fail at some
time of the day, like at midnight.

This commit fixes the issue by ensuring the test executes at
a specific date time, all the time.

closes odoo/odoo#90875

X-original-commit: 77fc727c05b0c9639581a3bc6ec6164d219988bf
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-09 15:01:17 +02:00
Alexandre Kühn e061647856 [FIX] calendar:tests: correct startDate of now in systray_get_calendar_event_domain
Before this commit, in the qunit tests, the mocked method
of `_systray_get_calendar_event_domain` was taking the current
datetime as date.

This was a problem because all date and datetime comparisons are
done in datetime, and date must start at the ealiest datetime of
the date.

X-original-commit: 6d529008a6854636c78151d19f744417044ef2e7
Part-of: odoo/odoo#90875
2022-05-09 15:01:17 +02:00
Thomas Carlier f45cd217c1 [FIX] event_track_quiz : fix quiz validation error
Steps to reproduce the bug:

- Config/Settings > "Event Gamification" needs to be enabled >
- Go to an event E > Tracks, select one with a quiz > View on website > Do quiz
- On website > Go to E > click Take the Quizz > Fill the answers
- Check the answers

Bug:

 Error was raised saying need to answer all questions instead of showing correct vs incorrect answers

opw:2733275

closes odoo/odoo#90873

X-original-commit: 5f15f76e6a9467c245af1d4804d773cce59d902b
Signed-off-by: Simon Goffin <sig@odoo.com>
2022-05-09 15:01:11 +02:00
Philippe Wauthy 81c8a0564d [FIX] hr_holidays: round the number of days of a time off
When the user is set in another timezone than the context timezone, the first or last work interval retrieved to calculate the number of days
between two dates is starting later or ending earlier depending on the user timezone.
The number of days displayed between two dates is therefore not an integer.

e.g.
A time off taken between 08/06/2021 and 10/06/2021 (timezone in the context is Europe/Brussels) will give:
- Number of days: 3 days if the user is in Europe/Brussels
- Number of days: 2.69 if the user is in Asia/Calcutta (first work interval starting later)
- Number of days: 2.5 if the user is in US/Pacific (last work interval ending earlier)

task-2646655

closes odoo/odoo#77036

Related: odoo/upgrade#3486
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-05-09 15:01:08 +02:00
Adrien Widart be6f3638cf [FIX] stock: scrap products thanks to internal move
A user should be able to scrap some products thanks to an internal
transfer.

To reproduce the issue:
1. In Settings, enable "Multi-Step Routes"
2. Create a storable product P and update its quantity (> 1)
3. Create a planned and internal transfer T:
    - From: WH/Stock
    - To: Virtual Locations/YourCompany: Scrap
    - With: 1 x P
4. Mark T as done

Error: T is still in draft

The `_compute_state` of a picking should not ignore the scrapped moves.
However, if we include them, we need to think about this use case: a
picking with a cancelled normal move and a done scrapped move -> its
state should be cancelled (see use case and test from [1])

[1] 429b589618e8dc2b0c0ccdec3f6eed88f1c73fc8

OPW-2841190

closes odoo/odoo#90870

X-original-commit: 1c956d49b45e9d3fec2bfa2c2020ea278ea80507
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-05-09 14:03:19 +02:00
Stanislas Gueniffey d111b4b343 [IMP] l10n_ec: user-friendly document number
Do not require user to type all digits of the document number
Instead, fill the dash-separated numbers with zeroes, as needed

closes odoo/odoo#90865

X-original-commit: 9ed26751bfbe84444f291835de5f47bbac3f7dde
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Stanislas Gueniffey (stgu) <stgu@odoo.com>
2022-05-09 14:03:16 +02:00
pedrambiria fb6b959fef [FIX] microsoft_calendar: sync events without body property
Before this commit: if a Microsoft event didn't have body property,
it couldn't get synced with Odoo and raised an error.

The solution is first to check if it contains the body and then gets
its content value.

opw-2765443

closes odoo/odoo#89634

X-original-commit: 13d57ff5e714bee96fb930c1b8050816bf22c268
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2022-05-09 12:57:42 +02:00
Géry Debongnie 3ec7ab27cd [FIX] board: make it possible to add 2 actions in dashboard
Before this commit, the code of the `add_to_dashboard` method did not go
through the get_view override of the board model. Because of that, it
did not get the arch of the current board, which means that each
add_to_dashboard call was actually a complete reset: it was not possible
to add an action without removing the current board state.

For reference, this was caused recently by a change in commit b03c227e88.
The fix is basically a localized revert of that commit.

closes odoo/odoo#90830

Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-05-09 11:25:38 +02:00
Andrea Grazioso (agr-odoo) 9b729cdda6 [FIX] account, sale: heterogeneous tax mapping
Have the taxes:
- [Ftax] any% included in price
- [TAX1] 15% not included price
- [TAX2] 15% included in price

Apply [Ftax] and [TAX1] to a product having product price [PRI]
Have a fiscal position mapping [TAX1] to [TAX2]
Make a SO with the fiscal position, add in a line the product

The unit price will not be [PRI] but will increment. This occur because
when doing the mapping we apply the computation for incl->* mapping
when just one tax is included in price

opw-2797237

closes odoo/odoo#90804

X-original-commit: 290e5a6a411ad193ab5695eba02cc4142b3a48fe
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2022-05-09 11:25:34 +02:00
Moens Alexandre 06964fee08 [FIX] cloc: empty string in demo(_xml) or cloc_exclude
Before this commit:
calling `odoo-bin cloc -P <path_to_a_module>` when the manifest of a
module includes an empty string in the demo, demo_xml or cloc_exclude
entries, would result in a crash because an empty string is not an
acceptable pattern for Path.glob

to note: an empty string in those entries is technically wrong and will
cause issue during module install, but that shouldn't prevent the cloc
from giving correct results.

closes odoo/odoo#90650

X-original-commit: 93318b22fc8b7cf6344f789d2c45fc3f5b3269eb
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Thibault Francois <tfr@odoo.com>
2022-05-09 11:25:24 +02:00
Brice bib Bartoletti fe918d40b1 [IMP] account: faster account_move unlink
On huge DB, unlinking an account_move can take a lot of time.
Most of this time is wasted checking for foreign key constraint.

closes odoo/odoo#84817

Signed-off-by: William André (wan) <wan@odoo.com>
2022-05-09 11:25:21 +02:00
Arnold Moyaux b9f4fff0b5 [FIX] purchase_requisition: hide schedule date
Schedule date was hide in the view for a back to basic task in order to
simplify the view.
But it was at the time, the optional parameter did not exist, we could
readd it under the hide option

opw-2842963

closes odoo/odoo#90790

X-original-commit: b21a960ca925ea03e32d71c5d69098f98dfde239
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-05-09 10:25:53 +02:00
budi sentosa 1f6fe45aca [CLA] Budi Sentosa
closes odoo/odoo#90456

X-original-commit: 901ca05ea0ba0988767b048fe75a463dbcdd5ddc
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-05-09 10:25:49 +02:00
budi sentosa 8ac8645418 [FIX] l10n_id_efaktur: change round, to float_round
on invoice, all round is default to half_up
but on efaktur export is half_down

ref #89793

X-original-commit: bd21e88ab041bf38132e7bd1502ca6e21a34ff0e
Part-of: odoo/odoo#90456
2022-05-09 10:25:49 +02:00
Audric Onockx (auon) 70604fefbc [FIX] project : apply project notification preferences to task
Steps :
Go to a Project's settings.
In your 'Following' preferences, uncheck 'Task Rating'.
Create a new Task in this Project and see your preferences.

Issue :
Task Rating is checked.

Cause :
The default value of project's task rating notification is True.
The value of its task's is supposed to be inheritted from there.
Yet, this inherittance only happen when default is False.

Fix :
Set default to False.

opw-282497

closes odoo/odoo#90816

X-original-commit: acb3b4dc9d93dad5850fe4bfa00770b0b8026d22
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-09 09:20:57 +02:00
Adrien Widart cc68eee1c4 [FIX] sale_{purchase,stock}, stock: decreasing the ordered qty
In a MTO case, when a salesman decreases the ordered quantity, it can
lead to an access error

To reproduce the issue:
(Use demo data)
1. In Users, edit Marc Demo:
    - Invoicing: None
    - Purchase: None
2. Create a product P:
    - Type: Storable
    - Add a vendor V
    - Routes:
        - MTO
        - Buy
3. Log in as Marc Demo
4. Create a sale order SO with 2 x P
5. Confirm SO
6. Edit SO:
    - Set the qty of P to 1
    - ignore the warning
7. Save the SO

Error: There is an access error ("create" on "Activity" (mail.activity))

Because the user decreases the quantity, we want to log this decreasing
on the related documents:
https://github.com/odoo/odoo/blob/ee9ea35ad218be87564de484470f1c4e9c433977/addons/sale_stock/models/sale_order.py#L91-L94
In the above case, it leads to a write operation on the generated
purchase order. However, Marc Demo hasn't any right to perform such an
operation.

We should bypass the rights checking in such situation.

Note: in `/sale_stock:SaleOrder.write`: we need to specify what kind of
precision we are using.

OPW-2745317

closes odoo/odoo#90782

X-original-commit: 525d3e2a7e6679a73de1b1a16f666d015543e5bd
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-05-09 09:20:54 +02:00
thcl-odoo 8dd84cf4b8 [FIX] mrp_workorder: consistent returned view on finish
Current behavior :
When a workorder is marked as done, the returned view is inconsistent between
"control panel" and work orders' list view.
- "Control panel"  : we correctly land back to workorders from this workcenter
- List : we land back to an empty list view

Steps :
- Install Manufacturing
- Get or create a manufactured product
- For this product, plan some orders in a work center
*Control Panel view*
- Proccess to a workorder and mark it as done
-> Correctly redirected to a kanban view with remaining workorder linked to
this work center
*List view*
- Proccess to a workorder and mark it as done
-> Redirected to an empty list view

OPW-2767737

closes odoo/odoo#90805

X-original-commit: 4d231c226fb118b8ebd9f4f896f4ec04d705d210
Related: odoo/enterprise#27077
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Claude Thibault (thcl) <thcl@odoo.com>
2022-05-08 18:39:16 +02:00