Steps to reproduce:
- Create 2 projects: 'Project1' and 'Project2'
- Enable sub-tasks
- In Project1 create a task, name it '1'.
- In task 1 add a subtask, name it '1:1'.
- In task 1:1 add another subtask, name it '1:1:1'.
- Go to Timesheet app > add lines for each task.
- The lines display name are "Project1 / 1", ...
- Go back to task 1, edit the task project to Project2 and save.
- The subtasks will have their project_id also set to Project2.
- Go to Timesheet app.
Issue:
Tasks 1 and 1:1 will have their display names updated to "Project2 / 1"
and "Project2 / 1:1". However, task 1:1:1 is displayed as
"Project1 / 1:1:1", meaning it's project_id was never updated.
This happens because of the way changed fields propagate to immediate
children, but not to grandchildren, which is intended behaviour.
Solution:
`_compute_project_id` is also called onchange, meaning that we can use it
to update account lines with an outdated project value with the new value.
opw-3018301
closesodoo/odoo#109352
X-original-commit: 91b42c806ce2029d9ef678d145ced3138e35bec0
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Stefan-Calin Crainiciuc (stcc) <stcc@odoo.com>
Expenses paid by company are marked as paid but the related journal
entry is not paid and cannot be paid
Steps to reproduce:
1. Install Expenses and Accounting
2. Create an expense payable to company and set an amount
3. Create report
4. Submit report
5. Approve report
6. Post journal entries
7. Open the related journal entry
8. Attempt to register payment: an error is raised
Solution:
Mark the journal entries created for the expense as paid if the expense
is paid by the company
opw-3075818
closesodoo/odoo#109375
X-original-commit: f5dd4e3326a17c1f6d06630503d1ede8cc6c59fe
Signed-off-by: William André (wan) <wan@odoo.com>
Cannot be used in v16 since some mixin don't exist anymore.
After 4 odoo versions, and now that we use bootstrap 5, we drop the
support of bs3.
closesodoo/odoo#109359
X-original-commit: 2c34fd4f031b006451305c46b99a790540c5e902
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
When creating a new lot in an inventory adjustment, the removal date,
the best before date and the alert date are not always defined.
To reproduce the issue:
1. Create a product P
- Type: Storable
- Tracking: By Lots
- Expiration Date: True
- Expiration Time: 2
- Best Before Time: 0
- Removal Time: 0
- Alert Time: 0
2. Update the on hand quantity of P:
- 1 x P with lot L01
3. Open L01
Error: Only the expiration date is defined. The other dates
(removal, best before and alert) should be defined too.
Considering the definition of the fields set on step 1:
https://github.com/odoo/odoo/blob/221ee0cdc362e1958f9a5326c1966de9dfb47c48/addons/product_expiry/models/product_product.py#L23-L35
The times defined on Best Before, Removal and Alert are the number of
days before the Expiration Date. So, if for instance the user
defines the best before time to 0, it means that the best before
date must be the same as the expiration date.
OPW-3072000
closesodoo/odoo#109353
X-original-commit: 8b06046379e6cfa62bd5b2df261a7ab22d5e2c3b
Signed-off-by: Adrien Widart <awt@odoo.com>
*: l10n_fr_fec, l10n_account_edi_ubl_cii_tests
Fix two failing tests in: - l10n_fr_fec: Add missing factor_percent in
the creation of a tax in the test for FEC - account_edi_ubl_cii: The
invoice name supposed the old convention per month while this was
changed to on a per year basis anyways for customer invoices.
These two tests were ignored by runbot for a while and began to fail
only after the runbot exception was removed (see:
https://runbot.odoo.com/runbot/build/22172258).
In addition, tests in `TestItEdi` started to fail as well when the
exception was removed ! In particular, if an exception was raised in the
`setUpClass` of `TestAccountFrFec`, the tests in `TestItEdi` were
failing.
This is because `TestAccountFrFec` is decorated with
`freeze_time('2021-05-02')`. Indeed, when one decorates a subclass of
`unittest.TestCase` with freeze_time, if the `setUpClass` raises an
Exception, `_freeze_time.stop()` is not called, and the frozen date is
propagated in the other test classes. As a consequence, when an
exception was raised in the `setUpClass` of `TestAccountFrFec`, the
freeze_time set in `TestAccountFrFec` (2021-05-02) was kept in
`TestItEdi`, thus causing tests to fail in `TestItEdi`.
As a conclusion, `freeze_time` should never decorate an Odoo test class.
closesodoo/odoo#109324
X-original-commit: 531270666ec5a6582d4a0a68ea534f2a3a6852ff
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
Current behavior:
When creating a PoS config, it is possible to have multiple cash payment
method. Wich is not supported by the PoS.
opw-3030125
closesodoo/odoo#109331
X-original-commit: 7ba362b60a38a993fdeec920e6c90a754ddeb910
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
Before this commit, trying to delete a page from the page manager in
debug mode would throw an error of type "Got duplicate key in
t-foreach".
As explained in this commit [1] and as per the [owl documentation]:
"Owl requires the presence of a t-key directive, to be able to properly
reconcile renderings." and "A key should be a unique number or string."
In our case, "dependency_value" is an array. Due to that, the current
item of the "t-foreach" iteration is the current value. The bug is
fixed by ensuring that the value of "t-key" is the current value index
and not the value itself.
[1]: https://github.com/odoo/odoo/commit/0d1c263298ca6724a6fe6c31e2a2d3221c5e8c75
[owl documentation]: https://github.com/odoo/owl/blob/master/doc/reference/templates.md#loops
task-3082345
opw-3100483
opw-3111671
closesodoo/odoo#109329
X-original-commit: f56d5906f845cb45f88d9729b73aa2ed08c551f3
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Steps to reproduce the bug:
- Install the "Surveys" application.
- Go to the "Website" application.
- Go in the page manager ("Site" > "Pages").
- Select a page (typically "Home").
- Try to delete it.
- Error of type "'survey.survey' object has no attributes 'name'".
The error comes from the fact that records do not necessarily have the
attribute called "name". To fix this error, this commit uses
"display_name" that is defined in all models.
task-3082345
opw-3100483
opw-3111671
X-original-commit: d5aa5d7ebf9cd17a6df054252a1313ec8b85e83e
Part-of: odoo/odoo#109329
Usecase to reproduce:
- Create a product with replenish on order route
- Create a SO for this product and add a shipping method
- Confirm the SO
The shipping method is not on the product.
It's due to the MTO delivery rule that miss the propagation of carrier
option. It's not set by default while it's is on the classic delivery
rule on the warehouse.
To avoid confusion we add it by default on both rules
opw-3112455
opw-3113180
closesodoo/odoo#109328
X-original-commit: c02df957d9f04c911f330aaaadd80fe97a601509
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Steps to reproduce:
- Install stock
- Activate storage locations
- Switch to French language
- Go to stock/analyse/emplacements
- Select all locations
A javascript traceback pops up because the names 'Set' and 'Count Sheet'
are not translated, therefore we use _t function to translate the terms.
opw-3113275
closesodoo/odoo#109261
X-original-commit: 719a6e6223bbde3cdeb0ade5665d95681c436521
Signed-off-by: Tiffany Chang <tic@odoo.com>
This commit adds checks in the view validation, to detect the use
of implementation details in archs. The goal is to prevent people
from using owl directives in archs (e.g. t-on-click). Recall that
a view arch isn't an owl template, it must follow the DSL of the
given view type.
In kanban, gantt and activity archs, using `t-xxx` attributes is
forbidden, except for directives historically supported by qweb
(e.g. `t-esc`).
In other views, using `t-xxx` attributes is forbidden (except for
`t-translation`).
In all views, using attributes `data-tooltip`, `data-tooltip-template`
and `data-tooltip-info` is forbidden.
Task 3085357
closesodoo/odoo#107083
Related: odoo/enterprise#35352
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to reproduce:
- create a cash rounding
- create an invoice
- in Other Infos, select the created Cash Rounding Method
Issue:
Accounting wise, everything works fine but the back-end view and the Invoice Reports do not take into account the rounding
(except wen you create a partial payment, the amount due is correct of course)
Solution:
Make sure the value `formatted_amount_total_rounded` is returned by the method `_prepare_tax_totals` so it can be used in the templates
opw-3090556
closesodoo/odoo#109312
X-original-commit: 5724858a374c894bf787b4381bdcd466b4cc2816
Signed-off-by: William André (wan) <wan@odoo.com>
In multi-steps receipt, when running a procurement, using "Buy" as
preferred route does not always work because the route is not
correctly configured
To reproduce the issue:
1. In Settings, enable "Multi-Step Routes"
2. Edit the warehouse:
- Incoming: 2 steps
3. Create a product P:
- Type: Storable
- Vendors: a vendor V
- Routes:
- Manufacture
- Buy
4. Update on hand quantity:
- -1 at WH/Stock
5. Open the Replenishment page
- There should be a line with 1 x P
6. Set the Preferred route to "Buy"
7. Order Once
Error: a user error is displayed "There is no Bill of Material of
type manufacture [...] Please define a Bill [...]". This is
incorrect, it should generate a PO
The problem is simple: the Buy route is composed of one rule:
- Action: Buy
- Source Location: /
- Destination Location: WH/Input
But, when running the procurement, we first look for a rule to
fulfill the need at WH/Stock. We prioritize the rules of the
preferred route, but as explained above, the route does not contain
such a rule. Therefore, we use the other routes of the product:
https://github.com/odoo/odoo/blob/ba3bb9b701a382c4052ddb57392baeee32625937/addons/stock/models/stock_rule.py#L461-L466
And, because of step 3, it then finds the manufacture rule. This is
the reason why it tries to create a MO and why an error is raised
because of the missing BoM
OPW-3006960
closesodoo/odoo#109302
X-original-commit: 40a20d995d8613d3c82b7a2d62cde80eaad85bad
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
Before this commit, when the user cannot write on a certain field
an error is occurred to notice the user, he cannot write on that field.
The problem is the `on` is never translated.
This commit fixes the issue to be sure the whole error message is
translated.
closesodoo/odoo#109288
X-original-commit: 5098c59cc6d1a853210f8c4f5340f0d4ee8dd883
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
in python code is missing '_' so name of view cannot be exported
translated
closesodoo/odoo#109287
X-original-commit: 6a8c0e68d3d1ce6d700a3e4e145199292234e2f4
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
before this commit in the repair orders tree view, the unit of measure field is shown always without respecting the multi uom feature.
after this commit, the field will be shown only once the uom feature is activated in the settings.
closesodoo/odoo#109252
X-original-commit: 0796f8ee68c74e10b8f72531b64932e52b86cbef
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
exception is raised on grouping by non stored category field in stock quant model.
"Field stock.quant.product_categ_id is not a stored field, only stored fields (regular or many2many) are valid for the 'groupby' parameter"
Issue: https://github.com/odoo/odoo/issues/107933closesodoo/odoo#109207
X-original-commit: 4e280643aa6fdd8cf964f0e18e1ed6cd97d26cda
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
'State' field on stock move is indexed. Some domains on stock move state
are expressed like (state, not in, ('a', 'b', 'c')) instead of (state,
in, ('d', 'e', 'f', NULL)). The 'not in' domain won't the index and thus
will be relatively slower
closesodoo/odoo#109201
X-original-commit: 96f8321e894a9b7284cca8f201e5a2877b0b3a76
Signed-off-by: Rémy Voet <ryv@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
in sale_mrp module, the method `get_sale_order_count` get all stock move
with created_production_id = the current production order. Without
index, this request is significantly slow.
X-original-commit: 4c17020fb452f639d9395dccdd5fcefee109ed01
Part-of: odoo/odoo#109201
'odoo'
-EX: odoo addons path is '~/odoo15/odoo/...' or '~/15.0/odoo/...'
Basically not start with 'odoo' it will get error when running tests
case on this file
closesodoo/odoo#109135
X-original-commit: 336b966f7959b4a5e716b58b25ab13d7e3f92691
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Multiple progress records for the same onboarding and company_id (False)
were allowed to be created in several databases which resulted in crashes.
As simple stable fix, we'll select only the latest `onboarding_progress`
records created per onboarding when trying to compute the current_progress_id
and similarly for progress steps.
This will be cleaned with an upgrade script in master so that this code should
not be necessary for long.
Task-3101666
closesodoo/odoo#109257
X-original-commit: 06f2bd985c8b98e708120226daf66b20832000bc
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Currently, there is no facility for UPI payment for the invoice.
So in this commit, there will be a QR code for UPI payment in the invoice report.
closesodoo/odoo#109237
X-original-commit: e8e75678ee64fd9e4150ab7c9a9836d69b06c4db
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Jigar Vaghela (jva) <jva@odoo.com>
This commit will reduce the width used by the task name in form view to 75% of the
space available, except when in mobile view where it'll take full width.
The title doesn't need to take the whole space but only about 3/4 of it in form view
Side note: this may need to change once the mark-as-done 2 task is merged
because a new wider widget will replace the kanban_state widget
closesodoo/odoo#109258
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Send an rich HTML email from Odoo, it lands in spam whereas it would
land in inbox in 13.0.
The problem is due to a missing "MIME-Version: 1.0" header on the email.
This header is correctly set on both the html and text alternatives of
the messages but it should be set on the enveloppe too.
The problem is present in the newer EmailMessage mail API of python that
is used since 14.0. Using the newer API, it doesn't set the header on
the enveloppe itself.
This reverts commit 8663f1e20727c315924bb20fc1de1accf3014c61.
opw-3098621
closesodoo/odoo#109212
X-original-commit: c480d2bf1de7b70892130e74bb7a8d4003a8a783
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Julien Castiaux <juc@odoo.com>
This will allow to get the latest taxes.
closes odoo/odoo#109222
Task: 3111528.
Related: #84918, #107158
X-original-commit: 521c80477f9a664bb732ec54d18bdcf1b828072b
Signed-off-by: William André (wan) <wan@odoo.com>
Commit [1] attempted to fix unexpected behavior when copy-pasting from a
<pre> to a <pre>, where the pasted text was smaller the intended, and
preceded and followed by new lines. The chosen approach had uninteded
side effects though as it removed any empty paragraph after the <pre>.
The source of the issue it tried to fix was that the pasted <pre> was
inserted as a new <pre>, splitting the existing element in two in the
process, instead of simply inserting the text content.
[1] 449cacf
task-3086603
closesodoo/odoo#109208
X-original-commit: dfcc3abe3396eaf764c3c3c8510b654649ed82f8
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The insert command ends with setting the selection to the "right" of the
last inserted node. However, it did this without checking if that
position was valid for the selection, so we could end up with the
selection directly within the root of the editor. This corrects it if
such is the case.
X-original-commit: 722cf3bf11fcc9839677837018c1389d65b3f4fa
Part-of: odoo/odoo#109208
Before this commit, if the helpdesk module was installed, the title of
the salesperson data was changed from "Your contact" to "Salesperson"
for portal users. This did not add any value and the title of the tab
also became "Salesperson" which we do not want. This commit allows to
keep the title "Your contact" above the salesperson information and to
not change the tab title.
Steps to reproduce the problem fixed by this commit:
- Run Odoo enterprise with helpdesk and sales installed.
- As the admin, create a helpdesk ticket with Joel Willis (portal user)
as the customer and save.
- Click on Joel Willis, select the "Sales & Purchases" tab and set a
salesperson.
=> Log in as Joel Willis and on /my, you will have "Salesperson" as the
title of the tab. This bad behavior is due to [this commit] that added a
title above the salesperson information. But with this change the title
of the tab was also impacted. Then [this other commit] added a default
title above the salesperson information. We can be satisfied with this
default title which does not alter the title of the tab.
[this commit]: https://github.com/odoo/enterprise/commit/700e9dec4a5c9fca354e063d6a85b0514832c84c
[this other commit]: https://github.com/odoo/odoo/commit/d5c66ca1fa5d0f364241636bd502342c1d4ee9ac
opw-3103718
closesodoo/odoo#109138
X-original-commit: 1ebeec9dc2ea9c4a2051b06118f47a440dd5e470
Related: odoo/enterprise#35444
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, the lists of supported currencies by payment
provider were hard-coded in the Python scripts, which made them
unavailable to the users.
With this commit, the implemented initial lists of supported currencies
are displayed on the form view and are editable, because Odoo lists may
not be up-to-date. Empty lists do not trigger any filtering on the
payment providers to access payment methods.
For Authorize.net and Asiapay payment providers, the specific
`(authorize,asiapay)_currency_id` are removed and the generic payment
provider field `available_currency_ids` is restricted to a single-item
list when one of those providers is enabled.
task-2926016
closesodoo/odoo#101018
Related: odoo/enterprise#34158
Related: odoo/documentation#2788
Related: odoo/upgrade#4069
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Steps to reproduce:
1. Customer invoices
2. Upload button
3. Choose a PDF
4. The created invoice does not display the pdf preview
Related commits: a644766 and 0ab0a92
closesodoo/odoo#109166
X-original-commit: 7cf3f11d5072c2655802e38757b63293a9cf9d48
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Ricardo Gomes Rodrigues (rigr) <rigr@odoo.com>
This commit allows to debounce the events of the RangeUserValueWidget so
that the user can use this widget with the left and right arrows without
having a lag effect (especially on the image quality option).
In addition, steps were added in the website_gray_color_palette tour to
let the time for the debounce to trigger the changes.
task-2601533
closesodoo/odoo#109165
X-original-commit: dddec7489f5cb4e48368684a8783015517c394ee
Signed-off-by: Bojabza Soukéina (sobo) <sobo@odoo.com>
currently in the expense refuse form view the reason field is too compact to enter a reason in the field.
Expenses -> My Expenses -> My Reports , open any submitted expenses and click Refuse button.
closesodoo/odoo#109157
X-original-commit: 5fda586cc9f738471c6b34fd982bb80e5dd259d3
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
All the localisation should be written in english and then translated to the native language of the country. In this case, the mexican localisation was written is spanish, this PR translate all the module in english and add the corresponding PO file in spanish.
closesodoo/odoo#108725
Task-id: 3089239
Related: odoo/enterprise#35247
Signed-off-by: Laurent Smet <las@odoo.com>
This commit separate the templates, one for the card and another one for
the menu (the ellipsis dropdown).
The new template, called 'kanban-menu', will only contain the dropdown.
Note that, this behaviour is the same as the one used for the kanban
tooltips.
closesodoo/odoo#107589
Task-id: 3096776
Related: odoo/documentation#3284
Related: odoo/enterprise#34962
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
add documentation link for batch transfers, quality control and expiration dates in stock settings
closesodoo/odoo#107190
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
The module l10n_de contains the Tax report for the germany, it needed to be translated in english and then back in german thanks to a PO file. This Pr does exactly that.
closesodoo/odoo#106324
Task-id: 3059115
Related: odoo/enterprise#34323
Signed-off-by: Laurent Smet <las@odoo.com>
Ideally, we develop in English any localization (then translate to the domestic language, in this case German) All the module has been translated in english and then a .po file has been create to translate back in German
+ correction of a test not working anymore cause it was searching for the name in german
Task-id: 3059115
Part-of: odoo/odoo#106324
All emails sent from the chatter start with "Re:" followed
by the name of the record. The name of the record alone is sometimes not enough for
the followers to understand what the mail is about.
Additionally, "Re:" does not make sense when starting a conversation.
This commit gives better default subject
for event registrations and allows thread models
to override the default subject of messages.
This also removes "Re:" from default mail subjects.
Task-2833215
closesodoo/odoo#95817
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Continuing the work of making Chrome a less bloated component with no
clearly defined responsibilities, this commit extracts the DebugWidget
out of the Chrome component and registers it as a main component
instead.
closesodoo/odoo#108891
Related: odoo/enterprise#35406
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
The getFileAsText function can be replaced with the now well supported
Blob.text() function, the nextFrame function is used in precisely one
place and is needlessly complicated.
Part-of: odoo/odoo#108891
Previously, the error handling was done inside of Chrome. This is
unecessary as none of the error handling code needs access to the Chrome
instance. Instead, this commit moves the error handling to standard
error handlers.
This commit also removes a bunch of ad-hoc error handling code that was
doing try/catch around some RPCs, only to catch the error that happens
when the client is offline. In a lot of those cases the code would
display any other type of error as an unknown error instead of letting
the error service do its job and in almost all cases the only difference
with the default handler is that the offline message was slightly
customized to tell the user more precisely which operation failed, which
doesn't seem necessary.
Part-of: odoo/odoo#108891
*: pos_hr, pos_restaurant, pos_six
The Chrome component a bloated "god component" that coordinates entirely
too many things which makes it hard to reason about, navigate, and
debug.
This commit extracts the navbar section of the chrome component into its
own component, and makes the sound player into its own self-contained
service.
This commit also merges the ChromeAdapter component into the Chrome
component, there is no reason for these to be two separate components.
Part-of: odoo/odoo#108891