In previous versions, the quantity passed to the bom_explode was the number
of times you needed to count the BoM. If the BoM was for 2 dozens and you pass
48 units, 2 was passed to the bom_explode method. We are now doing the same
for the explode method and we check it is called this way everywhere.
When you produce or consume more than foreseen in a production order,
the system creates extra moves. Before, in case of tracking, it did this without
transferring the stock.move.lots resulting in a wrong stock. That is why now,
when we split moves, we also split the stock.move.lots
For the finished move, it is also important to split between the quantities
of the original procurement and what is extra as the extra might use a push rule e.g.
When updating quantity, it should take use a similar
method as for generating the moves, but with
the quantity already produced (and posted) deduced.
The parameters for these method needed to be changed.
When all the moves are posted,
we should create the necessary extra moves.
If the quantity is put back to the quantity posted, it
might also need to delete moves.
In byproduct, it should take into account the subproduct factor.
When the quantity produced on the work orders has reached the quantity to do,
it should not allow anymore to use the "Done" button on work orders, but
rather use the Finish button instead. With the Update button on the manufacturing order
it is possible to do more.
In v7, it could be in handy that when altering the quantities of a move, it would automatically
update the next chained move as you could change quantities on the fly without any relation
to the original documents.
From v8, this is all being handled by extra moves which might e.g. follow
a different route, so you still know what is related to the original procurement.
But the functionality stayed in the code for who would still need it.
In v10 and in previous versions, manufacturing orders however still use these moves.
When we update the quantity on a halfproduct (which we can do now all the time in v10,
it could change the consumption where it is used in the finished product (in MTO)
That is why it is better to remove this functionality.
(it might also speed up the split method on stock_move)
The propagation of quantities was something from v7, that now causes trouble in mrp for nothing
The default of the date_start on the time records was a
result of the function fields.Datetime.now instead of the function itself
resulting in the start of each blocking time as the start of the server
When changing the quantity being produced on a work order and
serial numbers are consumed, we need to delete or add lines
for every serial number in function of the quantity through the onchange.
We changed the quantity_done to be set to quantity by default (automatically)
as otherwise we forgot to set it. But for the onchange, it means
we need to take it into account otherwise the number of records
would not be diminished.
The labels of the fields say that they store hours, but actually they store minutes. Correct the code to store hours.
Add digits to fload field for a better display in the webclient
date_planned_start should also be Start Deadline instead of Expected Start Date.
We don't want the Expected dates to function as a planning tool, but as
a priority for the planning of the workorders.
the onchange changed the partners of the ticket when the ticket changed project
to the project's partner, but if the ticket already has a partner it shouldn't
change.
* web_editor, website_blog
Since recent refactoring, web editor dialogs automatically trigger
an event when closed (saved or cancel). The problem is that there
still was manual trigger of those events or variants ("save" instead
of "saved").
To prevent multi-saving and be consistent, all save events are now
automatically triggered on save/close (no more manual) and the event
name is "save".
a random ensure_one() was added during the migration causing an error when
modifying portal access management for partners with more than one contact.
Removing it.
This is a backport of saas-13 commit a9bd9ab160.
mail/view controller is a generic controller that redirects the user to a
given view, depending on the record and the user. Users may be redirected
to the backend form view, or to a website view. This is done notably by
calling get_access_action method that gives the action to perform (act_window
or url).
Previously this method was called using SUPERUSER. However it was therefore
impossible to know who the user was. This method is now called using the
current user. Various overrides of get_access_action have been updated to
add some logic and access rights check directly in the method allowing
more fine-grain behavior of the access action.
Since saas-12, when deleting contents, parents are deleted too if they
become empty (while it was not possible to delete contents in that case
before). The problem here was that the history was recorded multiple
times if one deletion made multiple snippets be deleted and this
sometimes could crash.
Now the history is recorded only on first deletion when the user ask
for it.
Following 5c5d0865b9, apparently unused records
are simply deleted after updating existing ones. This causes an issue when a
module is installed or upgraded. The inspection of `ir.model.fields` records
is based on a *partial* registry (not all modules loaded); therefore records
will be deleted and recreated afterwards. This triggers inconsistencies in
other models that refer to `ir.model.fields`, like server actions, base action
rules, mail templates, etc.: many2one fields will be set to null!
An issue originally occurs in the Event module.
- Go to Events >> Reports >> Events
- Add a "Group By" in the search view: "Event Month"
- A mighty traceback pops up
This is because the rows and the columns are grouped by the same field
(`event_date:month`).
In method `_read_group_format_result`, a group_by of type "date" or
"datetime" is replaced by a "(range_start/range_end, label)" tuple. The
first element of the loop on `annotated_groupbys` is handled correctly,
but the next identical element will crash on `value + gb['interval']`,
since `value` is now a tuple and not a date/datetime anymore.
opw-686242
There is a hackish feature in the web_editor which forces the
contenteditable to true on links which are clicked and removes it
anywhere else in the page so that only the link is editable after
click. This allows to add text at the end of a link without adding it
outside of the link by mistake.
The feature was badly implemented because, if the link was editable
without having any parent which is editable, the contenteditable was
forced to true, then immediatly forced to false when forcing to false
every page element. This was the case for lots of t-field. By example
the product categories in eCommerce are t-field links which are in non
editable <li/> elements...
When we are on the page:
/blog/myblog-1/page/2
the link to page 3 is:
/blog/myblog-1/page/3
So we need to give /blog/our-blog-1 as source url of pager.
Previously in this instance, since 4faed0b7 the page 3 url
in this scenario would erroneously be:
/blog/myblog-1/page/2/page/3
opw-688681
Avoid traceback "'int' object has no attribute 'partner_id'"
uid is the id and not the browser record of 'user'
Avoid traceback: Database fetch misses ids (u'<id>') and has extra ids (<id>),
may be caused by a type incoherence in a previous request.
JS call with id as string.
Avoid traceback: Invalid value res.partner(x,y,z) in domain term ('partner_id', 'in', res.partner(x,y,z))
Search in new api return browseRecord now
Avoid to write on a lead without the right on it.
Tree view was removed to hide the different view types display in enterprise as it was "cleaner" for a dashboard. Re-adding for import button.
Future versions will not display departments as dashboard but employees anyway.
Since the below revision:
32b5515a8f
It was no longer possible to create a payment
for a pos order without picking.
Indeed, if `picking_type` is not set,
`picking_id`, which is initialized to `False`,
remains as `False`, and you therefore can't
ask it's `.id` (`picking_id.id`).
opw-687597
If the title was 'true' or 'false', the export failed, because we are tying to
concat bool and str. TypeError: cannot concatenate 'str' and 'bool' objects
How to reproduce, install sale, be sure to have one order with delivered = True
In Reporting / Sale analysis, add a group by 'shipped' filed to have 'true' as
title.
This commit closes issue odoo/odoo#13425
When a custom field is created, it now appears in `ir.model.fields` on the
model's children models (by `_inherits`). This makes the reflection more
accurate (inherited custom fields are visible), although not perfect (they
appear as "base" fields and thus cannot be overridden).
The reflection of fields in `ir.model.fields` has been improved to deal with
custom field creation, modification and suppression.
Note that custom fields are still not inherited through `_inherit` relations.
opw-687626
opw-645065