In Sale order decimal accuracy works well as expected for Order
quantity, Delivered Quantity and Invoiced Quantity BUT in PO there is
issue to show decimal accuracy into the "Received Quantity" and "Billed
Quantity".
opw-726110
When posting journal entries for an hr.expense.sheet with several expense lines
(by clicking on the button "Post journal entries"), all the account move lines
created for the same sheet must be linked to the same account move because
the model hr.expense.sheet has just a field "account_move_id" to access all the entries
(by clicking on button "Accounting Entries")
opw:715523,709930,725798,716239
Clicking on an editable list row makes the row editable. Clicking on
an editable list row while another row is being edited, first make
the row being edited readonly before making the clicked row editable.
The row which goes back to readonly have to be reloaded, operation
which is not instantaneous. If another row is clicked while a row
is going back to readonly (this typically happens if a row is double
clicked while another one is being edited), a form view dialog was
opened to edit the row (behavior which was not expected).
opw-710627
- Create a product with 2 variants
- Create a BOM specific for each variant
- Go in the product variant page
the stat button indicates 2 BOMs instead of one.
opw-725126
- Create a MO, components needed are 1 unit of Prod A and 1 unit of Prod
B.
- Click on "Check Availability"
The button "Unreserve" does not appear unless all components are
available.
opw-724940
When editing a report, the editor is launched in an iframe with an
environment which is different from backend and frontend. The problem
here is that the editor uses the `Dialog` API while the report editor
was not loading the associated xml file this API needs to work. Indeed,
when clicking on the "Discard" button for example, nothing seemed to
happen as a dialog was supposed to be opened.
This worked before as the editor was not using the `Dialog` API until
commit 62fb1bb924.
Unfortunatly, this commit adapted "iframe.js" to load the associated
xml file but forgot to adapt the report editor. In a future
amelioration, this "iframe.js" file could be added to the report editor
so that all "iframe editor" environement work properly with the same
adaptation code.
opw-724784
The allocation requests have date fields that are only informative.
Having an allocation request (e.g. specifying dates of a public holiday)
overlapping the dates of a request is actually fine (if an employee is sick
during a public holidays, he can still use it for a leave request).
Closes#11026
The many2many_tags_email's internal value change logic fails to process
all its values. It is not concurrency proof either.
The internal value change logic is now replaced by a mutex and deferreds
are used for the partner's form view popups in order to allow concurrent
events.
To have the same behavior when the variant is added manually on the SO
or when it's added with a sale.quote.template. The description on the
SO line must include the default_code and the name of the variant.
opw:725072
When a language is deactivated, it may still be referred to in a default value.
A ir.value is created at the database setup to specify the default language.
If a user deactivate the default language but not the ir.value, the creation of
a res.partner would fail as trying to set an unknown value to a selection field.
This commit removes the default value when deactivating the linked language.
The patch is minimal for the bug. A more generic solution would be to verify the
ir.value when calling the default_get method.
This is however a risk of performance degradation (e.g. during a csv import) for
a rare scenario.
The dynamic selection scenario is probably on relevant to res.lang.
A similar problem can occur with many2one fields but is difficult to fix without
performance degradation.
Closes#16009Fixes#15979Fixes#3854
Typo error
Steps to reproduce:
1. Go to a project and activate customer satisfaction on tasks
2. Activate the developer mode and go to Settings > Technical > Templates
3. Find the "Task: Rating Request" template
4. Click on Preview
Bug: Signature is in HTML code
opw:725722
- On a model, log a note and ping User A
- Go in the inbox of User A, and reply to the message
The reply is a comment (therefore sent to all followers of the
document), not a note.
opw-710326
Before this, the stock user had readonly ACL on the scraping action. He
therefore could not scrap products during his normal operations. It is assumed,
that this was not an intended default, as not being otherwise documented.
Closes#15955
In a SO, the "Invoiced Qty" can decrease if the refund is generated from
the SO. It doesn't decrease if the refund is generated from the Invoice.
However, we don't have this mechanism in a PO since the invoice is not
generated directly from the PO. There is therefore no way to decrease
the "Billed Qty".
We authorize the "Billed Qty" to decrease in the case of PO.
Complement of commit 9b5281adb4
opw-724474
When clicking on smart button "Manufacturing" for a variant, the action
"act_product_mrp_production" was called to apply the default filter on
product_id = active_id to select the right mrp.production. But the field
product_id was also called "Raw material" and a wrong domain was applied
each the action was triggered from a variant.
opw:725050
- Create a partner who is a contact of a company
- Associate this partner to an employee
- Create an expense for the employee, validate and post entries
The AML created are linked to the company, not the partner.
Since the bank account account is registered on the partner, and not the
company, this is more logical to link the AML with the partner.
opw-724550
The `issuperset` method check if a set contains all the element of the set given
in paremeter. So in our case, the user needed to be in all the view groups
to get the inherited view. That's not the behaviour expected.
If the user is in only one of the group required to have access to the view,
we want to return the inherited view.
The editable list has a `is_valid` method which checks that all the
records it contains have valid data. The problem is that it was
considering that all the records in the `dataset.cache` were part of
the x2x field the editable list is working with. This is wrong as the
`dataset.cache` can contain information which are not part of the
editable list anymore.
See the commit which introduced the use of the `dataset.cache`:
a9d20d9fa0
This was causing issues with rare cases of an editable list which
contains another editable list (even invisible) which was sharing
common information with its parent editable list.
opw-710627
When a session was opened in Internet Explorer (11 at least), it was directly
closed.
This is due to the concurrency mechanism created to avoid having two tabs opened
with the same window.
To avoid having two tabs opened on the same session, the browser listen to
'storage' event, triggered when the localstorage is updated.
On most browsers, this is only triggers when the localstorage is updated in a
different window of the same browser.
On IE 11, it is also triggered when the localstorage is modified in the current
window.
It is unclear if this is a bad interpretation of the specification or not.
A bug has been reported[1] to Microsoft about it but is, as of today, postponed
without action.
To avoid the above issue, add a parameter containing a timestamp at the session
launch and be able to detect that the storage events comes from the current
window.
opw-724851
[1] https://connect.microsoft.com/IE/feedback/details/774798/localstorage-event-fired-in-source-window
In f65475d6 one2many fields of default view in a form view were propagated
to the ORM so the value received from an onchange was not empty.
These new steps test this on a tree view embedded in a form view, or a
tree view originating from a default view by testing onchange adding row
or updating values of a one2many.
In a form view, when a field onchange lead to a change on a x2many,
there was two different behavior:
- if the x2many had an embedded view (eg. a tree view inside a form
view) the onchange would notify that it expected the x2many field in
this embedded view to be changed and handled the changes correctly.
- if the x2many had a default view, the onchange ORM would not be
aware the x2many could be modified and would not sent the changes
back causing blank or not updated x2m lines and error on save.
---
Two solutions were birthed to solve the second point:
=> PR #10557 = solving everything
With this PR the onchange in the ORM is aware of every fields in the
current view (even field in a x2m in a x2m in a x2m in a form view) and
if any of these are change the javascript gets back the value of the
fields present in the view.
This PR has currently not been merged by fear of changing too much and
anyway could only be done in master.
=> PR #12249 = if no field for x2many, send its form view fields
With this change, if the ORM onchange is not aware of the fields in the
x2many widget to returns, all the field in the x2m default form view are
returned.
This was merged in bbdf960 but introduced a number of other issue:
- in most situation the x2many is represented by a list view, which may
have fields missing of the form view, so the original is still present.
- the view used may differ from the default form view in other way
(depending on value in context or other possibilities).
- the form view could have fields not present in the form view which
could end up in `write` on fields which should not be written to.
---
This commit reverts bbdf960 and adapts a small part of #10557 so the
x2many with default view works as an embedded x2many. For more than one
level (eg. a x2many in a x2many) this would still not work but it is
only solvable by a PR such as #10557 which could only be targetted for
master.
With this commit:
- the list of fields sent to ORM onchange is computed at the first onchange
- the fields from a x2many field default view is sent for onchange
- the initial onchange on record creation is delayed to when x2many are loaded
closes#12249, closes#15336, closes#15890fixes#11236, fixes#12249, fixes#15129, #15419
opw-705965 opw-716095 opw-715619 opw-710440
A recurring event with a start date and a time duration had a wrong start and
stop date computed.
Introduced at 76b724294a.
Previously the r_date contained only the start_date but now it contains both
start and stop dates. This implies that the method 'get_recurrent_ids' could
use 'get_search_fields' with a stop_date (depending on the domain order) and
returns incorrect dates.
This commit ensure to launch the get_search_fields with the start date.
Closes#15922
- Define a user with accounting rights "Billing"
- Create an invoice or vendor bill
- Add an invoice line without product
It is impossible to save because the mandatory field "Account" is hidden
and empty.
This is because of an onchange which overrides the default method.
opw-716208
Commit 906875fc78 (followed by commit
76be5eed44) tried to tweak to copy/paste
functionality of the editor.
Indeed, in PDF file, when copying a paragraph, a line feed is added at
each forced line break (page width end). This forced a line feed and
a new paragraph in the pasted text. The goal was to get rid of those
useless linebreaks when pasting.
The ideal solution would be to detect that the text was copied from
a PDF but it is not possible. However, this commit improves the
heuristic: if this is not plain text, then nothing is done, the content
is pasted normally. If it is plain text (like when copying from pdf),
then each line break which is surrounded by letters or numbers is
considered an useless line break and replaced by a space. This is
obviously not perfect but the previous implementation was really wrong
(it was removing line breaks which were not preceeded by punctuation in
all cases, which was removing lots of useful line breaks).
Note: this commit also fixes a bug -> text was not able to be pasted
with Internet Explorer.
opw-715920
This commit partially reverts 5b4f7c1 where `fields_view.fields`
had been replaced by `fields`, which could have been set to all
fields in the model.
This modification can sometimes lead to a problem, during the
fields value transformation. The ID, which wasn't given previously
is now parsed. When creating a new record, the field ID is not an
integer but a string (representing the virtual ID). If the field
is in the arch, it will be postprocessed
(see https://github.com/odoo/odoo/blob/saas-11/addons/web/static/src/js/framework/data_manager.js#L201)
and its type will become `id`. As this postprocessing is not done
if the field in the view, the parsing was on the original type
(integer) and not the special id type.
- Create an invoice with two products
- Each line has a long description (spread on 2 lines)
- The second line has a negative value
- Print the invoice (PDF)
The amount spreads on two lines, split as:
$ -
1,000.00
This is due to the wkhtmltopdf version with patched QT. Unfortunately,
upgrading to the latest version 0.12.4 doesn't solve the problem.
The solution is to replace the '-' by a non-breakable hyphen.
opw-711002
When using the iframed editor with multilang selector (present if there
is another lang installed than en_US) an "English" language was present
before each translation language.
opw-696891
Fullcalendar expect as `start` and `end` property of an event object:
> When specifying Event Objects for events or eventSources, you may
> specify a string in IETF format (ex: "Wed, 18 Oct 2009 13:00:00 EST"),
> a string in ISO8601 format (ex: "2009-11-05T13:15:30Z") or a UNIX
> timestamp.
(as seen in https://fullcalendar.io/docs1/event_data/Event_Object/)
Before this commit we could for example in arabic provide an invalid
date string "٢٠١٧-٠٣-١٦ ١٦:٠٠:٠٦" instead of "2017-03-16 16:00:06".
This commit solves this by always providing fullcalendar an ISO8601 date
string.
opw-705752
The transcoder (which transforms stylesheet rules to inline style) did
some compression of the padding and margin css properties to not always
have margin-top + margin-right + margin-bottom + margin-left.
This could cause an issue when the value of margin or padding contained
an initial or inherit value because browsers (at least firefox and
google chrome) doesn't allow it. Thus the preview could for example have
bigger veritcal spaces arround `<p />` tag than what was seen when
editing.
With this fix instead of invalid:
margin:initial initial initial initial
we have:
margin:initial
And instead of invalid:
margin:initial 5px 6px 7px
we have:
margin-top: initial; margin-right: 5px; margin-bottom: 6px; margin-left: 7px;
opw-706535
It is still possible to have negative and positive quants in the same
location because of returns: if you send something to the customer that
is not there and you return it, you will still be able to reserve the
returned goods to send to another client.
Before, if you would do an inventory adjustment, it would not take into
account these returned quants and their negative counterpart, which made
them difficult to get out of the system.
This fix takes them into account by creating two movements for one
inventory line: move the positive counterpart to the inventory location
before getting back from this location the same quantity.
This way, even if you have 0 as quantity on hand but you have those 2
quants, it will eliminate them. (if you are increasing the stock, part
of the process might have done it automatically already).
Test cases contributed by @jir-odoo
- Create a product with price tax included
- Create Repair order
- Add the product in tabs "Operation" or "Invoicing"
The tax is added twice in the total.
opw-709608