Commit Graph
9577 Commits
Author SHA1 Message Date
Jeremy Kersten 2e0caa1b24 [IMP] base, portal: improve demo data of res_partner
Use company_name field and no more the street field
to save the company name.
2016-07-06 08:33:46 +02:00
Christophe Simonis 05e0bf3f1b [MERGE] forward port of branch saas-11 up to e7190cb 2016-07-06 00:03:49 +02:00
Christophe Simonis e7190cbbbf [MERGE] forward port of branch saas-10 up to 74b51d3 2016-07-05 23:42:12 +02:00
Christophe Simonis 74b51d3d97 [MERGE] forward port of branch 9.0 up to 489ea42 2016-07-05 23:19:50 +02:00
Christophe Matthieu 253a0f6311 [FIX] qweb: no automatic asset invalidation except in dev_mode
In non-xml-debug mode we want assets to be cached forever, and the admin can force a cache clear
by restarting the server after updating the source code
2016-07-05 18:44:59 +02:00
Christophe Matthieu 032122484e [TYPO] qweb: use the same option attribute for t-esc t-raw and t-field
t-options instead of t-field-options
2016-07-05 18:44:58 +02:00
Christophe Matthieu 940e23a7dc [IMP] qweb: t-esc/t-raw use t-options instead of format method
t-field, t-esc and t-raw use the same widgets and options
2016-07-05 18:43:14 +02:00
Christophe Matthieu 339d5b8505 [FIX] qweb: float widget: use same rounding as orm float field
42,12345 with precision=4 should be 42,1235 and not 42,1234
2016-07-05 18:43:10 +02:00
Christophe Matthieu 229ab3e1ca [IMP] qweb: move code to gather similar methods and to facilitate the reading of the code 2016-07-05 18:43:09 +02:00
Christophe Matthieu ae5f853819 [IMP] qweb: remove values from record_to_html to avoid crappy code 2016-07-05 18:43:09 +02:00
Christophe Matthieu 3407fb70e4 [IMP] qweb: add t-options on t-esc and t-raw who use 'ir.qweb.field' models
Remove 'field' from 'value_to_html' method attributes
't-esc' escape the result of the widget.
(Added 'remove_span' as option for monetary widget)

E.g.: <t t-esc="32" t-options='t-options='{"widget": "monetary", "display_currency": website.currency_id, "remove_span": True}'>
result: $ 365.00
2016-07-05 18:43:09 +02:00
Christophe Matthieu 7e1f2eb91e [IMP] ir.qweb: format monetary use field monetary method
(facilitate code maintenance)
2016-07-05 18:43:09 +02:00
Christophe Matthieu 4c76e9a9df [FIX] ir.qweb: use options instead of context to load asset content
The _get_asset_content is cached in function of the template option, don't use context to load content because we must load the asset in function of the compiled caller template.
2016-07-05 11:31:03 +02:00
Philipp Hug 84daaa1658 [FIX] base: use correct address format for CH/LI
Closes #10911
2016-07-04 17:12:14 +02:00
Jeremy Kersten e4a317a176 [ADD] website_sale: checkout process
Change checkout process.

- Billing address is always the connected partner_id or neww partner_id.
- Shipping address is contact of current commercial_partner_id
- New checkout design for address selection
- Add delete a line in my cart
- Fix input quantity size
- Refactor/Reindent xml template from website_sale
- Improve the modularity for checkout (preprocess, posprocess, required fields, ...)
- Allow to use form builder in extra step for OEE (No edit mode)
- Add route to have states according country selected (need to be overridable for website_sale_delivery)
- ...
2016-07-04 15:48:15 +02:00
Jeremy Kersten bf88456943 [ADD] base: add company_name field on res_partner
res_partner now have a new concept of company_name. (duplicaed of parent_id)

That allow to a frontend user to have a company name without create a useless
tree of "Company -> Partner -> Contacts"

Before this commit, we was using street2 or street field to do the same thing.
That was confusing in some screens because according from where the partner has
been created, the company name was stored in distinct field and that was like
a bug for some users.

commercial_company_name is based on the same behavior of commercial_partner_id.
It is base on the field company_name.

