If the event has some attendees a button is displayed to launch a mass
mailing on those attendees. This button requires a new bridge module
between mass mailing and event.
Indeed due to onchange being trigerred at creation it breaks trying to
set default_mailing_domain when creating a new mailing through the web
client.
As setting domain and then changing model should not be the primary use
case of mass mailing, people will have to update their domain manually
instead of seeing it reset to a void domain.
Before this fix, active_id wasn't defined on non existing record.
For example: when you tried to add a new contact on a new partner.
Now, active_id is false if there is no id on the current record.
So, you can use this value to evaluate the context
When you try to empty a date or datetime field, you get a traceback
saying that 'clone' and 'isSame' are not functions.
This error occurs when you empty the field because the value is 'false'
and you cannot call 'clone' or 'isSame' on false.
To fix this, we ensure that value is not false before calling these
methods on it.
This bug has been introduced in rev: https://github.com/odoo/odoo/commit/c32724eae06c987e74a0600f1669696e499edc33
Before this all domains in the POS were ignored. Introduced by
e574027056.
When the specified method is search_read buildQuery rewrites args
using the domain and fields properties. This ensures that in that case
they are set.
The 'mode' attribute can be used for x2many fields to force the
view mode. Before this rev., it was ignored and if a tree view
existed in the view description, it was selected by default.
This was mainly a problem in mobile as in this case, kanban views
are prefered, and the data_manager forces the mode to be kanban,
so the data was fetched according to the kanban view fields, but
later on the list view was instantiated instead of kanban by the
x2many field, so it crashed if both views didn't share the exact
same fields.
Onchange results weren't correctly applied for many2manys, and
for x2manys inside x2manys.
More precisely, if an onchange RPC returned a command 4 (link to)
for a many2many field, this command was ignored. If it returned
nested commands (commands 0, 1 or 4 inside commands 0 or 1), they
were ignored as well.
The function that applies the result of an onchange is now
recursive, and it handles commands 0, 1, 4 and 5.
The fieldsInfo attribute on the basic model's datapoints is used
by to determine which fields need to be loaded for a record/list
of records. This information wasn't correctly specified in some
cases. As a result, the display_name of many2many fields (e.g.
using widget many2many_tags) inside list views were fetched, and
thus empty tags were displayed.
No test is added by this commit, as it already makes a broken test
pass (this test didn't pass since the previous commit).
There were several issues with this widget, and the way the model
handles its requests (mainly the removal of values).
It crashed for instance on the product form view when the user
updated the routes field (field route_ids in tab inventory).
The readonly attribute of a field in its description can be
overriden in the views (e.g. with modifiers). So readonly fields
may actually be edited from views in which there is a modifiers
on their node overriding the default value.
Before this rev., readonly fields couldn't be saved, even if they
could be edited from views (with such modifiers).
For instance, it wasn't possible to change the value of the
partner_id field in a draft sale_order.
'session' is no longer an widget attribute, 'getSession()' should
be used instead.
Also remove a dead JS field widget (not used since
odoo/odoo@158f779b46)
Before this commit, it was not easily possible to add the seamless closing
workflow while having 2 or more depreciation boards (eg. according to accounting
standard). With this commit, I can construct the move lines independently
inherit properly and pass all created move lines to the window action.
Closes#16073
For one2many and many2many fields, you have several ways for specifying
a view other than the default one:
- to write the arch of the view in the field tag
Example:
<field name="many2many">
<tree>
...
</tree>
</field>
- to write xmlid of the view in a specific key (*_view_ref)
in the context of the field.
Example:
<field name="many2many" context="{'tree_view_ref':'module.tree_view_ref'}">
Before this fix, the second case didn't work.
the default view was loaded instead of the one passed in the context.
In fact, this context is evaluated after the loading of the record but
we need some static keys to load the view (before fetching the record).
When we try to archive a kanban column we get a traceback when the field
'active' exists on the model but not in the view.
This traceback is caused by an unecessary check of the active value of
the record.
To fix it, we apply the 'active' value on all records, and not only on
the ones where active value changed.
Traceback when:
* click on first row of calendar
* move an event somewhere else with drag and drop
* click on the mini calendar
* filter from the control panel triggers a traceback
* add an attendee: traceback
* day/week/month: traceback
* cannot add a leave, the fromViewDialog does not open
* one day oo server-side when select all day
The client must receive the tzOffset to apply this on all hours.
To use the date picker we must change the date to apply the change
in the user's tzOffset, without this change the result is wrong.
For datetime widget we must change like it to avoid max stack error.
The server send the tzOffset, if it's undefined, by default the client
use the browser time offset.
Every test are change to use tzOffset.
A test is added in calendar to use the click by position for the
fullcalendar lib. This test create and drag and drop an event to check
timezone error and error when we use default value in the context.
Use formating date like 2026-04-04T08:00:00Z instead of 2026-04-04 08:00:00
is important for phantomjs, because it's crash without information if the
formating is not the standard format.
For the parsing, when the client receive a server date the date is utc
formating but when it's parsed from the client is in the user's timezone
The field widget html wasn't implemented yet in the new views. A
very basic implementation was done in addon web. It only handled
the readonly mode so that the field were displayed in studio.
This commit removes this basic implementation from web, and re-
introduced the old one, converted, in addon web_editor.
In a form view, if a one2many list view contained a many2many
field (e.g. widget many2many_tags), the commands for the embedded
many2many weren't generated for newly created one2many subrecords,
so this field couldn't be saved.
- Create 3 products (A, B & C) with tracking set to 'serial'
- Create a BOM: A consumes 1 unit of B and C
- Create a MO for A, create the lot A1 for the finished product
- Create another MO for A, use the existing lot A1 for the finished
product
- Try to mark the MO as done => you get an error
- In the finished products tab, change manually the lot, for example by
creating A2
- Mark the MO as done
- Open the Upstream Traceability => under the MO, there is nothing, the
traceability is lost.
The `check_finished_move_lots` method takes care of setting the
`lot_produced_id` on the `move_raw_ids`. However, when changing manually
the finished product lot, this modification is not propagated.
Therefore, when posting the inventory (`post_inventory`), the line:
```
move_raw.move_lot_ids.filtered(lambda x: x.lot_produced_id.id == lot)...
```
doesn't return any lot. Consequently, `consumed_quant_ids` is empty, and
the traceability is lost.
opw-724944
The method has not been correctly ported to the new view (in the new
model in this case).
The change (on the color) needs to be notified to the model before
updating the record.
In 599bd509 for inline image in a mail the `Content-Id` of the
attachment was used as the file name to avoir an issue of several inline
images with the same name only displaying the first one.
This solved the issue but with it the file name when downloading the
image were lost as well as the extension which can be an issue.
This changeset refactor the code so the behavior stay the same but the
original file names are kept.
opw-725305
Issue: when a field is computed on a new record, the record is not marked as
"being computed", and it could therefore be invalidated. The fix consists in
using the standard method that marks records before calling the compute method.
button will only be visible if the move_line are not reconciled yet
This button will allow user to register a payment and then reconcile it with multiple invoices in the payment matching view.
Was PR #15157
By unticking the "Use Existing Lots" checkbox on the pos picking type,
you can choose not to enter any lots/serial numbers in the pos. This
way, the picking will not specify the lots either and the system will
take the quants and lots according to the removal strategy.
Before, when the POS order created the picking, it would not be set to
done when one of the lines contained a product that required lots.
This was to avoid the case where the lot given in text in the POS
order would not correspond with a real lot in the database.
So, in order to not annoy the user when he gives correct lots, we
validate the picking when we can find back the given lots in the
system.
opw-698060
The POS support for tracked products implemented at
8f39c652c6 was mainly meant for products
tracked with serial numbers. In theory it would also work for lots as
long as the lots were only sold in integer quantities. One could specify
the same lot multiple times.
For products tracked in non-integer quantities this wouldn't work
however. This commit makes the POS handle lots more like the stock
module. When a product tracked in lots is bought in the POS you can only
specify one lot number. If a product is sold from multiple lots then
multiple order lines have to be specified.
Fixes#15325
Demoted to library in Python 3, see if uses can be replaced by more
specific construct, just import functools.reduce otherwise.
Futurize fixers:
* lib2to3.fixes.fix_reduce
This commit prevents from erasing the origin part of the url
when the tour manager does a redirection. This was an issue in
phantomjs if it allows local url as in this case, it will try to
load file://<tour_url> instead of <origin><tour_url>.