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
`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
When extra moves are created, the unit price of the invoice line for these extra moves is now the
same than the unit price of the moves generated from the SO.
opw-634227
Make sure that appropriate fields are emptied when switching to in between inventory filters.
This prevents incoherent results due to hidden fields which were filled in a previous selection.
opw-634388
Fixes#6512
Generating an invoice from a delivery now add the taxes to the invoice.
This impacts a returned purchase for which the invoice is created from the delivery, and a sale
order which is set to create invoice on delivery.
opw-634565
This revision is related to dd47b6f5bc.
The above revision was allmost correct, except that, in a supplier
invoices, the `amount_currency` of the invoice is negative,
and the one of the bank statement is possitive.
To check that both are equal, we should subtract one to each other,
and check that the diff is 0, but both part need to be the
absolute value.
opw-634263
closes#6533
Prevents installing the hw_* modules at all when the python
dependencies are missing. If they were already installed
do not start the hardware threads to avoid wasting resources
and logging errors
This fixes :
* pagination only on /members and sometimes with bad page count,
* free members could not be searched (were always all displayed),
* all elements are displayed even if there is a pagination,
* for members without country, errors happened in some use case,
* when too much locations were on a map (>2000) it failed,
* numbers of members by countries was not displayed for guest.
And also as performance improvemnts:
* only query all partners when the map is enabled (customize > left
world map),
* limit partners put on the map to 2000 (even then it's a lot for
google maps),
* don't browse all membership_line to get res_partner but use a query.
opw-634653
Avoid ZeroDivisionError if a move is confirmed with quantity of 0 (when stored
in database where the rounding is done by the precision defined on product_qty
field.
Fixes#6439
When an opportunity has a 100% probability, it is regarded
as won. When the opportunity is regarded as done,
there is no more use to show the mark won/lost button.
opw-634420
Update:
When an existing purchase order line is updated, for example if a new procurement was required,
we check if the sum of existing running linked procurements is larger than the quantity in the
purchase order. If it is the case, we update the quantity and the unit price accordingly.
Without this fix, we systematically add the procurement quantity (or the provider minimum quantity)
to the purchase order line, even if the sum of the procurements is smaller than the ordered
quantity.
Cancel:
When a procurement is cancelled, we recompute the unit price of the associated purchase order
according to the quantity and make sure the provider minimum quantity is met. If the required
quantity is zero, we cancel and unlink the purchase order line.
opw: 632175 and 632176
With Safari, the function content_disposition must return "attachment; filename=\"%s\"" % filename
to avoid that Werkzeug raises an UnicodeDecodeError.
Fixes#6160
opw:634205
When processing the reconciliation of a bank statement
within the company currency with an invoice in a foreign currency,
avoid to recompute the bank statement debit / credit within
the currency rate at the time of the invoice when the
`amount_currency` of the bank statement line and the `amount_currency`
of the invoice move line are the same
(while having the invoice move line and the
bank statement move line in the same currency,
and having the bank statement currency and
the company currency the same),
to prevent gain/loss exchanges during currencies conversion.
Computing the amount of the statement line
within the currency of the invoice is useful
to compute the difference of amount paid within the company currency
when a change of currency rates occured between the invoice date
and the date of the payment.
Nevertheless, recomputing the amount in the currency of the company
is useless when the payment currency
and the company currency are the same,
and the amount of the invoice and the statement in the foreign currency
are identical, since the amount is already computed, within the
debit/credit field of the invoice move line.
Besides, this prevents gain/loss changes.
opw-631748
opw-632133
opw-631895
closes#6559
When the target currency is the company currency, there
is no need to re-compute the debit/credit amounts of the move lines,
since these debit/credit values already contains the amount
of the move line within the company currency.
Avoiding the recomputation prevents gain/loss during currencies exchanges
opw-631748
opw-632133
opw-631895
If a line of the invoice move was in a foreign currency
but its residual amount in this foreign currency was 0,
the `amount_residual` (in company currency) was used,
instead of the `amount_residual_currency`, which
is the residual amount in this foreign currency.
This was due to the fall back with the `and / or` statement.
Using `if / else` instead solves the issue.
This could lead to issues when the residual amount
in the foreign currency was 0, but the residual amount
in the company currency was 0.01, due to the exchange rate
loss.
In SQL, the addition/subtraction between NULL and an integer/numeric
returns NULL.
Therefore, if either debit or credit was set to null instead
of 0.0, debit-credit returned null, instead of the actual subtraction
opw-634044
This reverts commit a1da6c2132.
This revision was a temporary patch to solve function fields
computation issues, solved thanks to the commit b7f1b9c01e
Use the sale description for suggesteds items.
So when seeing suggesteds items in a quotation, we so the sale description
(if there is one) next to the product name.
It was already done for contained items, but not for the suggested ones.
closes#6565
opw-634507
This is related to revision bb913d0.
':' in product names are removed, to avoid issues when
searching products with ':' in their name.
JS replace method only replaces the first occurence, if the
needle isn't set as a regex with 'g', e.g. /':'/g
opw-634547
When seen from a mobile, the shortcut menu was over the content of the
quote and hid it.
This fix sets the menu inline in the page when he has no place to be on a
column on its own.
opw-633890
Within the 'import invoices' wizard in bank statements
(addons/account/wizard/account_statement_from_invoice.py)
Prevent currency rate differences when the statement
currency is within the company currency (and therefore
the debit/credit fields are already within the currency
of the statement)
opw-631895
Closes#6504
The datejs globalisation files are loaded based on the user's language.
If the file is not present, the loading crashed and the user could not access to
the web client.
Adding empty files for lo_LA and renaming bs-BS.js to bs-BA.js for bs_BA (see
65d92da) that were missing.
By the way, this is a 0 bit commit, beat that!
Improves aea358ca67 and avoid spurious
redirects for URLs that do not match a controller but do not
have a valid language.
When the URL does not match any controller, the language
matcher tried to strip the leading path component, treating
it as a language code. For example:
/fr_BE/page/homepage
would not match any route, so it would be rerouted internally
as /page/homepage, after setting `request.lang` to fr_BE.
This breaks the magical 404 handler that allows ir.attachment
entries to be mapped to static URLs. Due to the internal rerouting,
the mapping of e.g. /website_mycompany/static/src/image/logo.png
would be rerouted to /static/src/image/logo.png and not match
the mapped URL anymore.
Now the stripping of the path component will only occur if
that path component matches an installed language code.
The consequence is that URLs containing uninstalled language codes
will now lead to 404 errors - an acceptable trade-off (e.g.
when an older version of the website is still indexed by a search
engine)
- ctrl-enter only persist balanced reconciliations
- give a reconciliation proposition only if there's an unambiguous match
- added some missing tanslations
- use default order to display statement lines in reconciliation widget
In the case of sets, several stock moves can have
the same procurement.
Therefore, appending procurements in the list `procurement_ids`
without checking if the procurement isn't already in the list
could lead to having several times the same
procurement in that list,
and could therefore lead to the check of the same procurement
over and over, leading to performances issues and the fact you cannot
call `write` on a list having several times the same id.
See models.py 3875
Using a set instead of a list solve this issue
opw-634393
When searching if a many2one property field is not set, there may be less
results since only the ones with a reference set to NULL are returned.
We should also get those not in the table.
This commit change this case so instead of returning ['id', 'in', {matching non-set ids}],
the ['id', 'not in', {matching set ids}] is returned.
e.g: if (1, 3, 8) are set, (5, 9) are not set. ['id', 'not in', (1, 3, 8)] would
be returned instead of ['id', 'in', (5, 9)] which might not select all non-set
property fields.
closes#6044
opw-631057
Source from https://code.google.com/p/reset5/
Used same file to be able to merge in stable but should be moved to separate
file in lib folder in master.
Fixes#6376