Because the JS cannot handle 1 or 0 being equivalent to true or false, the views should comply
Issues specifically arise in the kanban view when, instead of reloading every record with python,
the JS actually computes which record should be displayed by reinterpreting the domain
From a user point of view, on a fresh db with CRM installed, go to the app kanban view
Click on the contextual menu of the CRM kanban label, click uninstall
The modal opens, but click cancel. The kanban label of the kanban view has disappeared
This is due to commit 33ba61bfdb, which prevents reloading all the view
for performance purposes
This commit prevents the label from disappearing
OPW 1903534
closesodoo/odoo#28484
commit c6b0d36622 introduced a wrong
domain. The readonly should be added if the show_operations is false
OR state is done AND is_locked is true.
close#28595
On a form view (of model A), define a many2one (model B) with a [form|tree]_view_ref context key
In that view, have a x2m field (model C) with a different [form|tree]_view_ref context key
Before this commit, the second load_views (i.e. on the model C) crashed because
the wrong context key was sent to the server, which returned the view to which the _view_ref points
i.e. the view of the model B
After this commit, we clean the context of subviews loading, because those keys are only useful for the python
and one shot. Hence, there is no crash
OPW 1903780
closesodoo/odoo#28260
This fixes two issues relating to previews in the systray messaging menu
that are not linked to any document:
1. Clicking on such preview now redirects to Inbox
There was a traceback, because it was attempting to open a document.
2. Marking a read one of those previews now only marks this preview
It was marking all previews not linked to a document as read.
Task-ID 1891350
Task-ID 1907159
closesodoo/odoo#28462
Inspired from this commit: 90219a7e0a
It's not possible to modify the shipping area description on a product in
the e-commorce.
opw:1908308
closesodoo/odoo#28624
When the qunit tests runs they are expecting the new line to be the character 10,
but in windows the new line is 10+13.
The test has been updated to ignore the character 13.
closesodoo/odoo#28599
Each company should have their own inventory loss, production, scrap and transit locations in order to apply specific accounting configurations.
TASK 1882269
closesodoo/odoo#28508
Remove the barcode_scanner Boolean and always load the default nomenclature if
no other is defined in pos.config.
Because barcode scanners are seen as keyboard by the computer, they always work
in the point of sale. Because of this some clients begin using them without
activating the nomenclature in pos.config. Barcodes get only recognized if
search-fields are selected this way, resulting in clients complaining about the
workflow.
Enabling the default Nomenclature by default will have almost no effect on the
loading time of the point of sale and has no influence on the work flow if not
using a scanner.
closesodoo/odoo#28537
Archiving a warehouse didn't archive its related locations, routes and
rules.
So we now archive the related objects and add some constraints to avoid
having an inconsistent state in stock with archived warehouse.
TASK-ID: 30659
closesodoo/odoo#26555
When a product is selected for an expense, an analytic account (and analytic tags) can now be automatically selected based on the settings.
closesodoo/odoo#28673
We move the code from the 'post_init_hook' into a function tag, to be
consistent with the way we populate missing data when stock module is
installed.
TASK-ID: 1882269
commit 68dafa0620 introduced a solution to hide the Swiss QR code by default, by conditionning its display on the existence of an ir.config.parameter that one could manually add.
This commits creates the ir.config.parameter and relates it with a field in the accounting settings for more convenience for when we'd need to enable it
closesodoo/odoo#28654
This commit fixes two tests that became meaningless after tweaks
in production code:
- form_tests: use two char fields, as integer fields can't be
unset since rev. c62a4edcb
- pivot_tests: the button is disabled since rev. 4f4f111, but
simulating a click with jQuery bypasses the disabled attribute
This commit also removes unecessary overrides of mockRPC. Those
overrides existed because the attachments part of the sidebar
used to make a search_read RPC, but this has been removed at rev.
1dbb555.
closesodoo/odoo#28651
Purpose
=======
Before this commit, inputs (workdays or inputs) could not manage two lines having
the same code (Example: two holidays of the same type in the payslip period).
The result was a wrong computation as only one of the 2 lines was taken into account.
Without even warning the user.
Specification
=============
Put recordsets on the local dictionaries, where previously only a browse record was set.
This requires a modification on the salary rules to make them work (with multiple lines,
otherwise it is still ok).
Example: <field name="quantity">worked_days.WORK100 and worked_days.WORK100.number_of_days</field>
Should become <field name="quantity">worked_days.WORK100 and sum(worked_days.WORK100.mapped('number_of_days'))</field>
closesodoo/odoo#26386
Closing a Payslip Batch has to ensure that all payslips inside of it
are well calculated and closed. Otherwise some helpers (as `sum`) won't
work correctly because there are open payslips from the last month batch.
This action ensures that if there's a Payslip Batch with 200+ employees,
closing the Batch will complete the whole process including the accounting.
closesodoo/odoo#25755
Purpose
=======
If the lines have the same sequence, then the display could be random for these lines.
Specification
=============
Order on sequence, then code.
Co-authored-by: simosuu <simo.suurla@simonit.fi>
closesodoo/odoo#27124
Before this commit, the SSF would only set up edition views on o2ms at
the toplevel. This usually isn't an issue, but in some cases involing
onchanges on o2ms which themselves contain o2m, odd results could
happen as the second level would try to list the sub-o2m's fields in
order to cleanup its (possible absence of) values (cf the `subfields`
local variable in _cleanup_onchange), which would blow up due to the
missing `"edition"` key.
Fix by recursively processing o2ms and setting up their edition view.
Also fix the fields iteration in fvg processing: don't recurse inside
fields. There still is no support for embedded views (I think?) but we
should not try to treat subview fields as view fields, that could have
very bad results.
closesodoo/odoo#28645
As stated in issue #27752, some Debian packages are only recommended.
As a consequence, these packages are not installed on the Official
Docker image. In that case, if the user wants to install an Odoo module
that needs one of these package, the Docker container has to be
modified.
python3-qrcode and python3-vobject are now part of the latest Debian
stable (stretch) and the latest Ubuntu LTS (Bionic Beaver).
Also, they are pure python, and very small.
Thus, the Debian package can depends on them.
co-author: @sbidoul
Fixes#27752Closes#28588Closes#28371Closes#28372
Put the browser in timezone Sao Paulo (Or like West of UTC)
Trigger the autocomplete (and the subsequent search) on a date field
by writing a date (in the locale format) in the search view
Before this commit, the domain sent to the server contained the date as the day
**before** the one asked for in the input
This is because, the string input is parsed and gives:
input = 12/02/2018
When creating the moment object:
> since there is no explicit time, moment will interpret it as 12am (midnight)
> We force moment to consider the string as being UTC (function: moment.utc())
> the moment contains, as output the time ** 2018-02-12T00:00:00 UTC **
When getting the facet value for making the domain
> we call toDate on the moment object, which, according to the browser is UTC and will
be converted to the locale timezone before formatting
> And the domain will use the date 2018-02-11T22:00:00 Brazil/SaoPaulo
which gives the day before the one we asked for
After this commit, this issue doesn't arise, because we use the string representation of
the moment object in search_inputs (i.e 2018-02-12T00:00:00 UTC), to create a new one
*BUT* we create it with a date format that excludes the time from being interpreted.
Also, the resulting moment object in this case is not flagged as UTC anymore
OPW 1903224
The file relation_fields_tests.js was a huge 12K lines files for which some editors have a
hard time managing.
We have split it in 4 files to be more managable and removed remove unused data
and import.
closesodoo/odoo#28561
The `context.company_ids` variable seems mostly empty in the case of the
Manual Reconciliation widget. Therefore, we fetch the current company of
the user in the session.
Complement of e5c8071484Fixes#28270
opw-1904475
closesodoo/odoo#28541
Be in the timezone Australia/Brisbane
On an object, create a Meeting activity
Create the calendar event and set a start date "tomorrow" at 7:00am
Now go back to the object to see the activity
Before this commit, the activity appeared as due "today"
After this commit, it is due "tomorrow"
OPW 1891110
closesodoo/odoo#28576
Firefox when asked to block format (formatting over a block with
blockquote, h1, ...) has a special case for blockquote (it is documented
in https://developer.mozilla.org/docs/Web/API/Document/execCommand at
formatBlock command) and will wrap any element instead of replacing
existing block formatting.
Thus the code not expecting it was not able to remove a blockquote in
firefox once introduced.
opw-1903735
closes#28587
When we for example do ctrl+a in firefox, the selection is over the
container and not the content.
This is an issue when we apply a format, since the container could be
removed.
eg:
we have selection over `<pre>hello</pre>`, on firefox the selected
node is `pre`, on chromium it is `TextNode "hello"`.
if we remove the style, `pre` is deleted so firefox selection is
broken, whilst chrome has no issue since "hello" still exist.
There was also an issue when the selection was over the blockquote,
there was no error but the style could not be removed.
opw-1903738
opw-1903735
closes#28369
The hr_presence module recently introduced adds
a hook on the bus controller in order to execute
its very important and legally business, but this
hook brings an error as it forgot to propagate the
bus options.
Consequence: the bus_inactivity, responsible of the
bus.presence are not pass to super. So all user
appears offline.
closesodoo/odoo#28531
There was a code that on:
- a form that sent a mail
- with a custom file field
would set the file as attachments, but the code was dead because of a
typo in `if` statement order.
opw-1906883
closes#28525
In mail template a link with reference such as:
${object.user_id.signup_url}
are often used.
These are template directives that are replaced when the mail is saved,
so when editing in the editor and they are prefixed by "http://" this
breaks the link which is not wanted.
Now link beginning with `${` are not prefixed anymore to prevent
shooting oneself in the foot.
opw-1906695
closes#28522
In order to understand more easily the impact of an opt out
or a blacklisted contact on the interface, blacklist and
opt-out demo data are added.
Tests updated to only test mails on contacts created inside
the test environement and not with demo data.
Task ID 1892998
Closes PR #27674
Before this commit, you could only access the activity view of the
Contacts app via the activity icon in activity systray menu.
With this commit, all apps in the activity systray menu that support
the activity view now have this icon that redirects to the
corresponding activity view.
Also, the icon in the activity systray menu has been changed in order
to match the icon of the activity view in the view switcher.
Task-ID 1894900
closesodoo/odoo#28066
This reverts commit c42a130a98
and commit fb7ac56d65.
The runbot is using cross db logging and those commit were breaking the
mechanism. As a result, the master builds logs were empty.
If we update the runbot to use logging_type instead, the other versions
builds will be impacted hence this revert.
closesodoo/odoo#28512