In Partner form wiew, a quick button has been added in edit mode if however
the user want to create the partner tree to add new collegues.
2016-07-04 15:48:15 +02:00
Jeremy Kersten 15fe3d43b4 [IMP] base: add required state for address
Some address have required state.
We add by default moreover 500 new states.

We try also to merge duplicated states
wich have the same country and code.

Once merge is done, we try to had the unicity constraint
to avoid futur duplicates.

Merge code, should be removed in v11.
2016-07-04 15:48:15 +02:00
Mansi Gandhi c5cf412c10 [FIX] base: incorrect migration of 'res.config.settings' 2016-07-04 13:31:40 +02:00
Christophe Simonis 5a3a06f26f [MERGE] forward port of branch saas-11 up to d4d09df 2016-07-04 13:16:34 +02:00
Odoo Translation Bot e349692ede [I18N] Update translation terms from Transifex 2016-07-03 00:32:09 +02:00
Olivier Dony d4d09df143 [MERGE] Forward-port saas-10 up to f76f4cd0b6 2016-07-01 20:14:28 +02:00
Olivier Dony f76f4cd0b6 [MERGE] Forward-port 9.0 up to 7f2e748a22 2016-07-01 18:36:24 +02:00
Olivier Dony 8d8f1bdb6a [FIX] ir.qweb: t-lang had no effect anymore, e.g. when printing reports
Setting the env of the qwebcontext is not sufficient because the closure
of the `loader` carries its own contexts and lang, so subsequent t-calls
may still use the original language.

This was broken by the new API conversion at commit
4ddc323139,
and further broken by the forward-port
6c8141a1dfa9fa44067d052b368e3851972d836cA with a wrongly indented line.
2016-07-01 18:09:32 +02:00
Raphael Collet 4ee6adf4b2 [IMP] models: model extension may not change kind (abstract, model or transient)
This prevents a model extension from:
 - changing an abstract model to a non-abstract one,
 - changing a transient model to a non-transient one or vice-versa.
2016-07-01 16:01:04 +02:00
Simon Lejeune 7f2e748a22 [REV] base: allow 'render' override with new api
Using a frozendict as context breaks the `t-lang` mechanism, as
the `loader` is not aware of the changes of a copied frozendict
and thus is still using the values from the original context,
including the lang one.

This reverts commit e1deae7eab.
2016-07-01 15:41:39 +02:00
Raphael Collet 5560ac4a04 [FIX] models: generalize the protection mechanism to not recompute some fields
The protection prevents fields to be invalidated/recomputed on some records.
This mechanism is useful against accidental cache invalidation when computing
or inversing fields.  It also prevents to trigger the recomputation of fields
before and/or after their inversion.

Add a test on stored field with compute and inverse methods: the test checks
how many times the compute and inverse methods are invoked in several cases.
Essentially, the field should not be recomputed when it is written.
2016-07-01 10:49:27 +02:00
Olivier Dony 2fb0784d64 [IMP] base: simplify code from b3feb2358c 2016-06-30 20:08:35 +02:00
Yannick Tivisse 2f020dc8b9 [IMP] Remove 'author' field in __openerp__.py files to user default value 2016-06-30 13:27:46 +02:00
Denis Ledoux bc2a06c019 [FIX] http, website_form: preserve form input values order
By default, werkzeug doesn't preserve the order
of the parameters sent to routes.

As stated in the werkzeug documentation:
```
parameter_storage_class

the class to use for args and form.
The default is an ImmutableMultiDict which supports multiple values per key.
alternatively it makes sense to use an ImmutableOrderedMultiDict
which preserves order or a ImmutableDict which is the fastest
but only remembers the last key.
It is also possible to use mutable structures, but this is not recommended.

New in version 0.6.

```

For some of our use cases, it makes sense to keep the order
of the route parameters.

e.g. In the website builder, when building a form
with a bunch of inputs values that will be concatened
in a lead note, the user expects the answer to be displayed
in the same order than the form inputs.

This change is seen as a bit risky as it could lead to
performances issues in the http routes processing, and this
is the reason we do not merge this in stable 9.0 at the moment.

If needed, it could be back ported later to 9.0, after
several weeks/months of testing in this release(saas-10 atm).

opw-677508
2016-06-30 10:45:55 +02:00
xmo-odoo b3feb2358c [IMP] allow group_operator on any field
There's really no reason to limit group_operator to numeric fields and Postgres's flexible aggregate make the ability to aggregate on non-numeric fields (and/or non-numerically)

