Commit Graph
103345 Commits
Author SHA1 Message Date
Patrik Lermon 01a81b975b [FIX] base: position of SEK currency after amount
Source: http://lh.2xlibre.net/locale/sv_SE/ (p_cs_precedes)

Closes #12414, related to #12350
2016-06-14 14:23:30 +02:00
Richard Mathot 54cf8d0ce7 [FIX] account_voucher: allow the web client to catch the warning instead of returning the whole traceback
Actually, it was a Python ``Warning`` exception that was returned, and
not an ``openerp.exceptions.Warning``, that is an alias of ``openerp.exceptions.UserError``.
2016-06-14 14:12:37 +02:00
Martin Trigaux 0ec664d1a7 [FIX] web: close popup after backup
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
2016-06-14 13:42:14 +02:00
Jainik Patel 965b7d060c [IMP] stock: Lot/Serial Numbers label uniformization
In master one place is missing lots to lots/serial numbers.
2016-06-14 13:13:59 +02:00
Raphael Collet f16ce73287 [FIX] qweb: the code required non-whitespace chars betweem t-if and t-else directives 2016-06-14 13:12:19 +02:00
Raphael Collet e1fb2bd080 [IMP] qweb: improve regular expressions 2016-06-14 13:12:19 +02:00
Christophe Matthieu 83ba577c30 [IMP] qweb: improve code documentation 2016-06-14 13:12:19 +02:00
Raphael Collet a32053d308 [IMP] qweb: rename methods + small code improvements
_switch_directives() -> _compile_directives()
_serialize_static_attributes() -> _compile_static_attributes
2016-06-14 13:12:19 +02:00
Christophe Matthieu 639fb27ac0 [IMP] qweb: typo and adapt 2016-06-14 13:12:18 +02:00
Christophe Matthieu 1e48122800 [IMP] qweb: don't use directive for static content 2016-06-14 13:12:18 +02:00
Christophe Matthieu 3cc44bef2a [IMP] qweb: _get_field now returns tuple with force_display 2016-06-14 13:12:18 +02:00
Christophe Matthieu b3fc5b239b [IMP] qweb: split _call_body method 2016-06-14 13:12:17 +02:00
Christophe Matthieu 08eb9384d2 [IMP] qweb: use iterator to compile directives in order 2016-06-14 13:12:17 +02:00
Christophe Matthieu f015746549 [REM] ir_http: remove cache for public user (no longer necessary) 2016-06-14 13:12:17 +02:00
Christophe Matthieu f586f9441e [IMP] ir.qweb: cache assets and check content every 3 min
Don't use cache if the xml dev_mode is active
2016-06-14 13:12:17 +02:00
Christophe Matthieu 21ade25f83 [IMP] ir.qweb: call asset to_asset inside of _get_asset instead of inside the compiled code 2016-06-14 13:12:16 +02:00
Christophe Matthieu 269837429a [IMP] ir.attachment: add an index on url field 2016-06-14 13:12:16 +02:00
Christophe Matthieu 5db7fa65fd [IMP] ir.qweb: cache the asset filename to improve speed
gain: 50% time per asset
2016-06-14 13:12:16 +02:00
Christophe Matthieu f336c9efdc [IMP] ir.qweb: use lazy property for assets id and name
gain: 1ms/asset
2016-06-14 13:12:16 +02:00
Christophe Matthieu 1583194845 [IMP] qweb: typo: remove qwebcontext and use values 2016-06-14 13:12:15 +02:00
Christophe Matthieu fc79a62609 [FIX] ir.qweb: update tests 2016-06-14 13:12:15 +02:00
Christophe Matthieu 48b4abedea [IMP] qweb: add profile options to display the time use by all computed template 2016-06-14 13:12:15 +02:00
Raphael Collet 717692d76a [FIX] website_sale: use variable partner_pl in method _get_pl_partner_order() 2016-06-14 13:12:15 +02:00
Christophe Matthieu b3302398bc [IMP] ir.qweb: extract and create independent qweb class from ir.qweb
The goal is to make the code more readable, more easily be optimized, allowing to share the library "QWEB" (python and js) separately Odoo.
2016-06-14 13:12:14 +02:00
Christophe Matthieu 4530f65211 [IMP] ir_qweb: FileSystemLoader is only use by test 2016-06-14 13:12:14 +02:00
Christophe Matthieu d9efca0908 [IMP] qweb: t-field-options is a python dict, safe_eval for compile template, not need to eval in field methods 2016-06-14 13:12:14 +02:00
Nicolas Martinelli e0c4ec54ca [FIX] web: new record on editable list
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
2016-06-14 12:39:11 +02:00
Olivier Dony 285deb9a14 [FIX] base_import: handle other cases of wrong CVS mime types
Improves 8049d1e855 for other detected
cases, e.g. on Firefox + OSX.

