* Complements commits a696913364 and
21d4b3fda9 by adding the missing `data-lang`
attribute also in the report layout (in saas-6 a single QWeb
template is used for language links in both reports and website
layouts).
* Fix the "Edit Master" link to work also for outdated templates
where the data-lang attribute is dynamically set to 'default',
and thus cannot be used as URL prefix -> use /website/lang
controller to switch lang instead.
Manufacturing Orders can be created from procurements,
as SUPERUSER_ID, since the procurements can be processed
through the WH scheduler, which is always ran as SUPERUSER_ID
In such a case, the record rules are ignored, and a BOM
normally not accessible to a user thanks to the multi-company
record rule could be chosen as the BOM of the MO.
This revision forces to find a BOM from a specific company
in such a case.
opw-640120
In reports calling the internal headers layout,
e.g. the general ledger,
the print time was displayed in UTC,
while it should be in user tz.
closes#3341
opw-612043
When receiving goods with average price set as costing method,
for a move from another company than the SUPERUSER_id company,
the average price updated was the one from the SUPERUSER company
instead of the one of the move.
opw-634167
If the chatter is displayed, display the send message part.
Before it was only displayed if we can edit the record, but we are still
able to post in other case (i.e. if we are in the followers).
closes#6721
opw-631039
Depending on the area (in this case a html field), the editor can escape
the url which wasn't taken into account by this widget.
closes#6726
opw-639852
The headers returned by content_disposition must be either in Unicode or in ASCII.
The encode function expects a Unicode or ASCII string.
The quote function from urllib2 expects a UTF-8 string and retruns a ASCII string.
opw:634205
Fixes#6160, #6557
This is related to revision 73432ffe9f.
The inherited view adding
the purchase pricelist field on the partner form
no longer worked for user being in the purchase pricelist group
but not in the sale pricelist group, since the field was added
after the sale pricelist field, which was no longer in the view
for these users.
This revision partially revert the above revision, but
add the purchase pricelist group in the groups of the view,
so the view is loaded only if the user is part of one group
or the other.
opw-639685
This is related to revision 65d7cc524d
The `order_line` field of `purchase.order` is readonly within states
aprroved, done. See the field definition. This means it should be
possible to remove lines of a `purchase.order` when the PO is in
any other state than approved or done.
Therefore, the deletion of lines shouldn't be prevented
when the PO is not in state approved or done
opw-634538
sometimes some blank spaces are lost in subject of some incoming messages
There is a bug in `decode_header` in Python < 3.3,
which leads to lost some spaces in the email subjects
when several encodings are used in this subject.
See
- Issue: http://bugs.python.org/issue1079
- Fix: https://hg.python.org/cpython/rev/8c03fe231877
Joining the strings returned in the result of `decode_header`
solves most cases. Only extreme cases, like having
a subject with several different encodings following
each other without white spaces between them could lead
to have extra spaces in the subject. It won't happen
most of the time.
Closes#6629
The tax_amount on account.move.line generated from the validation of an invoice
did not include the taxes with 'include in base amount' enabled.
Instead of using the line total, use the price_unit of the tax which is
correctly computed through compute_all method.
Fixes#5939
In commit 04ba0e99, we introduced an optimization for reading inherited fields
in a single query. There is an issue when you have more than one level of
`_inherits`. The query looks like:
SELECT ...
FROM table0, table1 AS alias1, table2 AS alias2
WHERE table0.link0 = alias1.id AND table1.link1 = alias2.id AND ...
^^^^^^
should be alias1
This fixes the issue, and adds a test to reproduce it. The fix is based on
@emiprotechnologies's own proposal, but is cleaner and does not break APIs.
`calendar_last_notif_ack` is not in the self readable fields list
of `res.users`. See `SELF_READABLE_FIELDS` in res_users.py.
This field must therefore be read as SUPERUSER.
opw-634402
When trying to share a partner through the share feature,
a new record rule was added on `res.company`,
allowing the access to this model only if
the `partner_id` of the `res.company` was equal
to the user `partner_id`.
Except that the share users must have access
to the company he is currently in.
opw-634402
If the whole view relates to a specific group,
apply the group on the view itself instead of
each view part (each fields, each page, each div,...),
so the view is loaded / added to the base view
only if the user is in the right group.
So the view is not loaded uselessly
and the fields are not read for nothing
(performances & security).
Indeed, when a group is applied on a field itself, the field content
is read, but hidden, therefore reading the content of the field
uselessly, and potentially leading to accesses issues
if the user hasn't the rights to read the field.
(e.g. reading a property when not having access to the model
of the proprty, pricelists on partners for instance)
opw-634402
When the product is a consumable, avoid to use real-time valuation, by adapting
the onchange in the views and making the valuation field invisible when the
product is a consumable / service.
When duplicating confirmed bank statement lines,
the many2many `move_ids` links were preserved, and,
therefore, there were links between the duplicated
lines and the move entries of the original lines.
Closes#6617
The calculation of the taxes is added in the calculation of the subtotal.
When the invoice is created, a reset of the taxes is performed so the user does not have to do
it himself.
opw-634711
When 'stock_dropshipping' was installed, in a sale order,
choosing a product being stockable + buy + MTOs returned
the "Not Enough Stock" warning, while it shouldn't.
It's because the according method `_check_rounting` was
overriden in this module, with a @api.one, which aggregates, while
the method expects to return a simple boolean even for a list of
multiple ids.
Converting the method to @api.multi solves the issue.
opw-639426