* moves group_operator to Field
* adds a default value of `sum` on integer, float and monetary fields
* in read_group, filters on fields with a group operator rather than by
  type (also allow id fields, since Id doesn't have a group_operator by
  default it will be ignored anyway) (sequence is still specifically
  excluded for now because they're usually regular Integer fields)

Closes #12372
2016-06-29 17:52:30 +02:00
Yannick Tivisse 3106d5a3f2 [IMP] web_settings_dashboard,web_tour: usability improvement from user tests
1/ The tip should be on the textarea, not on the button.

2/ The access right field on the quick user creation form is confusing.
   I propose to put it in "Technical Feature" so that it's not visible for normal users.

3/ dissociate les settings tour from project tour
2016-06-29 12:02:19 +02:00
Christophe Simonis 93e6316029 [MERGE] forward port of branch saas-11 up to 7153077 2016-06-28 18:05:25 +02:00
Christophe Simonis 5166fbd21b [MERGE] forward port of branch saas-10 up to 6d51bce 2016-06-28 15:12:06 +02:00
Christophe Simonis 841aa4e208 [MERGE] forward port of branch 9.0 up to 3e15b86 2016-06-28 14:10:35 +02:00
Christophe Simonis 10550aa5a5 [MERGE] forward port of branch saas-6 up to e68ed41 2016-06-28 13:11:35 +02:00
Christophe Simonis e68ed417b6 [MERGE] forward port of branch 8.0 up to 3e965ec 2016-06-28 12:23:54 +02:00
Raphael Collet c78a3811b8 [IMP] models: make records.mapped(arg) return records when arg is falsy
This extension of the method `mapped` is a consistent extrapolation of mapping
a recordset through an optional sequence of relational fields.  It removes the
necessity of special-casing the empty sequence, and also avoids an obscure
exception in that case.
2016-06-28 10:16:26 +02:00
Martin Geubelle f8ca7634ca [FIX] base: rate with correct current user's company
Bug introduced in 7eab8e2.

As `self.env.user` is browsed with `sudo`, the result of this call
will always return the admin's current company and not the user's current
company.

opw-681809
2016-06-27 16:20:47 +02:00
Aaron Bohy d9cc893dbc [IMP] openerp: models.py: use LOG_ACCESS_COLUMNS constant 2016-06-27 15:30:45 +02:00
Christophe Matthieu 5aac400e33 [IMP] qweb: use CDATA in test and remove stringify_children method 2016-06-27 14:29:04 +02:00
Christophe Matthieu 15e1f88a73 [FIX] qweb: fix t-if and t-else and add test
Can not use remove with the loop for in (in _compile_directive_content)
2016-06-27 08:08:00 +02:00
Fabien Pinckaers 28656a1a3c [IMP] base: currency: add a form view to hide company 2016-06-25 23:57:58 -07:00
Odoo Translation Bot 3e965ecf58 [I18N] Update translation terms from Transifex 2016-06-26 02:57:50 +02:00
Odoo Translation Bot 765b3fc6ac [I18N] Update translation terms from Transifex 2016-06-26 00:29:54 +02:00
Aaron Bohy 1339180ba8 [ADD] base: ir_actions: target attribute for ir_actions_client
Allows to open a client action in a dialog, fullscreen, or in the current
window with a cleared breadcrumb
2016-06-24 16:26:05 +02:00
Olivier Dony e7f6d3bc11 [FIX] ir.config.parameter: error in new API conversion
The conversion at eb04aa1e39
failed when `force=True`.
2016-06-24 14:23:29 +02:00
Olivier Dony ed695de2a0 [IMP] ir.config.parameter: unused imports 2016-06-24 14:23:29 +02:00
Christophe Simonis 4030f2fd32 [MERGE] forward port of branch 8.0 up to 297bbff 2016-06-23 16:21:28 +02:00
Christophe Matthieu f5797ae1b6 [IMP] qweb: add backward compatibility for t-field-options 2016-06-23 12:03:03 +02:00
Christophe Matthieu 2dc19eb6f0 [FIX] qweb: use python builtins for safe_eval._BUILTINS key instead of value.get('key') 2016-06-23 12:03:03 +02:00