This reverts commit a0eb172cab and thus
allow to actually use the longpolling feature.
The commit was made originally to better follow the debian packaging
guidelines.
A better solution will be implemented for v10: removing the `openerp-gevent`
script to replace it with a special argument in `odoo.py`.
There is still a dependency issue as we need psycogreen but this dependency
is not met in debian wheezy. This will be made a hard dependency for v10 as
it is available in debian jessie.
opw 678334
Cancelling a statement line should not remove the
according journal items if they are associated
to an `account.payment`.
In this case, this should simply remove
the `statement_id` of the move lines,
and unmark the `account.payment` as
reconciled.
opw-674896
[FIX] anonymization: default anonymization fields
res_partner.name was twice : remove one
res_users.name doesn't exist (now, it use the partner name) : remove
remove training.* fields that do not exists
Closes#11806
Actually, it was a Python ``Warning`` exception that was returned, and
not an ``openerp.exceptions.Warning``, that is an alias of ``openerp.exceptions.UserError``.
All actions of the database manager redirect the user after an action except the
backup option which returns an octet stream.
Close the modal after form submission to mimic the same behaviour.
Do not close the modal for other actions than database manager to avoid waiting
time for create that may be long to process.
Add message to warn the user about backup waiting time after cliking on submit
to be less confusing for big databases that may take a lot of time to be ready.
Fixes#10803
On an editable list view, an issue occurs with the following procedure:
- Click "Add an item", write something
- Press "Enter" key --> a new item is added, write something
- Click outside of the list, then click on the last item created
- Press "Enter" key --> the cursor is set at the beginning of the list
This is an issue for two reasons. First, the behavior is not the same if
we have clicked outside of the list before pressing "Enter", which is
not logical. Then, in some undetermined cases, the focus can be lost
then retrieved on the last record. It means that suddenly, the cursor
goes back at the beginning of the list without notice.
The latter issue is problematic when batch-encoding data, for example
encoding the lot numbers of incoming products thanks to a scanner.
opw-680758
The method `get_products_accounts` obviously requires
a fiscal position browse record for its `fiscal_pos` parameter:
```
@api.multi
def get_product_accounts(self, fiscal_pos=None):
accounts = self._get_product_accounts()
if not fiscal_pos:
fiscal_pos = self.env['account.fiscal.position']
return fiscal_pos.map_accounts(accounts)
```
But the method `product_id_change` called it with a fiscal
position id, through its own class method `_get_account`
This probably happened during the merge at revision
75d7bbb46e
which has not been correctly rebased on the acounting 9.0
revision
c04065abd8
opw-678735
* Fixes a bug that prevented the system to fetch the default provider
because the default_get call was wrong (wrong model + missing
company_id kwarg)
* Displays the amount as a monetary widget (to do that, the amount
must be sent as a float in the controller)
* Display the acquirer 'pre_msg' field to display eventual fees
When no `partner_id` was passed to `render()` and the acquirer
had a fees computation method, (e.g. Paypal), it would crash.
Could happen when coming through the /website_payment/pay
controller, for instance.
When the report `account.report_invoice` was being deleted,
it was no longer possible to reset an invoice to draft.
This is related to revision
291561a197
When tracking a page with special characters
in the title (e.g. `Ä`), the title
of the page in the tracked links was
badly encoded, because the
encoding was not handled correctly
when parsing the given website page.
opw-679993
In a batch reconciliation of journal items,
it could happen that multiple journal items
in a foreign currency required the creation
of an exchange entry
`aml_to_balance_currency |= aml`
But the statement `aml.matched_debit_ids[0] or aml.matched_credit_ids[0]`
requires a single browse record (singleton) to work
The partial reconciliation is supposed to be the same for all
the journal items to fix, we can therefore safely do
`aml = aml_to_balance_currency[0]` to overcome this issue.
In addition, in this condition, the full reconcile must be
skipped to avoid passing multiple times in the `create_exchange_rate_entry`
method (which is called in the method `create` of `account.partial.reconcile`
This has been reviewed by qdp.
opw-680044
res_partner.name was twice : remove one
res_users.name doesn't exist (now, it use the partner name) : remove
remove training.* fields that do not exists
Closes#11806
When a chart of account is created, ir.values for the fields taxes_id
and supplier_taxes_id in the model 'product.template' are created.
But if one of this two taxes are deleted, there was a crash when
creating a new product template because the default tax was missing.
opw:680576
When clicking on "Your Pipeline" in Sale app and clicking afterwards
on an opportunity, the form view "crm.crm_case_form_view_oppor".
But if you refreshed, the form view of a lead was used.
opw:677962
Partial backport of ef19830. The error message cannot be included for
compatibility reason, but the browser will highlight the field in red,
which should be enough to locate the error.
opw-677121
When an analytic account is added on an invoice line, the amount
recorded on the analytic line can be wrong if the invoice is not in the
company currency.
The issue is that the debit/credit amount is converted from the company
currency to the account move currency.
opw-679947
Fixing the error ValueError: "name 'date_from' is not defined"
while evaluating '[date_from, date_to, employee_id, contract_id]'
This commit close#12383, close#8883, close#3116
The command is not installed by default. It was available in the
python-support library which we didn't depend on and now this library
is no more in debian jessie/ubuntu xenial.
fixes#11785
* Remove dependency on less-plugin-clean-css which distribution
packages are broken on debian stretch and derivated.
* Updated documentation.
* Lessc provides a `--compress` argument that could solve this issue.
According to the documentation at http://lesscss.org/usage/: "[...]
Compress using less built-in compression. This does an okay job but
does not utilise all the tricks of dedicated css compression[...]"
However, using this argument works on lessc 2.5.3 but not on 1.4.2
(`--compress` arg is present but seems to be break some rules
i haven't been able to put my finger on).
* Finally, use the minification of the StylesheetAsset that takes care
of removing the spaces, the comments and the sourcemap with regexes.
fixes issue #9113
The parameter forward_debug is used to keep the debug mode during redirection.
Previous code was setting the debug to None which is ignored by werkzeug, making
the option useless.
Closes#12107
Closes#12131
[FIX] report: don't hide errors in custom reports
If a custom report's render_html raises a KeyError for some
reason, Report.get_html would swallow the exception and fallback
on generic HTML rendering, usually blowing up with unfathomable
errors of missing rendering context data.
Check if a custom report object exists instead of waiting for a
KeyError.
Introduced by e9b1254a5c. This commit made
sense but there are certain POS modules that send the order to the
backend before validation and thus depend on there always being a
creation date, even if the order has not been validated yet.
This ensures that we don't end up with an undefined creation_date in the
backend.
opw-680590
A lock occurs when the user wants to print a report having multiple barcode while the server is
started in threaded-mode. The reason is that reportlab has to build a cache of the T1 fonts
before rendering a barcode (done in a C extension) and this part is not thread safe. We attempt
here to init the T1 fonts cache at the start-up of Odoo so that rendering of barcode in multiple
thread does not lock the server.
Another workaround was to set an explicit lock around the reportlab's function call, but it's
more dangerous as it may introduce undetectable lock between python and postgresql.
Thanks to @odony and @KangOl.
Fixes#12236
This is related to revision
c8aac116a6
`message_follower_ids` is a one2many field
on the thread. To copy them, you must
create new `mail.followers` records, and not
linking the followers of the project
being duplicated to the duplicated project.
When cancelling and resetting to draft an invoice,
delete only the invoice report attachment from the
attachment, not all of them.
The reason why the report is removed from the
attachments on the invoice resetted to draft
is explained in
db0def38cc
opw-680295
Since duplicating a project copies the project
tasks, with the followers, the project followers must
remain as well.
This is done in the already overriden method
`copy` instead of simply adding `copy=True`
on the according one2many field, since this field
is defined on the inherited model
`mail.thread`, and to add `copy=True`, in the old api,
we would have to re-define the `message_follower_ids`
field within the `project.project`
model completely, making sure to copy all properties
opw-680313
When a user imports a CSV file on Windows, the "CSV Format Options…"
field does not appear. This is an issue since it might be necessary to
tune these options depending on the file, e.g. change the encoding.
For some unknown reason, on Windows, the file type is empty whatever the
browser used. Therefore, we fall back on the extension of the file.
opw-680347