Create an invoice in date1 with a tax due based on payment (cash basis)
Create a credit note in date2 for the invoice (with date2 > date1)
Set tax lock date in date3 (with today > date3 > date2 > date1)
In the invoice add the credit note as payment
The system will block the action, because the created cash basis
entry would use as date the most recent between invoice and credit note,
which is previous to the lock date.
opw-2730106
closesodoo/odoo#98425
X-original-commit: 087e967f6ebf6e5829ec1d72a672841f8d543d4a
Signed-off-by: William André (wan) <wan@odoo.com>
In case several xml_ids target the same record, now we show an icon with
other xml_ids (not the first one) as tooltip.
task-2954293
closesodoo/odoo#98139
Signed-off-by: Jérémy Kersten <jke@odoo.com>
The error message now shows that a VAT tax must be added to that line
and that if it is already added, it may be misconfigured. This improves
the functionality since previously it showed that there should only be
one VAT tax and that could generate confusion in some cases
[CLA] add new members to Adhoc CLA
closesodoo/odoo#97640
X-original-commit: 16200f80cd8ae7a471725833655a06fe049b5b4b
Signed-off-by: Josse Colpaert <jco@odoo.com>
PURPOSE
Have more reliable tests.
Better spot side effects coming from sub addons.
Lessen non deterministic counters due to local db.
SPECIFICATIONS
Make crm, event and mail performance tests post install.
Update query counters with
* local values (install module only with enterprise activated);
* community / enterprise runbots (if value is different);
* some notes on non deterministic issue if known;
Task-2925606
closesodoo/odoo#96446
Related: odoo/enterprise#29726
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Reproduce steps:
- Create P1: storable, tracked by SN, manufacture
- Create C1: storable, tracked by lot
- Add 100 unit of C1 in Stock location
- Add 2 unit of P1 in Production location
- Create BoM for P1 with C1 as component
- Create MO for 2 unit of P1 > Confirm > Mass Produce > Generate Serials > Apply
=> Traceback on ensure_one()
In mrp_production.py in _split_productions(), the 'move_id' field is removed before unlink() is called in order to avoid calling recompute_state().
As move_id is not guaranteed to exist, we need to check before using it.
OPW-2878461
closesodoo/odoo#98391
X-original-commit: 6f2b7af37468d97b8dd4eb6c8e4bdcbaf472a331
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: DavidFesquet <dafr@odoo.com>
Since the PR hiding the screen sharing button on mobile [1], starting a
call result in tracebacks. The issue is that the code is using `env.device`
which is only available in the legacy env while discuss works with the wowlEnv.
In order to solve this issue, let's use `messaging.device` instead.
[1]: https://github.com/odoo/odoo/pull/97947closesodoo/odoo#98400
X-original-commit: 5fb6ea52ef876939a316bfc289237b443089f37b
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
*: hr_org_chart,l10n_gcc_invoice_stock_account,mail,point_of_sale,
purchase,website,website_sale,website_sale_autocomplete,
website_slides_survey
Some commit have added old Bootstrap 4 classes after the merge of
Bootstrap 5.
Note that it's not possible anymore as the merge bot is now able to
detect it.
closesodoo/odoo#98349
Related: odoo/enterprise#30551
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
In legacy, when you have a label with a string attribute that is empty,
that label is rendered as empty. In the new form view, when the string
attribute was empty we would fall back to the default label for that
field, which is incorrect.
This commit fixes that by not rendering labels that have an empty string
at all.
closesodoo/odoo#98237
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Before this commit:
When we want to change the background color of a button, clicking on that button
will occur traceback(dropdown is not a function).
After this commit:
Traceback will not occur by initializing the dropdown component as it has
converted into the OWL component.
Task-2916277
closesodoo/odoo#96508
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Have a sequence of bank statement out of order
i.e.
|id| date |
|--|--------|
|01|20/07/22|
|02|21/07/22|
|03|22/07/22|
|04|18/07/22|
|05|17/07/22|
|06|16/07/22|
|07|15/07/22|
Adding more out-of-order bank statement will trigger recomputation in
all the next (chronologically) statements.
As the records to recompute are ordered by id, it may occur that the
first statements to recompute have the highest date and cause a
recomputation recursion exceeding the limits
opw-2925984
closesodoo/odoo#98373
X-original-commit: f675222786a9f57199117d38fca529dd1b0c2104
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Steps to reproduce:
1. Install hr_expense,inventory
2. Enable unit of measure in the invetory setting
3. Create an expense product with a uom
4. Switch to mobile display and refresh
5. Try to create a new expense, the quantity field is not visible
Cause:
In 15.0 it was decided in PR #68387 to switch from the selection widget to options. This changed the css of the element.
Solution:
Checking the entire codebase with the following regex "<div.*class="o_row".*\n.*class="oe_inline".*\n.*class="oe_inline".*\n.*<\/div>"
in order to find an other usage of o_row with two inline element yielded no result other than hr_expense. In order to minimise the amount of changes,
a local fix of the styling is probably more appropriate.
opw-2924276
closesodoo/odoo#98336
X-original-commit: 0754f71b5e4760b1956f196f50bd6550e5fc41e0
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Some fields in composer model allows to control generated messages or emails
values. However they are not available in the form view. In this commit we
add them in form view as invisible, as a first step towards cleaning the
composer code and usage.
Next step will be to cleanup composer code to remove the onchange based on
template and have real computed fields. Those will require fields to be
available in views so adding them is a necessary first step.
Some tests are added to see the usage and purpose of some fields. This helps
having a better code coverage.
Query counters update when using the Form tool
* adding subtype_id: 2 queries
* adding author_id: 1 query
Task-2816845
Prepares Task-2088884
Part-of: odoo/odoo#98287
Purpose is to better spot field and classify them by usage. This code will
be modified soon and this prepares future modifications.
Task-2816845
Prepares Task-2088884
Part-of: odoo/odoo#98287
When sending a mass mail through the composer, if the field ``reply_to`` had to
fall back to being ``email_from``, reply_to would take the value of the template
syntax instead of the rendered value.
This is notably the case when mass-mailing invoices through the accounting app.
Resulting in reply_to fields such as: '{{user.email}}'
On some mail clients (including mailhog), this could also result in template
syntax being shown as part of the subject or sender field.
This commit fixes that by correctly taking the rendered value of 'email_from'
Task-2816845
X-original-commit: e320b852e8f1958ac3dccaa5333420bb7b8d8f3d
Part-of: odoo/odoo#98287
FWD-PORT: updated to new test files, and tests are more in-depth since v14
When sending a mass mail through the composer, if the field ``reply_to`` had to
fall back to being ``email_from``, reply_to would take the value of the template
syntax instead of the rendered value.
This is notably the case when mass-mailing invoices through the accounting app.
Resulting in reply_to fields such as: '{{user.email}}'
On some mail clients (including mailhog), this could also result in template
syntax being shown as part of the subject or sender field.
Task-2816845
X-original-commit: b87df6664908615bdf57bf16e239a10c3f7bf89b
Part-of: odoo/odoo#98287
Before this commit, the state selection field was positioned
on the left of the sheet, just above the title. Now, it is
positioned on the right of sheet.
This commit also fixes the text displayed by this field by
using the value of the fields (normal;blocked;done)_legend.
Finally, this commit removes the last uses of the deprecated
field `kanban_state_selection`.
closesodoo/odoo#97765
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
This commit completes the style of the tags of m2m_tags field.
Tags did not have correct colors and had border.
The commit also fixes the m2m_tags_avatar field for the same reason
as well as a traceback when clicking on the remove tag button.
closesodoo/odoo#96654
Related: odoo/enterprise#30012
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
The fix that removed the loading attribute of images was targeting
the wrong method `_createWysiwygInstance`.
In 15.0, the method does have a typo (`_createWysiwygIntance`).
closesodoo/odoo#98363
X-original-commit: 7a352330094ee2e267f29d9f479b4e31e90dbec6
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
/my/account controller blocks name/vat/company_name updating if there are issued invoices.
However Before this commit, user can change name via /shop/address page
STEPS
1/ install sales, eCommerce,inventory,Accounting
2/ create a sales order from the portal page, validate and create an invoice from SO and post it
3/ Try to change the name from the Portal > Account
Result - not possible = correct
4/ Place a new SO by the same portal user and edit the name on the address before proceeding to checkout
[1]: https://github.com/odoo/odoo/blob/1f49528a4b198e8912beb33be921d2855c694e2e/addons/account/controllers/portal.py#L111-L113
opw-2848251
closesodoo/odoo#98335
X-original-commit: 3c8337d17c23779ef265cb5037243b533725c494
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Before this commit, if the mutation records would contain records that
would cancel each others, those change would be listened and considered.
For instance:
- Mutation 1: Adding ID on element A
- Mutation 2: Removing ID on element A
When processing the mutation records, it is useless to consider those
2 as the Id of the element A is the same before and after the mutation.
This led to multiple issues, especially in case where some elements have
the same branding (and are thus the same field/xpath).
In such cases, the editor is replicating the changes made on one of them
to the others to keep the "same" fields sync'd.
For instance, if you go on an event page and try to modify a date, the
change will be replicated at multiple place in the page which are
actually the same t-field.
When replicating those changes, somehow the jQuery Sizzle ID changes
were listened, leading to infinite loop of mutation observer.
Step to reproduce:
- Install website
- Go to any page and enter edit mode
- Click on the navbar and in the right panel select Vertical header
- Activate the CTA option in that navbar right panel (should already be)
- Click on the CTA button
- Try to edit the URL in the right panel or any link option (style etc)
The changes will be ignored as the button's section is being re-rendered
every 50ms infinitely.
On chrome you can easily see it by watching the DOM in the dev tool. The
section will blink again and again, hinting about DOM change.
opw-2893480
closesodoo/odoo#98331
X-original-commit: 97c712e81692661fc9bc65e0810abc4dc017ed87
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
If you have only blocking level warning/info and
the batch is bigger than 25, then it will generate
an infinite loop. In order to avoid that, when an invoice
is still to be signed we put it in error, also because
a manual intervention of the user is required anyways.
closesodoo/odoo#98322
X-original-commit: a707934ac0494b707975b96c18fddfd7b5ef8b9f
Signed-off-by: William André (wan) <wan@odoo.com>
Before this commit, the logo height scrolled option was displayed even
if there was no logo.
It was because the condition to display or not this option (in the
"_computeWidgetVisibility") had not been updated correctly when the DOM
of the navbar was refactored.
task-2800680
closesodoo/odoo#98321
X-original-commit: 2b2ff732914e6c491e48540958bec967a3acfe33
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Currently the test in stock_account/tests/test_stockvaluationlayer.py for Anglo-Saxon accounting is slightly wrong as it uses a company that can change depending on which l10n is installed (mainly coming from the company's country_id and account_fiscalcountry_id). This means that the test might be running with different settings from one time to another (= non-deterministic) and fail in some circumstances.
This commit fixes this issue by making this test an AccountTestInvoicingCommon test instead. This allows for the use of a test company, always the same. Of course, a few items have to be re-created since they can't be inherited anymore.
closesodoo/odoo#96320
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Since [1], the ir.ui.view name_get can suffix the name with the website,
something like `Main Layout [Website 1]` instead of just `Main Layout`.
This is fundamental when managing a DB as with the multi website / COW
mechanism, views are duplicated, making it impossible to know which one
is coming from which website (or is the generic one) when selecting a
new record in a field input.
While it worked great for the autocomplete list, the default value when
loading the form/list views were still not displaying the website.
You thus have the same issue: you have to navigate to that view to
figure which one it is.
When managing multi website DBs, this is becoming tricky.
This commit also adds that behavior to the value shown when loading a
form/tree view.
[1]: https://github.com/odoo/odoo/commit/ea3a2ab6788980a8961d9b9a3f88bc13c15a3c46closesodoo/odoo#98320
X-original-commit: d66f8649a8f18fc67a595dd5254d1aeb680c29c6
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
As part of hr_holidays B2B, the holidays allowances were moved from hr_leave_type to hr_leave_allocation.
This didn't allow to take a leave longer than the maximum duration of an allocation. Also, despite all the
allocations could have enough days for a certain leave, it was not possible to use all available days without
splitting the leaves across the different allocations.
This commit moves the holidays allowance to the hr_leave_type to remediate the issues described above.
task-2834887
closesodoo/odoo#98317
X-original-commit: 8c37d5c7cc397e517c43c1ec13a131b4b35e48b7
Signed-off-by: phwa-odoo <phwa@odoo.com>
So that the link works...
Task-2954531
closesodoo/odoo#98310
X-original-commit: 617a4b8245315cbd47f83bed3e2ad74b105b5975
Signed-off-by: Florian Charlier (flch) <flch@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, the popup for payment wasn't open after signature.
This is because Bootstrap no longer uses jQuery and jQuery .trigger
only calls jQuery handlers.
See 'o_sale_portal_paynow' button with data-bs attributes on it.
closesodoo/odoo#98290
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
The model had name_get, but not _name_search, which leads to difference between
what user sees and what he get as search results.
This patch doesn't fix the issue completly, but adds more search results on
searching just by account move (e.g. invoice) name.
STEPS:
* open menu Analytic Items (account.analytic.line)
* make custom filter *Journal items contains "INV/"* (
`[["move_id","ilike","INV"]]` )
BEFORE: no items found even if you see such analytic items
---
opw-2691495
closesodoo/odoo#98289
X-original-commit: 84f440c7b0d18c3c9f9dd57d5352f1da10fedf00
Signed-off-by: William André (wan) <wan@odoo.com>
Automatically add `required` and `readonly` on identifying fields and
remove them from field definition.
Task-2955910.
* = calendar, hr, im_livechat, rating, snailmail, website_livechat
closesodoo/odoo#98283
Related: odoo/enterprise#30511
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, we had a crash when a user types something in a
searchbar in the website (on /shop eg) and do keydowns:
"Cannot read properties of undefined (reading 'nextElementSibling')"
BS dropdown doesn't use JQuery anymore and is therefore less permissive
with empty arrays. Also note that the logic is different between BS4
and BS5.
To fix this, we need to make sure that all elements are in the DOM
before BS dropdown instanciation.
It's why we have to render the 'dropdown-menu' before the dropdown
constructor is triggered.
We also had to add the 'data-bs-toggle' attribute to let BS find it
to set '_element' (which must be the previous sibling of the dropdown-menu).
This data attribute was probably not set before because in this case
the BS dropdown is not used on a button or a link as documented;
we use it as an autocomplete functionnality.
closesodoo/odoo#98254
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
# Before this commit
Serializing a date would apply the TZ offset of
the luxon's DateTime object in which it is contained.
This sometimes led to output the wrong date.
# After this commit
Serializing a date contained in a luxon's DateTime object
will not apply any TZ offset and will output a serialized version as-is.
# Note
If you still want to apply the TZ offset, you should do it manually:
const toSerialize = date.setZone("utc");
const value = serializeDateTime(toSerialize);
closesodoo/odoo#98194
Related: odoo/enterprise#30469
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
* website_sale
That tour keeps failing. A fix attempt was made with [1] but wasn't
enough.
The tour was actually useless as since [2] google analytics dashboard
was not part of the website dashboard anymore (due to google not
allowing GA4 dashboard to be embed).
The tour, which was initially made to ensure that google analytics was
correctly shown even if not yet connected to was then not useful
anymore.
The opportunity is also taken to rename the misleading ID of related
records still mentioning Google.
[1]: https://github.com/odoo/odoo/commit/1a191357e3ac0c4542b2fc7c3a2aee18dc54699d
[2]: https://github.com/odoo/odoo/commit/985e49bdb5e22fa197ba267aa41d7a8ba7e50550
runbot-4498
runbot-4499
runbot-4466
closesodoo/odoo#98090
Related: odoo/upgrade#3774
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
In the participation screen (user_input tree view), the users can
see the email and contact name of the participants. However, this
is fixed. Those will be empty for live session participants.
Therefore, make those optional but show them as default. Also add
the nickname field in the view before them, not shown by default
but optional, in order to be able to see nicknames for live session
and identify the participants.
Task-2928143
closesodoo/odoo#97902
Signed-off-by: David Beguin (dbe) <dbe@odoo.com>
Since the bootstrap 5 merge at [1], when you click on an image in the
Image Wall block, the modal no longer opens. This commit restores that
and adds a test to make sure this problem does not happen again.
Steps to reproduce:
- Drop the "Image wall" block in a page
- Save
- Click on an image
-> The modal does not open
[1]: https://github.com/odoo/odoo/commit/971e5a91aab96d36129a823e03f1f9f1b1293968
task-2937538
closesodoo/odoo#97053
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit aims to make it easier to remove a shape over a background
image.
Before this commit, we could only remove a shape by clicking on the
"shape" button in the background options (it was not easy to find
quickly), but with this commit we can now also remove it thanks to a
"remove" button that has been added next to the shape selector.
task-2827802
closesodoo/odoo#96788
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
* im_livechat, mail, snailmail, website_livechat
PURPOSE:
A `replace` command should be default while updating a field.
SPECIFICATION:
- If no command is passed while updating a field, add a `replace` command as
default.
- Remove all the existing occurrences of `replace` command.
Task-2851488
closesodoo/odoo#95885
Related: odoo/enterprise#30494
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
In this specific branch, populating the DB would systematically create a disbalanced move (id 835, balance -70.0)
This seems to be linked to the balance being equal to 0, and therefore considered faulty in the get_lines function.
We're still not aware of the wizardry explaining why it would happen specifically on this branch, but this should avoid this problem repeating.
closesodoo/odoo#94050
Related: odoo/enterprise#28607
Signed-off-by: Laurent Smet <las@odoo.com>
Purpose :
Improve multiple use cases while handling the Accounting part of Cash Discounts in Odoo.
When creating a Payment Term, the user can now specifically design an early payment discount through an additional part in the wizard.
This will, amongst other things, allow the user to choose in which way the tax should be computed on the discounted invoice (tax included/excluded).
The discounted amount and the conditions to fulfill are printed below the invoice PDF, as well as the details.
Registering a payment while filling the condition for an early payment discount will prefill the fields accordingly.
Reconciliation --> In the reconciliation widget, the logic of Early Payments Discounts are also applied.
Related : odoo/enterprise#28607
Task:2729038
Part-of: odoo/odoo#94050
PURPOSE
This commit improves the accessibility of the survey samples when no records
are shown, revamps the onboarding data, slightly modifies the integration
of test surveys and related filters, and adds a tour that is started when the survey
module is installed
SPECS
1. Remove the modal used to show the samples and show them on the empty screen
instead.
When no survey exists, the user gets the proposition of trying survey samples.
Previously, the user had to click on a button to open a modal showing the
different samples. Now, the samples are shown in the empty screen directly.
2. Revamp sample surveys data
Considering this is the data wa want to push forward, it needs to be as
relevant as possible while being "light" for the db.
3. Consider completed test surveys as completed surveys
Most people expect to see the test the just did counted in the completed
surveys counter in the survey view. The filter excluding the tests surveys has
therefore also been removed from the participation view.
4. Rename the filters related to the test surveys
"Tests Only" and "Exclude Tests" are more straight to the point than
"Test Entries" and "Exclude Test Entries".
5. Implementation of the tour
The tour suggests to the user to try and test a sample survey, and shows how
to check the results gathered for this survey.
6. Changed the target of the "test" button to "self"
Since the test action is used during the tour, the test page needs to be opened
in the same tab so that the tour can continue.
7. Added ids to some elements
These ids are used by the tour to identify which element is the current target
of the tour.
Task-2794884
closesodoo/odoo#87326
Related: odoo/enterprise#26661
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>