Create record A on form view, on which a dynamic domain is added by an onchange.
Switch to kanban view. Quick create a record B. Click edit.
This sends you to the complete form view to edit the record.
The dynamic domain of A is still applied.
When discarding the changes, the _domains attribute was not reset.
Example of a model on which this flow can be reproduced is helpdesk.ticket,
with _onchange_partner_project providing the new _domain.
test courtesy of @aab-odoo
opw 1920874
closesodoo/odoo#30308
Have one move with
- one debit in receivable with a partner which has a partner.category on it
- one other debit in receivable, without a partner
- one credit wherever
Open the aged partner balance report, filter partners on the relevant tag (partner.category)
Do the same with a move with an earlier date that will put the amounts in a different column
Before this commit, it crashed because some result variable did not contain
the key "False"
After this commit, it doesn't crash
OPW 1933749
closesodoo/odoo#30603
When the function '_select_seller' in stock warehouse is called, a
datetime is passed to it. But the method needs a date, so we modify it.
OPW-1930264
closesodoo/odoo#30563
Have a journal with 1 unpaid invoice and 1 refund to be paid too
Before this commit, the data on the journal's dashboard for unpaid invoice
was the sum of the refund and the invoice
After this commit, the amount of the refunds are substracted while
the amount of invoices are added
Also, the behavior is harmonized across other amounts
that display on the dashboard and tested
OPW 1924388
closesodoo/odoo#30395
In an HttpCase test, when the browser_js method is used, an optional
javascript code can be used to check that the page is ready to execute
the test.
When no 'ready' code is given it defaults to check the
'document.readyState' status.
In some rare cases (discovered by @Xavier-Do) this status is checked on
the 'about:blank' page. As the page seems ready, the test code is
evaluated and fails.
With this commit, when no specific ready code is provided, the test will
wait for a chrome devtools event that ensure the page is fully loaded
before starting the test.
closesodoo/odoo#30584
Description of the issue/feature this PR addresses:
Order of merged pdf reports when attachment_use = True
Current behaviour before PR:
When in a report the "Reload from Attachment" option was selected
(attachment_use = True), and multiple pdfs were printed, the singular pdfs
were stored in a dictionary and appended to a list and thus merged in a random order.
Desired behaviour after PR is merged:
By mapping the pdf with their source record, and sorting the list with the table _order of
the source records of the pdfs, we seek to have an ordered output pdf.
opw 1915685
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#30402
When in a report the "Reload from Attachment" option was selected
(attachment_use = True), and multiple pdfs were printed, the singular pdfs
were stored in a dictionary and thus merged in a random order.
Now, we make a list before merging them and sort it with the table _order of
the source records of the pdfs to have an ordered output.
opw 1915685
- Create a SO, keep it as draft
- Click on 'Send by Email'
The name of the attached PDF file contains `_draft`.
This doesn't really make sense anymore, since the SO will be set to
'Sent' right after sending. Therefore, if sending a second time,
`_draft` won't be added to the filename.
opw-1930282
closesodoo/odoo#30367
- Activate debug mode
- Go to the Accounting Dashboard
- In Vendor Bills, click on 'Journal Items'
A crash occurs because of the concatenation of a `bool` and `str`.
In this case, the `action['help']` is `False`.
closesodoo/odoo#30351
Before this commit, the condition and the field on which it applied were wrong
That is, when both the user and the partner were inactive, the message saying that
the partner was still active displayed anyway
After this commit, we show the message only when the user is inactive but its
directly related partner is still active
OPW 1928247
closesodoo/odoo#30337
The content id of an attachement can contains a @, therefore
image contained in emails where sometimes escaped by html_sanitize
as if they were emails adresses.
Task: 1915251
closesodoo/odoo#30326
- Activate multi-company
- Create 2 S2S payment methods (Payment Flow: Payment from Odoo), one
for each company
- Connect as a regular user to `/my/payment_method`
The user has access to both payment methods, while he should only have
access to the method of his company.
opw-1920483
closesodoo/odoo#30558
- Install website_sale and website_sale_delivery
- Activate 'Terms & Condition' on the payment page
- Process a shopping cart
On the payment page, the 'Terms & Condition' checkbox is unchecked, but
the 'Payment' button is enabled.
Both `$checkbox.change` and `_onCarrierUpdateAnswer` set the `disabled`
property, and conflict.
We keep on the HTML node an object with the list of disabled reasons.
opw-1923459
Co-authored-by: Nicolas Lempereur <nle@odoo.com>
closesodoo/odoo#30504
On mobile the frontend menu navbar is an hamburger menu that open on
click.
If the option "Customize > Main layout | Affix Top Menu" is
enabled, there is two menu:
- one at the full top of the page
- one affixed to the top of the viewport (only shown if we are at least
scrolling 300px away from the top of the page)
But there is a side effect: when scrolling if the menu at the top of the
page is opened, it will be automatically closed => this makes sense to
avoid having two menu shown on the same page but is an odd behavior.
With this commit, the behavior is changed and when the menu is opened in
the top, the affixed menu is not shown (it only works if the top page
menu has no opened dropdown).
opw-1920310
closes#30564
use cases fixed:
1) go in the journal items, filter on unreconciled lines, pick just one and click on 'Action > reconcile', the manual reconciliation widget opens but you directly get the rainbowman and you can't do anything. It's not possible to reconcile the selected entry with a writeoff (to clear a customer account, for example).
2) go in the journal items, select 2 receivable lines for the same amount but that don't have any partner set then click on 'Action > reconcile', the rainbowman directly shows without processing the reconciliation.
To fix those issues, we now clearly bypass the regular methods in case we have active_ids and active_model == 'account.move.line', since they weren't adapted anyway.
also implement real error message when selected lines don't have the same company or account (currently it's displaying a rainbowman): see error messages in 'reconcile()' in account_move.py
OPW #1919727 and #1930957
Co-authored by wan-odoo
closesodoo/odoo#29771
In the invoice list view, select one or more invoices
click on the action > register payment
In the wizard, put an amount inferior to the sum of invoices amount
Do a write off
Before this commit, the write off was ignored and the invoices not marked as paid
After this commit, the write is written, and the invoices marked as paid
OPW 1920839
closesodoo/odoo#30465
Modifying less files and saving them using the web editor can raise
and error. The error is due to the way odoo save the modified file.
It extends the view containing the URL of the file by filtering views
related to the xml bundle id and keeping those that have the said URL
in their content.
This lookup fails to give just one result in case there are multiple
file containing the said URL. This fix change the filter from a
bare `if url in view.arch` to a correct xpath lookup.
The "/web/static/src/variables.less" less file was one of the
problematic files.
opw-1889794
closesodoo/odoo#30186
Create any module that inherit 'res.lang'.
Define any new field that is added with that inheritance.
Install that module. Then try to uninstall it. Traceback ensues.
When trying to write 'state': 'uninstalled' on the module,
the prefetching tries to read a column that has been deleted
by the _module_data_uninstall.
opw 1917369
closesodoo/odoo#30176
Fine-tuning of commit 92b4e2e866,
itself a performance fine-tuning of commit b7e2d47596
which added progress bar support for selection fields.
However it assumed that every record had a value in the selection,
whereas False is (nearly) always a possible value.
opw 1916472
closesodoo/odoo#30322
The follower's list has an ancestor (the o_chatter_topbar) that has a 33px size.
Thus it has not been given any max-height, so that it can overflow
that 33px limit.
But it also means that it can overflow the screen, without any scrollbar,
so long lists are unreadable and unusable.
We set the max-height to a reasonable value, allowing for scrollbars.
opw 1922062
closesodoo/odoo#30211
Before this commit, in the config bar (Sales or Invoicing) when you configure a payment
acquirer, it was deployed in test mode, and not in production mode. Note that, the config
bar wizard asks for the production credentials.
Now, when you configure a payment acquirer, from the config bar, the acquirer is deployed
directly in production mode.
opw-1918412
closesodoo/odoo#30319
Currently, a partner is considered a portal
if he has no users
or
if at least one of his users is portal.
This causes problems if an employee has two users,
one portal, one employee
and gets notified in a thread (e.g. @ Marc demo):
The email sent won't contain the action buttons (e.g. view opportunity)
because the employee is considered as portal.
A partner of an employee can have multiple users
linked if at some point two partners were merged,
and the partners had each a user, one a portal
and the other an employee.
This revision changes this behavior,
to consider a user as not portal (employee)
if one of its users is not a portal (an employee).
This is uniform with to the behavior of the
`share` field of `res.users`,
which is `True` when the user is part of the group employee.
```
user.share = not user.has_group('base.group_user')
```
opw-1914103
closesodoo/odoo#30314
- Set valuation to FIFO
- Make a PO for a product
- Validate the picking
- Execute the Inventory Valuation report
- Apply group by Category
- Click on the 'Valuation' info button
A traceback occurs because of the usual `group_by` context key which is
kept.
opw-1918915
closesodoo/odoo#30313
OPW 1918926
Current behavior:
The sql query groups by date,id in a intermediary table instead of the result. This allows to get data in the wrong order if the statements were not produced sequentially. The fill values are computed in the wrong order and may override correct values.
Desired behavior:
There is no override of the values correctly computed.
closesodoo/odoo#29936
Open a pivot view with default filters automatically activating
Disable those filters
Change the groupBys on the rows and cols of the pivot
Save your result as a favorite filter
Before this commit, the filter did not contain the context information for columns groupby
Also, the search view did not exploit the context of the new filter as it should be
After this commit, the flow works as expected
OPW 1913732
closesodoo/odoo#29415
Before this commit, there were not specific view for the mobile devices.
The analytic account views were used.
Now, there are specifics views for the timesheet in the tasks.
opw-1913371
closesodoo/odoo#30309
Open studio to modify the widget displaying a relational field.
The report_layout widget can be selected, say, to display payment terms.
Obviously it doesn't make sense.
We remove its supported field, as the field is not generic
(indeed there is only one use for it in the codebase).
opw 1919369
closesodoo/odoo#30303
Define a field on a model as:
- o2m to res.partner
- the field's column, hence its name, has capital letters in it
(studio does that)
create two objects of that class, each one linked to a different partner with the new o2m
merge the partners
Before this commit, the object linked to the second partner, was deleted
This was because merge partner sql requests did not quote the column name
After this commit, the second object still exists
OPW 1925060
closesodoo/odoo#30300
The 500 page has `session.is_frontend === undefined` as it has its own
whole HTML template.
In that case, the ajax.loadXML is not done, making the tour crash when
visiting a 500 error page.
This is needed for #29957 that has a test tour on 500 error page.
closesodoo/odoo#30240
Define a field on a model as:
- o2m to res.partner
- the field's column, hence its name, has capital letters in it
(studio does that)
create two objects of that class, each one linked to a different partner with the new o2m
merge the partners
Before this commit, the object linked to the second partner, was deleted
This was because merge partner sql requests did not quote the column name
After this commit, the second object still exists
This commit is tested in v12.0 with PR #30300 only. In v10.0 it is not testable as
the model concerned is in CRM, and that no new fields in business modules can be added in stable
OPW 1925060
closesodoo/odoo#30301
Before this fix, in studio when the user select the field then focus out
then focus in and selected a child field, an exception is triggered because
the last page is visible but the data are removed.
backport of 12.0's 9eef25ae0a
opw-1928453
closes#30277