opw-680347
2016-06-14 12:35:59 +02:00
Denis Ledoux 811771d3f8 [FIX] account_voucher: get_product_accounts expects a browse record
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
2016-06-14 12:21:27 +02:00
Christophe Matthieu f4f396c4ab [IMP] ir_qweb: remove eval_dict, eval_expr and eval_format_expr
The compiled code must be safe_eval, don't need to eval the string after the compilation (safe eval before ast insertion)
2016-06-14 09:46:26 +02:00
Christophe Matthieu 710a7cee14 [FIX] website: t-att-*** display empty string attribute
Remove attribute only if the result is False or None
2016-06-14 09:46:26 +02:00
Christophe Matthieu d159aec83d [IMP] qweb: remove decode('utf-8') in report because qweb return unicode 2016-06-14 09:46:26 +02:00
Christophe Matthieu 956bb2b6e9 [IMP] base ir.qweb: add and update tests for the new ir.qweb 2016-06-14 09:46:25 +02:00
Christophe Matthieu 7ede9bcb2d [IMP] base ir.qweb: compile template (and use ast) to improve rendering speed
* The compiled templates are cached per user, lang, inherit context values
* ir.ui.fields: attributes method return an dict, and record_to_html return only the content value of the field
* all rendered text use build_text and all attributes use build_attribute
* t-esc-options is removed and replace by format_value method
* AssetsBundle receive the list files and remains
2016-06-14 09:46:25 +02:00
Christophe Matthieu 3ebf46fcc0 [IMP] base: add a constraint on ir.ui.view to avoid groups on template
Template arch can contrains "groups" attributes on the html tag but can't have group_id setted. (to allow a cache per template and lang instead of a cache per template, user and lang)
2016-06-14 09:46:25 +02:00
Christophe Matthieu 089fd3f145 [IMP] base: user_has_groups can express negative groups with "!"
Allow access if the user has at least one group, and has no one !group
E.g.: groups="a,!b,c,d,!e"
(a, c, b) prevent access
(c) allow access
So the negative groups have precedence.
2016-06-14 09:46:24 +02:00
Christophe Matthieu 0ebf073cdb [FIX] ir.ui.view: split search() triggering ORM bug
Search terms inside an OR branch in a domain
cannot currently use relationships that are
not required. The root cause is the INNER JOIN
used to implement it.
2016-06-14 09:46:24 +02:00
David Monjoie 1a1efe3fce [IMP] website_sale_digital: downloadable attachment marked by product_downloadable field
This allows the user to continue using the attachment feature, without making it public by
default, which was the case in the previous implementation. If you wanted to use the
product digital attachments, you were foresaking the standard attachment feature since
everything you would attach to the product would then be public and downloadable.

The "digital" product type was also removed, because you could very well want to provide
downloads for a stockable product, like an online manual or a warranty document, or
provide downloads for a service, especially considering digital products are considered
service in european laws.

The product template and variants stat buttons have also been changed:
- The template stat button now only displays the files associated at the template level,
instead of showing all the files available accross all variants.
- The variant stat button now displays the files associated with it but also with the
corresponding template, instead of showing only the files associated with the variant.

These new stat buttons are closer to what the customer will see in practice, since the
variant level stat button will show the set of files that the customer will be able to
download when he has bought that product variant. Previously, the template showed a set
of files that was never presented to any customer (since it contained the files from all
the variants at once), and the variant was showing less files, since it was ignoring the
ones from the template.
2016-06-14 09:37:35 +02:00
Ravi Patel 9416483465 [IMP] website_quote: Hide 'Unit Price' column from quote template line.
The unit price of the quote template lines is never be used anywhere

It is logical that pricelists determine the price of products and this
field is quite informative.
2016-06-14 09:17:40 +02:00
Damien Bouvy 87717509c0 [FIX] website_payment: fetch default provider + render issue
* 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
2016-06-14 08:53:41 +02:00
Olivier Dony 0f5f960c60 [FIX] payment: render acquirer form values even if partner is missing
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.
2016-06-13 19:21:02 +02:00
Denis Ledoux c95e46eedb [FIX] account: invoice reset to draft when the default report is removed
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
2016-06-13 19:00:03 +02:00
Denis Ledoux 49a9eba6e2 [FIX] point_of_sale, hw_scale: typo weighting -> weighing 2016-06-13 17:54:39 +02:00
Denis Ledoux 2d47ea2563 [FIX] link_tracker: page title encoding
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
2016-06-13 17:30:59 +02:00
Denis Ledoux 3b4560cf42 [FIX] account: multiple journal items to fix in full batch reconciling
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
2016-06-13 17:20:48 +02:00
Simon Leblanc ec005af5b9 [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
2016-06-13 17:09:02 +02:00
Simon Leblanc 45483b963e [FIX] anonymization: allow anonymization on HTML fields
Was missing in the (old) list of fields
2016-06-13 17:09:02 +02:00
Simon Leblanc 42aa79d63f [CLA] Sign CLA of leblanc-simon
Done at #11806
2016-06-13 17:09:02 +02:00
Goffin Simon 96621a3427 [FIX] account: deleting a default tax(ir.values)
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
2016-06-13 17:00:16 +02:00
Yannick Tivisse fe9f077872 [IMP] web_planner: 'data' and 'progress' are company dependent
Purpose:
The settings planner (implementation guide) is confusing when in multi-company:
- The accounting planner shows information about the current company; which is OK
- But the planner is not specific to that company: it is the same for all companies which is wrong.
2016-06-13 16:33:44 +02:00