- Set a TZ on the user different from UTC
- Export a record containing a datetime, e.g. the Order Date of a SO
- Import the file
The Order Date is changed on the record.
The data export is always in UTC, but the data import takes into account
the user TZ, which explains the difference.
There is no good way of solving this in stable. We have 3 choices:
1. Do nothing: the flow export then import the same data is broken, as
explained above.
2. Export in the user TZ: if the file is imported in a third-party
software, we break the flow.
3. Import in UTC: if the file is generated from a third-party software,
we break the flow.
Whatever the choice is, we either break a flow or keep an inconsistent
behavior. We choose option 2, assuming that in most cases the user wants
to export the data in his TZ, therefore keeping the values displayed. We
only do it in v12 in order to mitigate the impact on existing
installations. A proper fix should be discussed for v13.
opw-1915631
closesodoo/odoo#29576
The `export` method accepts a `context` parameter, but doesn't use it.
This actually hides an incorrect test: when exporting in French, `Bar`
should be exported as `titi`.
opw-1916511
When you try to change the accounting plan it sets off an access error.
To change the accounting plan it must delete and create some records in
the model 'ir.property' and none of the current security groups have
access to do it.
This issue was not present in the version 11.0 because in that version
the administrator was also the super-user.
In version 12.0 the administrator and the super-user were dissociated.
This was changed to level-up (sudo) the rights of the administrator
when the ir.property are deleted.
Note that, this fonction have two pre-existing constraints to avoid
issues when configuring an accounting plan: it can only be changed if
there are not alredy existings accounting entries;
and only the administrator can change it.
closesodoo/odoo#29493
- Create a new DB with `base_automation`, without demo data
- Switch to developer mode
- Go to Settings, then 'Load demo data', validate
A traceback occurs.
An error since the demo data in `base_automation_demo.xml` are pointing
to `model_base_automation_lead_test`, which is a test model. It is
therefore not created whithout demo data. The error is:
```
bad query: b'RELEASE SAVEPOINT "5159....."'
```
However, that's not the real crash. Indeed, in case the installation of
demo data crashes, `demo_failure_todo` is supposed to handle the
situation like a boss. But in this case, the DB cursor seems unusable.
Therefore, the following crashes like a gros caca:
``` python
todo = env.ref('base.demo_failure_todo', raise_if_not_found=False)
```
Solution: use a new cursor.
opw-1916918
closesodoo/odoo#29528
Have an invoice and a credit not in one journal
Go on the dashboard for journals
Before this commit, the count of invoices in draft took into account
both invoices and credit notes, while clicking on the button to see the invoices/credit notes
only showed invoices
After this commit, clicking on the button show both invoices and credit notes
It is worth noting that this is the behavior in v11.0
And that the way the dashboard is computed cannot allow to differentiate
within the kanban records, invoices and refunds as two separate buttons
OPW 1916135
closesodoo/odoo#29482
The _name_search did override the domain's search
by OR'ing it with a loose condition on the driver_id.
As a result if an upstanding Odooer added a strict filter on the driver_id,
it was ignored in favour of the loose one.
opw 1915639
closesodoo/odoo#29515
In case you edit your shipping address (that is the same for billing) you don't always
undersantad that you are editing at the same time the billing address.
opw-1914185
closesodoo/odoo#29484
Recent works in the orm (see [1] for example) changed the behaviour of
the server in the case of onchanges: it tries to optimize Odoo by
sending a minimal diff to the web client in onchanges.
Concretely, this means that the web client receives commands 4 (link to)
instead of command 1 (update + record data). It also sends a minimal
diff in that case. This is a big issue for the web client, because it relied
on the knowledge of the data from the command 1 to be able to evaluate some
modifiers.
The good news is that we can mitigate the issue in one case: we do not
actually need to evaluate the modifiers in the case of a command 4
(comming from the server), because we can assume that the record is
valid. So, we simply bypass the check in that case.
Note that this should fix most of the problem, but a deeper problem
still remains: a crash can still happen when an onchange modifies a
record in a one2many (but in a different page), and we also have a
modifier which needs to be evaluated.
opw: #1904514
[1] https://github.com/odoo/odoo/pull/29086closesodoo/odoo#29172closesodoo/odoo#29086
On a record with a large x2many, the web client does not load all the data of
the lines (because of paging). If a line is modified by an onchange, at some
point the client will determine whether lines are valid (all required fields
are provided). It is possible that the client cannot evaluate the validity of
the modified line because of missing fields. In order to avoid this situaion,
the server sends all fields on modified lines.
Set a BOM to create 10^k units of Product P, using n units of raw material R.
On R, put rounding to 1 unit.
Create a MO to produce 1 unit of P.
Since it needs n/10^k units and rounding is set to 1,
it sets 1 unit of R to consume.
Now "update" (quantity to produce) to 10^k'.
It correctly updates the quantity to consume.
However, since it doesn't update the unit_factor, when you "produce",
it will consume 10^k' units instead of 1.
We copy the way the unit_factor is initially computed when updating the lines.
opw 1903776
closesodoo/odoo#29067
The translation had wrongly `</ i>` which from a report broke some
initialization of some snippet of the website editor.
es_CO, es_DO, es_EC languages are not available in transifex so this
change is done manually for them.
opw-1907752
closes#29135
When installing ecommerce app in a fresh v12 database
the fields invoice_policy and description_sale were missing in
the product.template view form
opw:1911612
closesodoo/odoo#29059
Survey has troubles displaying correctly the datetime picker widget
especially when more than one has to be instanciated. This merge fixes
several issues related to the datetime widget when displaying the survey
in customer (front-end like) view.
See sub-commits for more details about each change.
This merge is related to task ID 1912194.
closesodoo/odoo#28966
The link "Manage your payment methods" didn't work on the website because
the variable acquirers is a list of records.
This list has been created in function "payment_method" with the route
'/my/payment_method'
opw:1913299
closesodoo/odoo#29142
1. Update tax Groups with N07-2018
Restrict Tax groups just to the 5 available in Norma 07-2018:
* ITBIS
* ISR
* ISC
* Propina
* Otros Impuestos
2. Do not use 'none' to hide taxes
This affect taxes reports, as those reports evaluate the
type_tax_use field
3. Rename Taxes and Description for N07-2018
4. Change group taxes name and missing childrens
5. Add account groups to template and CoA
6. Add various missing data
opw-1912626
closesodoo/odoo#27172
When printing the badge of an attendee, several information are not
shown. This is due to the BS4 migration.
Closes#29195
opw-1912074
closesodoo/odoo#29221
Revision on https://github.com/odoo/odoo/commit/cd34f6de727d5b3858420cff3c9d3c5995c4e75c
Before this commit, when receiving a new message from a new DM
or livechat, the newly opened chat window was automatically
focused and marking messages as read.
Chat windows that are automatically opened without any user
interaction, such as when receiving a new message from a chat,
should not be focused. Those chat windows are "passive", and
the user must click on them in order to have focus and mark
messages as read (the chat window is no longer passive as a
result). The bug has been introduced by the refactoring from
the commit above.
In fact, there was a very short period of time during which the
chat window was passive. However, due to the way chat window
server-side state synchronization works, the chat window was
automatically closed then re-opened. This resulted in some visual
flickering of the chat window ('open' > 'close' > 'open'), and
the conversation was automatically marked as read. This was a
consequence of the actions 'open' > 'close' > 'open' that removed
the passive property of the chat window.
Chat window server-side synchronization relies on a notification
that tells the state of the conversation. Due to bad design, this
notification had exactly the same format as the one for notifying
all browser tabs of a newly joined conversation.
This commit fixes the issue by distinguishing "channel join"
and "chat window state" notification, so that the former is not
treated as a chat window notification. It fixes the problem
because it was precisely the "channel join" notification that caused
the chat window to close and loose its passive property.
Task-ID 1914735
opw-1914371
closesodoo/odoo#29223
It has been reported that it would be nice to have font OCRB all over
the report and number in boxes (for the ISR version of amount with
boxes).
This commit do some tweaks and adapt positions and font-size to do this.
Also a shortcut for an account number can be used in switzerland
(see d9448d7389), but in the ISR scanline the account number must be
fully printed so this commit do the zero padding (on the middle part of
the account number).
opw-1903608
closes#29000
Commit 2ab6ce80d6 introduced an issue where the
URL for new job offer was added in the DOM even when website_hr_recruitment is
not installed.
This is a problem because the crawler tries to navigate that URL and returns an
error because the route does not exist without website_hr_recruitment.
closesodoo/odoo#29217
Commit a6e1eb9f0a
introduced the show_vat context key, that displays the Tax ID of a customer
after its name when present, similarly to show_address.
However it appears on the field when being edited, then disappears at save,
which is confusing.
Other unclean things tended to happen: you would have "name - taxid" on customer
field, but "name" on invoice address and delivery address.
Furthermore a client could edit the name manually to erase the Tax ID, and thus
recreate a new record for the same customer.
We introduce a method to clean the name from the Tax ID, and use it so that it
is directly the client's name that is selected at edit.
Note that we also replace the standard dash in the 'name - taxid'
by a figuredash (‒, U+2012) so as to avoid potential egregious splits
because of legitimate customer names.
Similar to commit: 3cbfc40303
(same thing for show_address)
opw 1911954
closesodoo/odoo#29189
Take explanation of
commit d94e8a0
but this time, have a suffix with a flavor of %(year)s
Before this commit, validating the invoice crashes
After this commit it doesn't.
OPW 1912954
closesodoo/odoo#29160
- When a payment is done through a `payment.transaction` the
communication should be the transaction's reference instead of its
invoices reference.
closesodoo/odoo#29187
On a record with a large x2many, the web client does not load all the data of
the lines (because of paging). If a line is modified by an onchange, at some
point the client will determine whether lines are valid (all required fields
are provided). It is possible that the client cannot evaluate the validity of
the modified line because of missing fields. In order to avoid this situaion,
the server sends all fields on modified lines.
closesodoo/odoo#29177
Once we log an exception via next activity in a production, we search moves that have been updated uphill to write the useful information about the change. The issue is by default, the key 'move_orig_id' is searched while some moves could be linked with 'created_purchase_line_id' key.
This commit avoid mapping 'move_orig_id' on empty recordset and so avoid a traceback.
opw:1911399
closesodoo/odoo#29087
Recent works in the orm (see [1] for example) changed the behaviour of
the server in the case of onchanges: it tries to optimize Odoo by
sending a minimal diff to the web client in onchanges.
Concretely, this means that the web client receives commands 4 (link to)
instead of command 1 (update + record data). It also sends a minimal
diff in that case. This is a big issue for the web client, because it relied
on the knowledge of the data from the command 1 to be able to evaluate some
modifiers.
The good news is that we can mitigate the issue in one case: we do not
actually need to evaluate the modifiers in the case of a command 4
(comming from the server), because we can assume that the record is
valid. So, we simply bypass the check in that case.
Note that this should fix most of the problem, but a deeper problem
still remains: a crash can still happen when an onchange modifies a
record in a one2many (but in a different page), and we also have a
modifier which needs to be evaluated.
opw: #1904514
[1] https://github.com/odoo/odoo/pull/29086closesodoo/odoo#29172
Fix Error:
`ERROR: syntax error at or near ")"
LINE 7: ... WHERE full_reconcile_id IS NULL and account_id IN ()`
This can occurs when:
- using write to some account like:
`some_account.write({'reconcile': True})`
closesodoo/odoo#29164
Doing the `read_group` on `sale.order` rather than
`sale.report` to get the quotations amount and count
significantly improve the performance (5x faster on big databases).
This is because `sale.report` is a view,
with a bunch of fields taking time to compute / fetch.
Besides, the algorithm to get the number of quotations
was an heuristic based on the "group by name" on the `sale.report`,
which was not as precise,
as multiple quotations could potentially have the same name,
and slowed down the query,
because it returned one line per quotation,
versus one line per team with this revision.
closesodoo/odoo#29139
The team pipeline dashboard fields
`unassigned_leads_count`, `opportunities_count`, `opportunities_amount`
do a big search on leads, filtered
by type (lead/opp), team, and unassigned user_id (salesman)
Adding an index on user_id, team_id, type significantly
improves the filtering, and therefore the dashboard rendering,
especially when displaying a few teams only
e.g; the teams you are part or responsible of.
The index on `user_id` is removed,
as it become a duplicate as `user_id` is the first column
of this new index.
Fix issue of %s or %(name)s present in source but not in translation
in language not available on transifex.com/odoo/
Also correct a account danish (da) translation that was reported to be
an issue.
closes#29100