When clicking on button "invoices" in a SO, the invoice linked
was opened without the action in url. So when refreshing the browser,
a supplier invoice was displayed instaed of a customer invoice.
opw:695844
- Create a new assets
- Set a any gross value, any number of depreciation, and any number of
months in period
- Set "Prorata temporis" to True!
- Save, then confirm the asset
- Post at least one of the line by clicking on the red bubble next to it
- Click on "Modify Depreciation" and choose another number of month
- Click on "modify" to confirm the modifications
The depreciation of the latest posted month is duplicated. However, the
first unposted depreciation should be the first period after the last
posted period, as it is the case for non prorata temporis assets.
opw-693081
In the reconciliation widget, create a counterpart line. No domain is
applied on the "Account" field regarding the company, meaning that we
can select an account from any company.
opw-694149
session.context no longer exists, it is session.user_context
Add the missing context in the message_fetch call. The dates in the chatter were
not formatted according the user locale.
The tacked messages in the chatter were parially translated.
e.g. "Lead created"
The call did not gave the user context and the subtype message was not
translated.
Closes#14589
- Create a project which handles Tasks and Issues
- Create an issue
- Book some timesheet on the issue, thanks to the tab "Timesheet"
- Go to the Timesheet application, you'll see that the time booked
appears in the grid
- Change the time spent from the grid view.
The time added is booked on the issue, while the user doesn't expect it.
This is because the modification of a timesheet line copies an existing
line, then change the necessary values (see method `adjust_grid`).
Ideally, we should have a link module between timesheet grid and project
issue. Another solution would be some hack in the `timesheet_grid`
module to prevent `issue_id` to be copied. However, there is little to
no use of copying a timesheet line in general, so the solution chosen
should not affect the existing processes.
opw-697018
Variable `membership_line_ids` was misspelled `membership_lines_ids`
Thus the list of partner returned has extra partners not filtered by search domain
Closes#13768
In chat window, a chatter and discuss, the text zone appear as a pure
text zone but is transformed later on in HTML to add mentions links and
possibly other features.
Thus, when we wrote multiple spaces or a space at the next to html tag,
with how html worked they were collpased into one (or zero).
To keep them, we need to wrap the content with `<pre />` tag or replace
spaces with ` `.
closes#14593
opw-695535
- Create a MO for 500 Units
- Produce 500 Units
- In the "Finished Products" tab, change the produced quantity to 450
At that point, the button "Mark As Done" doesn't appear anymore.
Therefore, we need to change the "Quantity To Produce" to 450 => This
causes a traceback because of a division by zero.
Fixes#14499
opw-695269
For the field "tax_ids", a command must be written in the the returned dictionary.
In this way, the ids of the tax will be set on the account move line.
opw:689806
When clicking on the delivery order linked to the SO with a portal user,
a access right error was raised.
1. Due to this record rule: res_partner: portal/public: read access on my commercial
The portal user cannot read the fields of the partner linked to the warehouse of the picking.
The unreadable fields were in external_layout_footer.
2. The portal user is not allowed to read the field barcode on a product.
opw:693238
Complements rev. 8a7af44a07
The assets cache is only active while not in "xml dev" mode,
so the cache clearing must not be done while this development
mode is active (i.e. with `--dev=xml`)
When using a many2one widget, in the following scenario:
<h2><span t-field="o.partner_id.parent_id.country_id"/></h2>
If 'parent_id' is an empty recordset, the following error will be
raised:
[...]
[read] = record.read([field_name])
ValueError: need more than 0 values to unpack
This is because record.read([field_name]) returns an empty list which
cannot be unpacked.
In version 10 this problem is avoided by using recordset but to keep the diff
minmal in v9, only returns empty string as the line below does
`if not read[field_name]: return ''`
Closes#14489
When a newly-spawned worker detects a stale asset bundle
(due to its empty cache), it regenerates the new bundles,
but has to notify other workers, who would otherwise continue
serving the old list of bundles. This typically leads to
some missing bundles (served as empty files with 404 status),
that could only be cured by restarting the whole server.
Forcing the cache invalidation on the worker that notices
the staleness has no effect (the cache was empty) except
that it causes a cache refresh signal to be broadcast to
all workers.
QWeb's get_template:
* remove the fallback that returned the entire result of IRQweb's
`load` if no match was made between the t-name of the first children
of this result and the template to render
* When get_template receives an etree, directly return it and don't
try to find a matching t-name in it. The loader was not called but
a matching was trying to be made, now that we removed the fallback
a lot of tests that were relying on passing etree didn't work
anymore.
IRQweb's load now return consistently the full result of IrUiView's
`read_templace` when asked to load an id or an xmlid. We make a special
case to patch the result if asked with an id or with a child view so
that the "t-name" of one of the first children of what we return is
always what QWeb is looking for.
Issue: rendering a child view with its xmlid return its `read_template`
wrapped in a "templates" tag. In the context of asset bundles, it leads
to the browser not being able to handle it correctly.
Explanation:
What happens when you render a view? First, QWeb will call is method
`get_template` with the argument `template`. This argument contains the
name of template you try to render. It can be an id or an xmlid (also an
etree but let's forget this one at the moment). Within the method
`get_template`, it'll call IrQweb `load` method, again with the argument
`template`.
This `load` method will call IrUiView's `read_template` wih `template`
as argument. This method will return the view in the database with all
inheritance applied, wrapped in a "templates" tag. When `read_template`
has returned, the `load` method will, according to `template` and in the
following order:
* if `template` is an xmlid, return the whole `read_template`.
* if `template` is an id and if one of the first child has "t-name"
attribute (whatever its value): return the subtree of this first
child.
* if `template` is an id and one of the first child is a "t" tag: set
a "t-name" attribute to this first child with the id as value and
return the subtree of this child.
As you may note, inconsistencies already appear.
Now that QWeb's `get_template` has finished its call to IRQweb's `load`,
it'll do:
* if one of the first child of what's returned as a "t-name" attribute
matching the `template` argument, return this subtree
* return the whole thing returned by IRQweb's `load`.
Let's say we have a view:
<t t-name="base.dummy">
<div><span>something</span></div>
</t>
What happens if we render this view with its xmlid? First Qweb's
`get_template` will load the template with the help of IRQweb's `load`
method. As it received an xmlid as argument, it'll return the whole
`read_template` output, wrapped in a "templates" tag. Qweb's
`get_template` will now check if one of the first child has a "t-name"
attribude matching the `template` argument (base.dummy in our case). It
has one, so it returns the subtree and the compilation continue.
What happens if we render this view with its id? IRQweb's receives an id
as argument, gets the `read_template` of it and check if one of the
first child has a "t-name" attribute. It does, so it returns this
subtree to `get_template`. The latest will check if one the first
children has a matching "t-name" attribute with the `template` argument.
It does not, so it returns the whole thing.
Weird things in the way we got here but the result is the same whatever
you tried to render the template with an id or an xmlid.
Now let's add an extension to this view and try to render it (the
extension):
<xpath expr="//div" position="inside">
<span>another thing</span>
</xpath>
What happens if we render this view with its xmlid? `load` will receive
an id, so it'll return the whole `read_template` stuff. Note here that
if you try to render a parent or child view, `read_template` will return
the same thing: the parent with all inheritance applied. Now `get_template`
looks through the first children of this to find a matching "t-name" and
it doesn't find one, as the "t-name" is the one of the parent view and
we tried to render with the child xmlid. It so returns the whole thing,
wrapped in a "templates" tag. There's our issue.
It's working if we tried to render the thing with its id because `load`
would have returned the right subtree.
This commit adds a test showing the failure.
- Create a new unit of measure with 'Bigger than the reference Unit of
Measure'
- Save
- Edit and change the ratio ==> the ratio is set back to its value
opw-695507