When choosing use tasks / use issues, correctly update the project alias. Indeed
only the use issues checkbox had an onchange. This revision adds the onchange
on use tasks so that the method correctly computes the new alias destination model.
Also updated the _get_alias_models method to be more modular instead of hardcoding
values. Call super.
When sharing a survey, a mail.mail is created but the attachment were lost.
This is due to a missing command (6, _, ids) when creating records in
attachment_ids field (many2many).
Fixes#9364, opw 656742
Currently, the button "Send Email" next to the email address of an event
registration didn't work if a partner was not set.
This commit removes the button, thus removing the feature but partially
adds it back via the chatter suggested recipients in the same way it is
done for a lead.
It is still partially a feature regression since to work the viewing
user need more access rights (e.g read access right on res.partner)
than before.
closes#9486
opw-653127
If the invoicing policy of a PO is set to "Based on incoming shipments"
and the PO contains a product of type "service", it is never considered
as invoiced, and therefore reach the state "Done".
The reason is that no stock move is linked to this PO line, and
therefore it is never considered as invoiced since we check the invoice
state of the associated sotck moves.
This fix assumes that in this specific case, a PO line for a service is
always invoiced, since there is anyway no incoming shipment linked to
it.
opw-654317
The decimal precisions for the quantities, cost/supplier price
per unit of measure were not respected. It was always
set to 2 digits, whatever the configuration in the database
decimal precisions.
opw-653143
The group analytic.group_analytic_accounting should have access to the
account.analytic.default model. Otherwise, a user with only analytic
rights (along with another group which has access to the products, e.g.
Purchase) will not be able to see the product form view. Indeed, the
field rules_count requires an access to the model
account.analytic.default.
opw-653735
`Recheck availability` must ignore
the done or cancelled moves.
Otherwise, it raises the warning telling you cannot
unreserve a done move.
856b31719c/addons/stock/stock.py (L1899)
To reproduce the issue:
- Create a delivery order,
with 10 stockable product A
& 10 stockable product B,
mark as todo.
- Create a receipt,
with 5 stockable product A,
mark as todo & transfer.
- Cancel the move of stockable product B from the delivery order,
in Traceability -> Stock Moves.
- Come back to the delivery order, `check availability`,
then, `recheck availability`
Closes#9550
In check_writing report, amount is the content of the field amount_to_text that
we can not guarantee has been filled (done in onchange so could be avoided, also
for other languages, etc.)
Instead of potentially failing, double check amount is filled.
cf https://www.odoo.com/groups/59/14976615
The variants on a product in the ecommerce can appear:
- naturally, not a list, colored square for color, ...
- in a list of radio button.
To have the second kind, we need to enable the "List View of Variants"
customize option.
One part of the code was not the same which cause an issue when saving
the image of the variant, it was saved on the product.template instead.
This commit add an "update_product_image" function which is now called
in both scenario.
first half of:
opw-654279
forward port note: in 9.0 website/image -> web/image
These onchanges were needless since it was already done by the
BufferedDataSet when we use alter_ids to add/remove ids/virtual ids from
the recordset.
The onchanges this commit remove were introduced with 6b907bb4d in
juliet 2012 whilst the onchange in the BufferedDataSet when using
dataset alter_ids was with dd747c096 in october 2012.
closes#8273fixes#7595
opw-644706
Partial backport of master (-> v9) commit 059230512.
for the issue when removing an invoice line from an account.invoice,
three onchange where triggered:
- ListView account.invoice.line unlink the line id from its dataset,
[[first onchange]]
-> the line id is removed from the dataset which trigger an onchange
after this is done (and the onchange is finished), the following
onchange happen:
-- remove each record of the Collection of the ListView
-> this remove the id of these record from the ListView List dataset
[[second onchange]]
-> this trigger an onchange albeit the dataset is not changed
(since it was already removed before the first onchange)
-> this trigger an onchange on the one2many_list of the ListView
which has the same dataset as the ListView
[[third onchange]]
-> so an onchange is called yet again.
this commit removes the second onchange in this case where we remove ids
already removed from the dataset.
closes#8273fixes#7595
opw-644706
<% are automatically escaped as soon as the wysiwyg tool
is used to edit the template.
The wysiwyg tool is not compatible with Jinja, and
it isn't expected to be.
To avoid to have this problem everytime when
editing the portal email templates, we use
a Jinja syntax compatible with the wysiwyg,
as a workaround.
opw-654223
When importing a module, if an error was raised
during the import, the traceback wasn't displayed
anywhere, making harder the debugging.
While it make sense to not display the entire traceback
to the user, in the web client, this is useful to
diplay the traceback in the logs, for debugging purposes.
opw-653882
For these function fields, bypassing the ORM, using a SQL query,
improves the execution time by 100 for a set of 80 timesheets
in a database with
- 250K `hr.analytic.timesheet`
&
- 250K `hr.attendance`.
These function fields depends on a one2many field which use
the SQL view `hr_timesheet_sheet_sheet_day`.
When performing `sheet.period_ids`, two SQL requests are performed,
- the first just to know the ids in the sql view matching this sheet
- the second to read the fields `total_attendance` & `total_timesheet`
and the request is performed on the entire set of lines of this view
(~250K lines in the observed use case)
while, when replaced by this SQL request, only one request is performed,
on a restricted set of lines, speeding up significantly the computation
of these computed fields for smaller sets of sheets.
opw-653447
As everywhere else, dates & datetimes must be formatted according
to the format defined in the `res.lang` of the user, and within
the timezone of the user.
Before this revision, when adding a datetime field to a calendar view,
the raw value of the date was displayed, for instance:
`2015-01-01 10:00:00`
instead of
`01/01/2015 11:00:00`
for a user in English(US), in UTC +1.
fixes#5324
opw-653625
Closing a task associated to a sale order line requires
the write access to the according sale order line, that
a user who is only a Project > User does not have
by default.
Fixes#9286Closes#9352
When clicking on button "add_to_cart" for a product with several options,
the user must be redirected to the product page. In this way, the user can
choose the options, he wants to buy with the product before adding the product
in the cart.
opw:653356
Add ACL on resource.calendar.attendance for HR Officer
according access right on resource.calendar
Otherwise, this isn't possible for HR officers to
manage Work Details (`resource.calendar.attendance`),
while they can manage Resource Calendar (`resource.calendar`)
Closes#9330
The messages dates in the groups pages
- /groups/<model('mail.group'):group>/
- /groups/<model('mail.group'):group>/<model('mail.message):message/
Did not take into account the user timezone, and always displayed
the date in UTC time.
opw-653508
When we had things like or & in a text we want to translate,
the translation system would save it unescape (so \xa0 and &).
So in this instance, the traduction would not match the real source
which was not subjected to this unescaping.
opw-653173
note: fix is courtesy of dle (no need to forward port after saas-6)
When a selection field with widget="radio" is False, the form view display the previews value for this field.
1 - Create a selection field (ex: [("1", "1"), ("2", "2")]), and display it on a form vue.
2 - Go to the form view (all the record have False value for this field).
3 - Change the value of this field for one record.
4 - In readonly mode, all other records now wrongly display this value (still False in DB or when "edit").
#opw-652002
People sometimes have an open POS client (/pos/web) which is associated
to a closed POS session. This causes multiple issues. The most important
problem occurs when a user closes the session and opens a new session
without refreshing the POS client. When doing this new POS orders will
become part of the old, already closed session and no new accounting
entries will be generated.
In order to fix this we make sure to check that the session that's
associated with the order that we get from the client is still open. If
it isn't we'll try to find a new, compatible session and add the order
there. If we cannot find a compatible session we'll create a new one
based on the old, closed one. When creating this new session we bypass
the opening_control phase which normally takes care of opening cash
control.
opw-652356
This is possible to have a child menu without URL.
The condition checking if the `active` class
must be added or not must take that into account.
opw-653132
The currency of the delivery method should match the currency of the
company. Indeed, the price specified in the corresponding product is in
the currrency of the company and does not depend on the pricelist.
opw-652716
v13 of the POSBox image is vastly different from all the previous
versions. On top of that it contains a lot of new features. Because of
this a lot of the POSBox documentation had to be rewritten. While doing
that, we also decided to move the documentation to
odoo.com/documentation/user instead of keeping it here.
If the main object is not set, the default object used is 'ir.ui.view'.
One of the consequence is that website SEO metadata will be stored on
'ir.ui.view' instead of the correct model, in this case 'blog.blog'.
This will cause the SEO metadata to be the same for all the blogs.
opw-651898
This is not impossible to have a submenu without URL.
The condition to set the menu item as active or not
must therefore take that into account.
opw-652688
In a real environment with a big dataset,
the query reponse time decreased from 750s to 6s,
by using a join on the sub-select instead of redoing
the select for each line.
Fixes#8812Closes#9128
Using BIGINT id instead of Text
- This doesn't change the behavior, just the variable type,
while being much more efficient.
Using `UNION ALL` instead of simple `UNION`
- This doesn't change the behavior either,
as the ids of each sub select cannot collide
Closes#9197
opw-650598
The URL for the Google Spreadsheets slightly changed
It's now `docs.google.com/spreadsheets/`, and no longer
`docs.odoo.com/spreadsheet/`
The domain is therefore changed to support both cases
opw-651847
When confirming the portal access management wizard,
the invitation email was sent to
users already having access to the portal,
while it should be sent only to
the users for who the access has just
been granted.
opw-650357
Set no_recompute to True
in order to speed up barcode picking UI
This is done for the same reason than
7b306fc17a
merged through #6754.
The remaining quantities will be computed in the
`do_transfer` method, thanks to the call
`picking_recompute_remaining_quantities`.
There is therefore no need to recompute
the remaining quantities for each pack operation.
Closes#9142
opw-645883