Commit Graph
160944 Commits
Author SHA1 Message Date
Aditya Sharma 2bbe5d438c [FIX] survey: traceback while opening multiple answer question
The above two fields, which we are cleaning up, were added to fix the
resequencing issue https://github.com/odoo/odoo/pull/108450.

The other problem that remains here is that whenever we are opening the multiple
choice question from the (survey.survey) form view after changing the question
selection field, we get traceback.

The problem was generic, so a more generic fix was pushed into the JS framework
https://github.com/odoo/odoo/pull/116561 ,which solves the earlier resequencing issue. So here we are cleaning up
 the earlier fix, which is unnecessary now. And by this issue while opening multiple
choice question also resolves.

Task-3127646

closes odoo/odoo#120618

X-original-commit: c65c15eaab4b6e62e671c00a25d2aef2287d4387
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-05-10 02:00:43 +02:00
clesgow 77adfd2cb4 [IMP] stock: remove useless links to uoms
Remove links to UoM form since they are useless and lead to unused
forms.

Part of task-3218314

closes odoo/odoo#119381

Related: odoo/enterprise#40153
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-05-09 21:04:04 +02:00
clesgow ea14110052 [IMP] stock_account: add incoterm reference on delivery slip
Displays the Incoterm code and location on the delivery slip as it's
currently displayed in the purchase order report.

Part of task-3218314

Part-of: odoo/odoo#119381
2023-05-09 21:04:03 +02:00
clesgow d22705b956 [IMP] account: display code and name on Incoterms
Display incoterm names the same way we display products with their
`internal_reference`.

Part of task-3218314

Part-of: odoo/odoo#119381
2023-05-09 21:04:03 +02:00
clesgow 0aaea5648a [IMP] stock_picking_batch: autobatch only ready pickings
By only auto-batching pickings that are ready, it allows, if you reserve
X days in advance, to make batches for those periods, almost like batch
on the scheduled date.

Part of task-3218314

Part-of: odoo/odoo#119381
2023-05-09 21:04:03 +02:00
clesgow 459760c422 [FIX] product: hide barcode when with dynamic variants
Steps to reproduce:
- Inventory -> Configuration -> [Products] Attributes
- Create new Attribute with 'Variants Creation Mode' set to
'Dynamically' with a few values
- Inventory -> Products -> Products -> New
- Set the new dynamic attribute to the product and save
- If you try to set a barcode, the field will empty itself at each save

When a product is created with 'Dynamic' attributes, the variants will
only be created once the combination of attributes is used. So initially
there is no variant, hence nowhere to set the barcode.
So we avoid letting the attribute being set when there is still no
variant.

Part of task-3218314

Part-of: odoo/odoo#119381
2023-05-09 21:04:03 +02:00
clesgow 0332afc3f5 [IMP] stock{,_dropshipping}: use filters instead of domains for pickings
Use filters instead of domains for the `stock.picking` lists accessible
from the menu 'Operations', so all pickings can be easily consulted in a
single view when removing said filter.

Part of task-3218314

Part-of: odoo/odoo#119381
2023-05-09 21:04:02 +02:00
clesgow 2118bbe452 [FIX] mrp: Refer to mrp.production in Manufacturings list
Steps to reproduce :
- Install stock, mrp
- Go to Inventory -> Operations -> Manufacturings
- No MO could be found

The view showed `stock.picking` having a 'manufacturing'
picking_type_code. Now instead shows a list of `mrp.production` as it is
done when clicking on the 'Manufacturing' type in the stock Overview.

Part of task-3218314

Part-of: odoo/odoo#119381
2023-05-09 21:04:02 +02:00
clesgow 34656b29f7 [IMP] stock,mrp: only reserve product on the forecast
When using the Reserve / Unreserve buttons on the forecast report, this
will [un]reserve every move of the picking / production. We want to be
able to do it on a product base, so that when using the [un]reserve from
the forecast of a product, it will only affect the said product.

Part of task-3218314

Part-of: odoo/odoo#119381
2023-05-09 21:04:02 +02:00
clesgow b56f76711b [IMP] stock_account: add product category for SVL groupby
Adds the storage of the product's `categ_id` in the stock valuation
layer as it is a prerequisite for being able to use a groupby in the
tree view.

Part of task-3218314

Part-of: odoo/odoo#119381
2023-05-09 21:04:02 +02:00
clesgow 08ae8609c9 [IMP] purchase_requisition: set RFQ origins for alternatives
When creating an alternative RFQ, set the source document of the
original RFQ as source document of the newly created alternative.

