This is a temporary workaround, which probably deserves
further thinking by @ged-odo, as the root cause
stems from commit 96bf5b2656
The problem is that the list view looked for composite group_by
keys such as "create_date:month" within `fields_get`, which
only contains true fields.
When there is no `color` field on the model
e.g. On invoice line taxes
The color class to apply on the badge was set to
`o_tag_color_undefined`
which doesn't exist. It must be set
from `o_tag_color_0` to `o_tag_color_10`
in order have a color.
Because of this, the taxes in the invoices lines
were not visible, because they were written in white
on a white background.
This has been broken by the below revision:
fe66472e2c
removing the or statement (`||`) to set a default
color for models not having a `color` field.
We choose to set `10` as default value, so the color
remains the same compared to the previous release
(light grey). However, if the new behavior chosen
by the usability is to have these in black, it should then
be changed to `0` again.
This filter must be added in the regular searchview,
and not have his own search view.
Without this:
- view_sales_order_filter_ecommerce is a not search view
for the sale orders, having the same priority than the regular one,
and therefore this view can be loaded by default for other menus
(In this case, this was for the menu Website Admin > Orders).
e.g. Clicking on the `Sales` stat button on a contact no longer
filtered the orders of this contact, but displayed all the orders,
because it was this view which was loaded instead of the regular one.
- In Website Admin > Orders, it was simply not possible to type a string
and search for it in the search bar.
* Move files and reorganize directories according to guidelines
* Lint and clean code, remove dead code
* Migrate code to the new API
In REF commit, some fields of calendar.event models changed. Due to
bad design, the code was not clean with the new API. Changing computed
fields make it more performant, and reduce code complexity.
See commit "[REF] calendar: change computed fields for start and
stop dates" for details.
Change `send_email_to_attendees` signature to force setting email
template and remove `email_from`, since it is not usefull.
Now, when sending email to attendee, meeting author will also received
an invitation.
`get_ics_file` has been modified to be executed in batch.
- `start` and `stop` fields are not computed anymore. Indeed, it was not normal
to have required stored computed field. Normally we shouldn't write on these
fields, but since client calendar api need them, we keep them as normal
datetime fields
- `start_date` and `stop_date` become stored computed date fields depending of
`start`,`stop` and `allday`. An inverse method allow to write on these fields,
since it can be the case from the form view
- `start_datetime` and `stop_datetime` follow the same logic
- `onchange_allday` code is mostly moved in `_inverse_dates` of new computed fields
- `_set_date` method (called in create/write) is now removed, since it does the same
thing as old onchanges
- `_onchange_duration` is kept to adapt `stop_datetime` when changing `start_datetime`
or `duration` on form view
- Duration is now 'zero' in database for allday meeting. Before, it was not changed.
Setting it to zero is less falsy. `duration` can not (yet) be a computed field since
it depends on others computed fields.
After migration, we manage to keep old behavior but the code was crap. Switching stored computed
fields make it cleaner, and respecting new API standarts.
This changes avoid multiple methods doing almost the same thing, and is less 'buggy'.
- move `get_ics_file` from calendar.attendee to calendar.event
- remove calendar.event arguments to convert method into
`api.multi`, which make more sense
- `create_attendees` now returns recordset instead of list of ids
- change signature of `get_interval` method
Migration of all python code, mostly withtout chagnes. And adapting
xml files to guidelines.
On calendar.py, some changes have been perform to make the migration works :
- `_compute` method has been split into `_compute_dates`, `_compute_attendee` and `_compute_display_time`.
- remove unused method `onchange_partner_ids`, `check_partners_email`
- make `compute_rule_string` use a cache record instead of a value
dict to avoid crashes
- remove `new_invitation_token` method, and make it a default value on attendee creation
- add a default value on `day` field, otherwise the "Please select a
proper day of the month" exception is raised during the onchange
A string attribute value can be translated,
and therefore the inherit broken if the term is indeed
translated.
This was the case for this term "Tracked link" in the Dutch
language, the "Tracked link" term of the inherited view has
been translated, and the inherit was therefore broken as
it couldn't find the given node in the base view due to the
fact this term was translated.
opw-683128
When the schema of a view change (e.g. drop of column), the "CREATE OR REPLACE"
will not be enough and dropping the view is required.
Fixes#12754Closes#12756
When making an advance payment in percent, the function onchange_advance_payment_method
set the Down Payment Product to False. Then each time an advanced payment in percent
was made, a new down payment product was created and set in sale.config.setting in the field
deposit_product_id_setting.
Now the function onchange_advance_payment_method let the Down Payment Product
even if the payment method is in percent.
opw:683167
During module update, we should only consider views of already
loaded modules. This filter is done by searching on xmlids of views.
We should also search for explicit view ids (current module is not yet
marked as loaded)
However, by doing this `OR` condition, the generated query is not
optimal and forbid postgresql to use the composite index
`ir_model_data_model_res_id_index` on `ir_model_data` table.
This is a performance issue for databases with a lot of ir_model_data rows.
Use 2 quicker search() to avoid this problem.
This only affect the module update. Normal view loading is unchanged.