Part of task-3218314

Part-of: odoo/odoo#119381
2023-05-09 21:04:01 +02:00
clesgow fcc1ad8025 [IMP] purchase{_product_matrix}: add/remove links to m2o fields
Adds back the direct link on the purchase line product's column when the
`product_matrix` is enabled. This allows the user to still click on the
product and go to its form when the module is enabled.

Also removes the direct link to the UoM, since it has no use.
Finally, sets a width for the product column in the purchase form to
keep it usable even when multiple columns are selected.

Part of task-3218314

Part-of: odoo/odoo#119381
2023-05-09 21:04:01 +02:00
clesgow 2a6f1e32f5 [IMP] purchase_requisition: unlock blanket orders custom descriptions
It should be possible to modify the custom description of a Blanket
Order line without having to reset it to draft to do so.

Part of task-3218314

Part-of: odoo/odoo#119381
2023-05-09 21:04:01 +02:00
Maximilien (malb) d35bc5c94b [IMP] l10n_sg: taxes
We want to invigorate a Tax Name Taxonomy so that tax names are as codified as possible. This allow for a better display on Invoice Description, and allowed us to implement a smart name_search.

In this PR, we change the taxes name so that it's more clear for the users

closes odoo/odoo#115330

Task-id: 3052677
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-05-09 21:03:53 +02:00
Maximilien (malb) 82640b7c29 [IMP] l10n_bg: taxes
We want to invigorate a Tax Name Taxonomy so that tax names are as codified as possible. This allow for a better display on Invoice Description, and allowed us to implement a smart name_search.

In this PR, we change the taxes name so that it's more clear for the users

closes odoo/odoo#115317

Task-id: 3052677
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-05-09 19:26:54 +02:00
Maximilien (malb) 07358a5c2e [IMP] l10n_sk: taxes
We want to invigorate a Tax Name Taxonomy so that tax names are as codified as possible. This allow for a better display on Invoice Description, and allowed us to implement a smart name_search.

In this PR, we change the taxes name so that it's more clear for the users

closes odoo/odoo#115232

Task-id: 3052677
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-05-09 19:26:51 +02:00
Rahul Reddiar 9e1232b4a2 [IMP] purchase_stock: added buyer field in partner form view
Currently, automatically PO is generated in that PO buyer field is empty.

So in this commit, we added buyer field in partner form view, when rfq is
generated automatically and vendor has a specific buyer then at creation
of rfq, the PO buyer field will be set according to that.

TaskID - 3151213

closes odoo/odoo#113709

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-05-09 19:26:48 +02:00
Benoit Socias 38e2aef445 [IMP] web_editor, web_unsplash: alternate unsplash and illustrations
Before this commit, all search result illustrations were displayed
before the Unsplash images.

This commit makes the search result images from Unsplash and the
illustrations alternate, beginning with the first Unsplash image.
The existing attachment results remain in front.

task-3060679

closes odoo/odoo#111481

Signed-off-by: Bojabza Soukéina (sobo) <sobo@odoo.com>
2023-05-09 19:26:45 +02:00
Jurgen (jugj) b5fda6c139 [IMP] hr_recruitment_(survey) : Add tooltip to recruiter and interviewer in job position form
And open interview forms on a new tab as well
task - 3293231

closes odoo/odoo#120903

X-original-commit: 7bed47dc59ae8c88048e585f0104db70b76a7f28
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-05-09 18:27:13 +02:00
Hubert Van de Walle (huvw) 5ec18c130d [REV] web: parseMonetary of decimal value without leading 0
This reverts https://github.com/odoo/odoo/commit/59dcd17c2d389d52365a2e2975de800284cd271f

Issue: With a comma as decimal separator, it is replaced by a dot
It is then ignored in parseFloat

closes odoo/odoo#120856

X-original-commit: 83de5424d1fa7013b212dcac9dee66c1cd89269a
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-05-09 18:27:07 +02:00
Xavier-Do ab1e4f670a [REF] web_editor: change custom url
Before this commit an ir_assets generated automaticaly by the web editor
will generate an url ending with ...custom.addon.bundle_name.ext

After this commit the url will start with /_custom/addon.bundle_name/...

This will make it easier to spot at immediately if it is a custom asset
and thus it is useless to apply the glob. Actually, it will fail on the
/_custom when trying to glob, making it faster.

This is mainly useful to clarify and debug but in a case with mainly
customised ir_asset for one bundle, it may have an impact on speed.

An upgrade script was created for this change.

closes odoo/odoo#120699

Related: odoo/upgrade#4636
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-05-09 18:27:01 +02:00
qdp-odoo be4e1d1400 [IMP] account: do not trust bank accounts at their creation
This comes as a followup of https://github.com/odoo/odoo/pull/120423 where we restrict unallowed users to toggle the field allow_out_payment when writing on res.partner.bank. Similarly, we'll now do the same check at the creation of bank accounts

closes odoo/odoo#120694

Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-05-09 18:26:59 +02:00
Rémy Voet (ryv) d2c2f5bfc2 [FIX] core: invalid field should raise an Exception in domain
Since https://github.com/odoo/odoo/commit/5a998694a6f353da05d7f69e4c59b9e7dd139e27,
we don't crash anymore at https://github.com/odoo/odoo/commit/5a998694a6f353da05d7f69e4c59b9e7dd139e27#diff-fa4d9268d6e65e19aebec81c46038f0e496b91142588ed4d1c1bce7ff2338f2cL759
(at `field.auto_join`) if `len(path) > 1`, `field` is translated the
`left` is not only a field name (example: `"name.<something else>"`).
Because we trust `left` at this [point](https://github.com/odoo/odoo/blob/1bbdd77f0ee6bd632f5ade88b8b71c5576fa9053/odoo/osv/expression.py#L1339),
(we shouldn't, coming from https://github.com/odoo/odoo/pull/101115)
then SQL expression generated for translated field is unsafe
(SQL injection).

In case of translated field, check that `left` side is only a valid
field name. (if it is not, it will crash later in `__leaf_to_sql`).
In addition, use `field.name` instead of `left` when it is possible to
be more robust.

closes odoo/odoo#120565

Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
2023-05-09 18:26:52 +02:00
Xavier-Do 5d3601066e [FIX] web, *: clean manifests assets
Some glob are more complex than they should.

Since `**` matches no/one or many directories, the use of /**/**/ is
the same as /**/.

Since **.js is similar to *.js except if you except to have a js file in
a directory ending with js. Moreover ** will match any directory
recursively before a js file.

closes odoo/odoo#120880

Related: odoo/enterprise#40842
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-05-09 15:40:59 +02:00
smdc-odoo 8d62af3937 [FIX] account: Propagate analytic on accrued entries
We want to propagate the analytic breakdown on the accrued
entries that user can already create from the PO/SO list views.

task-3096126

closes odoo/odoo#120864

X-original-commit: d4d92029bf7c2a2c6a670170d3207b457dda5c68
Signed-off-by: William André (wan) <wan@odoo.com>
2023-05-09 15:40:56 +02:00
Kevin Baptiste c142b3f1d2 [IMP] hr_recruitment: automatically create employee
The action `Create Employee` on an applicant would open the form view
with the fields pre-filled, but the employee would not be automatically
created when leaving the view.

task-3301176

closes odoo/odoo#120566

Related: odoo/enterprise#40835
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-05-09 14:29:06 +02:00
Louis Wicket (wil) 7792d45604 [FIX] iap_mail, web: fix untranslatable text
Some translations could not be exported, as reported in odoo/odoo#114711.

This is due to Babel—the library we use to extract `_t` occurrences from
the sources—ignoring javascript template literals, resulting in any
gettext inside template literals not being parsed and exported as
translatable resources.

From version 2.12.0 of the library, support for javascript template
literals can be enabled by providing the `parse_template_string` option
to the Babel `extract` method.

Unfortunately, the library cannot be updated for now, as our policy is
to stick to the version of packages from the official Debian repository.

This commit refactors some code so that no gettext is inlined within
template literals.

closes odoo/odoo#119996

Related: odoo/enterprise#40457
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-05-09 14:28:58 +02:00
Jurgen (jugj) ceba69f3ed [IMP] (l10n_be_hr_payroll)_fleet : Improve the visual of fleet contracts
task - 3247012

closes odoo/odoo#120865

X-original-commit: 88cc0f78dd9f7f7f8d0c29c54ca4ffbd8a9a0911
Related: odoo/enterprise#40829
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-05-09 11:57:44 +02:00
Antoine Dupuis (andu) 6e30206fdb [FIX] account: Correctly translate terms when loading CoA
Bugfix: at the moment, if the environment's language is not en_US,
loading a CoA doesn't correctly load the translations: the translations
for all languages are created with the en_US terms.

Steps to reproduce:
1. Create a DB and install l10n_be.
2. Switch to French.
2. Create a new company based in Belgium.
3. Install the Belgian CoA on the company.

Expected behaviour: The accounts should be in French.
Actual behaviour: The French translation of the accounts contains
the terms in English.

Analysis:
When the records are created by _load_records(), the language of the
environment is French. As a result, all translatable terms are created
with translations in en_US and in fr_FR.
See https://github.com/odoo/odoo/blob/39292a02ab34ea86abd5601055901eb968006944/odoo/fields.py#L1762-L1771

Later on, when the translations are loaded by _load_translations,
there already exists a name->'fr_FR', so our call to
translation_importer.save(overwrite=False) doesn't want to overwrite it.
See https://github.com/odoo/odoo/blob/2780c37cfdb8560ac7c725fd27f4fe272f1d3072/addons/account/models/chart_template.py#L787

As a result, we end up with the English terms in both the en_US and
fr_FR translations.

The fix:
Set the language to en_US when calling _load_records().

closes odoo/odoo#120863

X-original-commit: 52ef69aa8423a0fd5d78af1ab018a98dba87361c
Signed-off-by: William André (wan) <wan@odoo.com>
2023-05-09 11:57:39 +02:00
niyasraphy 4a71b51f59 [FIX] website_blog: post_date inverse function in blog post
before this commit, on clearing the value from
post_date field in the blog.post model is
not recalculating the post_date value
from the inverse function.

* open a blog post
* clear the post date value
* click go to website smart button
* traceback will be shown due to missing date

_write is not needed because it was done for
method _compute_ranking, which doesn't exist
in v16 https://github.com/odoo/odoo/commit/74e1d6940da7b5f0cc8fe4b2ba60d0bb81990ba5

post_date is computed method with inverse
 function which is handled in write, not in _write

after this commit, on clearing post_date value
the inverse function will set the post_date
value from create date as it was in the
previous versions.

closes odoo/odoo#120858

X-original-commit: f2f45cddede53d201e4efbe27a86e208ebf51ab1
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2023-05-09 11:57:31 +02:00
Harsh Modi 088b4b76c1 [IMP] l10n_in_edi_ewaybill: added error handling for error code 4026
Handled error for if e-waybill is already generated and we send request for
e-way bill generation it will give error -
[4026] Duplicate e-waybill for the given document.

Fix - It will fetch the ewaybill details and shows the ewaybill has been already
      generated

task-3262244

closes odoo/odoo#120849

X-original-commit: 886536ce4e86cddc06283c5752d9bf17ee4cbeda
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-05-09 11:57:28 +02:00
Samuel Degueldre 1f90799ff9 [IMP] point_of_sale, pos_loyalty: make pos tours run on mobile
The previous commit highlighted the fact that the pos is not really
tested on mobile. This commit creates a new class that extends the
TestUi class from point_of_sale, which runs most of the pos tours, and
runs all the same tours on mobile.

In order for these tours to run to completion correctly, a bunch of tour
utils have been adapted to add mobile-only steps or fork a step into two
mutually exclusive steps that run only on desktop or only on mobile. A
tour in pos_loyalty has been adapted to the change in the pricelist
selection utility function.

closes odoo/odoo#120791

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-05-09 11:57:23 +02:00
Samuel Degueldre af2b9eab4c [FIX] pos_restaurant: stop crashing in mobile
In odoo/odoo#120070 the pos assets bundle were refactored to stop
including the entirety of assets_backend. In doing so, jQuery.ui is no
longer present in the bundle. pos_restaurant adds an addon for jQuery.ui
to make its widgets work on mobile, but since the original library is
not present, this causes a crash when touch events are available (ie on
touch screens).

This commit fixes that by removing the addon entirely, since none of the
pos depends on jQuery.ui anymore.

Part-of: odoo/odoo#120791
2023-05-09 11:57:23 +02:00
Robin Lejeune (role) 5f197e76f4 [FIX] web_editor: fix HTML/CSS editor resizing bug
Starting on version 16.0, the HTML/CSS editor is very hard to resize.
This is due to 16.0 introducing an iframe for the website: as soon as
your mouse enters the iframe, the editor loses focus and cannot be
resized anymore.
This commit fixes that.

task-3006138

closes odoo/odoo#120729

X-original-commit: e489abeffc72293544acb18eba23b52ed2224d60
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-05-09 11:57:19 +02:00
FrancoisGe 4cd313306b [FIX] web: remove useless checkValidity
In this commit, we will remove unnecessary uses of the checkValidity
function. In the ListRenderer, during a keydown, we do if checkValidity
but it is an async function so the condition is always true.

We have checked the calls and they are probably unnecessary because
the add(...) function will perform a checkValidity.

closes odoo/odoo#120619

Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2023-05-09 11:57:17 +02:00
Adrien Widart (awt) 28075c915b [FIX] core: translate SQL constraints
To reproduce the issue:
1. Install `mrp`
2. Send a RPC to create a new BoM:
   - `{"product_tmpl_id": 1, "product_qty": -1}`

Error: It will generate a traceback

Because of the negative product qty, the RPC triggers a SQL constraint
that we try to return. However, the context does not have any `lang`,
hence the traceback

sentry-4088426130

closes odoo/odoo#120614

X-original-commit: badc554b9dd7a299aac8ebca24bec6b90bef779a
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Signed-off-by: Rémy Voet <ryv@odoo.com>
2023-05-09 11:57:14 +02:00
dasz ac07e4a497 [IMP] survey: send recruitment interview directly
send interview mail directly, instead of putting in the cron queue

closes odoo/odoo#115800

Task: 3216342
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-05-09 11:57:09 +02:00
Jurgen (jugj) 6c65c1de6e [IMP] hr_work_entry : Make status bar of work entries readonly
task - 3293181

closes odoo/odoo#120853

X-original-commit: 4424e9015c76a15d02a1cd0e9d6cb296aa093abe
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-05-09 09:54:02 +02:00
Hubert Van de Walle (huvw) 72646e00e9 [FIX] web: restore orderBy from state when using default order
Steps to reproduce
==================

- Enter debug mode
- Go to "Settings / Technical / User Interface / Views"
- Click on the "View Type" column header
- Click on any record
- Use the breadcrumbs to go back

Issue: the list is not sorted anymore by "View Type"

Cause of the issue
==================

When there is an `orderBy` param passed to `DynamicList`, it takes
precedence over the previous exported state.

We should only use the params.orderBy if it is not the initial one.

Solution
========

In order to know if we are using the initial order by, we need to export
it. With that, we can check if the `params.orderBy` is the initial one.
If it is the same, use the `state.orderBy`
If not, use the `params.orderBy`

opw-3202088

closes odoo/odoo#120839

X-original-commit: 81dba0c1746ba579a01dead8e4712cf83cbaad28
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-05-09 07:08:56 +02:00
Hubert Van de Walle (huvw) 7d26f9e4b9 [FIX] web: allow to use the hour:minute on mobile for FloatTimeField
Steps to reproduce
==================

- Use an android phone
- Go to Timesheets
- Click on Add a line
- Click on the Hours Spent input

The keyboard is missing the colon `:` symbol

It is then only possible the enter a time in the float format.

Cause of the issue
==================

The inputmode=decimal attribute prevents a user from entering a `:`
symbol

Note that this doesn't happen on IOS, since the inputmode is ignored for
other reasons.

opw-3278089

closes odoo/odoo#120824

X-original-commit: 8b919ae51d7deb34169b7c6970964056ef2eb632
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-05-09 07:08:51 +02:00
Valentin Chevalier 0bcd364def [FIX] sale: check the right partner in the access token
When using a different invoicing address for a partner on a sale order,
an error is thrown up. This is caused by checking the wrong partner in
the access token.

opw-3298228

closes odoo/odoo#120822

X-original-commit: bd76e9d6174d2154f8685dbaa2c8dcf1678ac175
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
2023-05-09 07:08:48 +02:00
eLBati 17ceb5790f [CLA] Add email address to eLBati's CLA
closes odoo/odoo#120808

X-original-commit: 94247ed07de7d3a7c8e5b325151e208c8bf499b5
Signed-off-by: William André (wan) <wan@odoo.com>
2023-05-09 06:07:58 +02:00
Kevin Baptiste 58b77d5b8a [FIX] hr: open correct employee view from settings
Clicking on the 'Employee' smartbutton on a res.users form view would
lead to a traceback if the user was not part of HR Officer.

task-3279347

closes odoo/odoo#120804

X-original-commit: b5fc8a4bacdf2964f71f2ad5c7d0c6ac30a4a9b5
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-05-09 06:07:53 +02:00
Alexandre Kühn cae9820add [FIX] test_mail: use patched date in activity view test
Before this commit, tests were using current date to make assertion.
It's best to avoid making tests that use current date, as it might
fail when run at specific time (e.g. at midnight or during holidays).

closes odoo/odoo#120800

X-original-commit: 5bcef0f1d6ab48e408bc5058ea90d85f96da8928
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-05-09 06:07:51 +02:00
Andrea Grazioso (agr-odoo) 360b95e8eb [FIX] account: search for deprecated account
Duplicate the default Account Payable (211000)
Set the default Account Payable to Deprecated
Create a Vendor Bill with a line
Save

Error will raise
The account Account Payable (211000) is deprecated.

opw-3199157
opw-3229350

closes odoo/odoo#120799

X-original-commit: 0dc11ed2e4e530ddefe4310fa6bef7001f20ecc1
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2023-05-09 06:07:49 +02:00
LeDungViindoo fe21f63c5f [FIX] mrp: enforce constrains check for cost share of byproducts in MO
Steps to reproduce:

Step 1: Create new MO
Step 2: In page by-products click three dots to show column cost_share
in tree by-products
Step 3: Create new Byproduct and input cost share >100% or <0% or input
two byproducts
        where their cost share adds up to more than 100%

Expected result:
Validation error: total byproduct cost_share cannot exceed 100
or Validation error: cost_share values must be positive

Actual result:
Values saves without issue

Issue is due to `move_byproduct_ids` being removed in the mrp_production
overrides of
`write()` or `create()` and having the `_compute_move_byproduct_ids`
populate its values.
This removal is causing the constrains to not be enforced, therefore we
set the constrains
field to `move_finished_ids` since changing of this value will ensure
that the values are
correctly checked.
Note: There will be a decrease in performance since this means the
constrains will be
called whenever the MO's product to produce is changed, but hopefully it
will be
minimal since there is no simple fix for this issue.

closes odoo/odoo#120797

X-original-commit: 9d6ff93d0f5b39e939f632486a97093b59d335ef
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-05-09 06:07:46 +02:00
roen-odoo 6b014dd0d6 [REV] pos_loyalty: revert gift card specifid point computation
The correct behavior for the gift cards should be that the value of the
gift card is equal to the value of the order line.
For example :
-50$ giftcard -> Apply discount 50% on the order line -> 25$ gift card

If we want to apply a discount on a gift card we need to use the global
discount

The commit we are reverting was forcing the value of the gift card to be
the base value of the order line.

This reverts commit 83ceeecde76a859749d0659d6c387d95155c8425.

OPW-3264945

closes odoo/odoo#120794

X-original-commit: 023e2f2571ab7c814ed3cad45871fc221562fb67
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-05-09 06:07:44 +02:00
Rahul Reddiar ed3e064d52 [FIX] mrp: set duration per unit when immediate production
Previously WO duration per unit was not getting updated in WO report, since
there was no code for updating WO duration per unit while triggering immediate
production.

With this commit, WO duration per unit is updated in WO report when immediate
production is triggered.

TaskID - 3251232

closes odoo/odoo#120782

X-original-commit: 1c34d2875741da820212d5d781603fc9b270464a
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-05-09 06:07:41 +02:00
tsm-odoo cba9291370 [FIX] mail: wrong type for thread state
closes odoo/odoo#120781

Signed-off-by: Debondt Didier (did) <did@odoo.com>
2023-05-09 06:07:38 +02:00
Andrea Grazioso (agr-odoo) c2182ae4d0 [FIX] account: payment reconciliation line order
Create 3 invoices for customer (A: $100, B: $300, C: $200)
Have a customer payment of $500
Reconcile the payment, in the widget add the line in the order:
- Payment line
- Invoice A
- Invoice B
- Invoice C (partial payment)
Reconcile
Check invoices

Issue:
C will be fully paid, the partial payment will be applied to B
After 5b2c1d243c0dd5b049ceae280dd270fc8a59f955
We order the lines by amount currency but the user provided order is
lost. Moving the original fix to point of sale

opw-3240586

closes odoo/odoo#120779

X-original-commit: 89f9028901a8b43aab605c12e3c7bcc2a7dd8d44
Related: odoo/enterprise#40805
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2023-05-09 06:07:33 +02:00