Commit Graph
3175 Commits
Author SHA1 Message Date
Odoo Translation Bot b21d1ae98e [I18N] Update translation terms from Transifex 2016-12-25 04:42:15 +01:00
Pratima Gupta dccfdb0ddb [IMP] account: onboarding invoice report layout
Impacted modules : base, base_setup,
account, report, and base_vat

The purpose is here to ease the creation
of the first invoice. To do so, we need to
ease the configuration of VAT, company data,
and report layouting.

This commits brings
- better labelling for TIN, VAT and Tax Id
for partner and companies (form view, ...)
- change settings for footer of report : allow
to use custom or standart footer, and display them
in settings view.
- always display TIN in standart report footer
- remove (demo) data of main company to not set
company logo on reports

Also, a message is display on the report when the
data company are not configured yet.

The invoice report is now regenerated each time
the user want to print it.
2016-12-23 09:29:09 +01:00
sap 8309d4f4a8 [IMP] base: Hide Apps --> Update menuitems into no_one group
fp request
2016-12-22 11:18:17 +01:00
Raphael Collet 81a4830c73 [FIX] base: race condition in filestore GC (ir.attachment) 2016-12-21 16:14:25 +01:00
Martin Trigaux 0b0afc62b1 [FIX] test_translation_import: remove inexistant menu
Introduced at 11812b0
2016-12-21 11:04:49 +01:00
Martin Trigaux 53f6552d08 [FIX] tests: migrate to the new api
Leftover references to cr, uid
2016-12-21 11:01:33 +01:00
Raphael Collet 253b1a8251 [FIX] performance: do not prefetch binary and serialized fields by default 2016-12-21 09:22:30 +01:00
David Dufresne b9f43eff53 [FIX] base: correct unlink call
Is either `self` or `report` but not both.
Introduced at 4ddc323

Closes #14739
2016-12-19 12:05:44 +01:00
Odoo Translation Bot 1b1da3b399 [I18N] Update translation terms from Transifex 2016-12-19 10:33:43 +01:00
Odoo Translation Bot 5c4316a864 [I18N] Update translation terms from Transifex 2016-12-18 03:43:02 +01:00
Raphael Collet 1cfbbfafb8 [FIX] module deinstallation: do not prevent ir.model.field deletion
Some code prevents to modify or delete an `ir.model.field` if another field
depends on it (like one2many depending on many2one).  Make a special case when
the code is executed during a module deinstallation.

OPW 694009
2016-12-16 17:09:28 +01:00
Raphael Collet 7d19661fb6 [FIX] models: allow @constrains on fields with inverse method 2016-12-15 09:53:58 +01:00
Denis Ledoux 487c612f0c [FIX] web, orm: allow 0 as key for selection fields
Before this revision,
using a selection field with as possible keys `0`,
such as `require_payment` in `website_quote`,
resulted to the records field values to be stored
as `NULL` instead of `0` in the database.

This leads to the inability:
 - To distinguish records with this selection field not set
   or set to `0` (as both are stored as `NULL`)
 - To search for records with the field set to `0`
   (as they are considered not set)

For instance, while having `website_quote` installed,
search for sales orders with `Payment` set to
`Not mandatory on website quote validation`: It won't
return any result, even if you have some.

opw-697454
2016-12-12 18:18:51 +01:00
Christophe Simonis 8a808d1703 [MERGE] forward port branch 10.0 up to 8094970 2016-12-11 10:57:39 +01:00
Christophe Simonis 8094970df1 [FIX] fields: also protect computation of draft record fields 2016-12-11 10:24:29 +01:00
Odoo Translation Bot f5adc1ade0 [I18N] Update translation terms from Transifex 2016-12-11 03:43:27 +01:00
Christophe Simonis c292202a47 [MERGE] forward port branch 10.0 up to 18456b9 2016-12-09 15:58:39 +01:00
Christophe Simonis 18456b9d42 [MERGE] forward port branch saas-11 up to 321b7dc 2016-12-09 15:44:01 +01:00
app d6ead3dbe0 [FIX] base: show attachments of archives records
When testing the access rights, attachments associated with
archived/inactive records are inadvertently being hidden due to
the default ORM behavior of search.

Patch simplified while merging.

Closes #14366
2016-12-09 11:51:21 +01:00
Simon Lejeune e433625cfb [FIX] qweb: render of a primary view
Revisions [1] and [2] broke the rendering of extensions-primary view
because it made the wrong assumption that the `read_template` of an
extension-primary view set the `t-name` attribute to the name of the
extension-primary view.

We now patch the `t-name` in the `read_template` result for this case.
[1] 12e36a66f2
[2] 9dd5bd9349
2016-12-08 11:49:06 +01:00
Raphael Collet b62d078c9d [FIX] models: identify sparse fields with field.sparse 2016-12-08 11:08:01 +01:00
Moises Lopez f507fc95c7 [IMP] fields: remove '_id(s)' from the label
For autogenerated labels.
Use title instead of capitalize to get every word with a capital letter.

Closes #12769
2016-12-07 10:47:04 +01:00
Nicolas Lempereur b51d21c5b8 [FIX] tools: nbsp+sanitize = write
lxml.html.clean module we are using to sanitize html takes either a
tree/element or string, and return us an element of the same type.

We are passing it an unicode string, and it gives us back an unicode
string and if it is possible convert entities to utf-8.

This lead to an issue in html inline fields containing an ` `
entity, the entity was converted by the sanitizer to its unicode
character (U+00A0).

Then, when the field value is loaded to be displayed, the internal
value contains U+00A0 characters, but when it is inserted in the page
the browser converts them to ` `. Hence in this instance, the
internal value is never equal to the displayed value and a write is
always triggered even without editing.

This commit simple modify the sanitizer so value saved in database
contain ` `.

closes #14569
opw-689274
2016-12-06 18:54:46 +01:00
Christophe Simonis b33f919e3d [MERGE] forward port branch 10.0 up to aec8e25 2016-12-06 17:38:40 +01:00
Christophe Simonis aec8e2582f [MERGE] forward port branch saas-11 up to 345755e 2016-12-06 17:24:37 +01:00
Eric Antones d6b26f1d62 [FIX] base: Catalan separator format and thousands separator
* The thousands separator does not appear by default in Catalan language. Using
it is the usual practice

Closes #14123
2016-12-05 16:43:14 +01:00
Alexis de Lattre ef8116628b [FIX] base: display the value of ir.property
For the records with type='selection' (example: "Cost Method Property")

Closes #14413
2016-12-05 16:33:56 +01:00
Osval Reyes 5a4c548ab1 [REF] base: update peruvian currency symbol
- Currency symbol position is set before the amount, not after
- Since last month 2015 (see https://es.wikipedia.org/wiki/Sol_(moneda_del_Per%C3%BA) )
the currency passed from S/. to S/ (without the dot)

Closes #14370
2016-12-05 16:26:55 +01:00
Jérome Maes 13f84b9aca [REM] *: remove ir.needaction mixin
ir.needaction_mixin is not used anymore by the webclient.
From 9.0, the concept has changed: this feature is now
available in mail module, with the mail.thread mixin,
and message_neeadction field.

Remove all code handeling needaction bullet and
counter on ir.ui.menu, knowing that since 9.0
webclient does not display the counter anymore.

This code was, thus, useless and some RPC calls
were done for nothing, and adapt accounting
reconcialiation widget.
2016-12-05 11:30:03 +01:00
Odoo Translation Bot 260a3da768 [I18N] Update translation terms from Transifex 2016-12-04 03:44:39 +01:00
Olivier Dony 553ea82f81 [FIX] ir.qweb: invalidate cache only when active
Complements rev. 8a7af44a07

The assets cache is only active while not in "xml dev" mode,
so the cache clearing must not be done while this development
mode is active (i.e. with `--dev=xml`)
2016-12-02 17:19:08 +01:00
Olivier Dony 8a7af44a07 [FIX] ir.qweb: force multi-worker bundle invalidation
When a newly-spawned worker detects a stale asset bundle
(due to its empty cache), it regenerates the new bundles,
but has to notify other workers, who would otherwise continue
serving the old list of bundles. This typically leads to
some missing bundles (served as empty files with 404 status),
that could only be cured by restarting the whole server.

Forcing the cache invalidation on the worker that notices
the staleness has no effect (the cache was empty) except
that it causes a cache refresh signal to be broadcast to
all workers.
2016-12-02 12:25:16 +01:00
Simon Lejeune 12e36a66f2 [FIX] qweb: render a child view with its xmlid
QWeb's get_template:
  * remove the fallback that returned the entire result of IRQweb's
    `load` if no match was made between the t-name of the first children
    of this result and the template to render
  * When get_template receives an etree, directly return it and don't
    try to find a matching t-name in it. The loader was not called but
    a matching was trying to be made, now that we removed the fallback
    a lot of tests that were relying on passing etree didn't work
    anymore.

IRQweb's load now return consistently the full result of IrUiView's
`read_templace` when asked to load an id or an xmlid. We make a special
case to patch the result if asked with an id or with a child view so
that the "t-name" of one of the first children of what we return is
always what QWeb is looking for.
2016-12-02 12:24:51 +01:00
Simon Lejeune 9dd5bd9349 [ADD][TEST] qweb: render a child view with its xmlid
Issue: rendering a child view with its xmlid return its `read_template`
wrapped in a "templates" tag. In the context of asset bundles, it leads
to the browser not being able to handle it correctly.

Explanation:

What happens when you render a view? First, QWeb will call is method
`get_template` with the argument `template`. This argument contains the
name of template you try to render. It can be an id or an xmlid (also an
etree but let's forget this one at the moment). Within the method
`get_template`, it'll call IrQweb `load` method, again with the argument
`template`.

This `load` method will call IrUiView's `read_template` wih `template`
as argument. This method will return the view in the database with all
inheritance applied, wrapped in a "templates" tag. When `read_template`
has returned, the `load` method will, according to `template` and in the
following order:

  * if `template` is an xmlid, return the whole `read_template`.
  * if `template` is an id and if one of the first child has "t-name"
    attribute (whatever its value): return the subtree of this first
    child.
  * if `template` is an id and one of the first child is a "t" tag: set
    a "t-name" attribute to this first child with the id as value and
    return the subtree of this child.

As you may note, inconsistencies already appear.

Now that QWeb's `get_template` has finished its call to IRQweb's `load`,
it'll do:

  * if one of the first child of what's returned as a "t-name" attribute
    matching the `template` argument, return this subtree
  * return the whole thing returned by IRQweb's `load`.

Let's say we have a view:

                <t t-name="base.dummy">
                    <div><span>something</span></div>
                </t>

What happens if we render this view with its xmlid? First Qweb's
`get_template` will load the template with the help of IRQweb's `load`
method. As it received an xmlid as argument, it'll return the whole
`read_template` output, wrapped in a "templates" tag. Qweb's
`get_template` will now check if one of the first child has a "t-name"
attribude matching the `template` argument (base.dummy in our case). It
has one, so it returns the subtree and the compilation continue.

What happens if we render this view with its id? IRQweb's receives an id
as argument, gets the `read_template` of it and check if one of the
first child has a "t-name" attribute. It does, so it returns this
subtree to `get_template`. The latest will check if one the first
children has a matching "t-name" attribute with the `template` argument.
It does not, so it returns the whole thing.

Weird things in the way we got here but the result is the same whatever
you tried to render the template with an id or an xmlid.

Now let's add an extension to this view and try to render it (the
extension):

                <xpath expr="//div" position="inside">
                    <span>another thing</span>
                </xpath>

What happens if we render this view with its xmlid? `load` will receive
an id, so it'll return the whole `read_template` stuff. Note here that
if you try to render a parent or child view, `read_template` will return
the same thing: the parent with all inheritance applied. Now `get_template`
looks through the first children of this to find a matching "t-name" and
it doesn't find one, as the "t-name" is the one of the parent view and
we tried to render with the child xmlid. It so returns the whole thing,
wrapped in a "templates" tag. There's our issue.

It's working if we tried to render the thing with its id because `load`
would have returned the right subtree.

This commit adds a test showing the failure.
2016-12-02 12:24:51 +01:00
Christophe Simonis 0b846861b6 [MERGE] forward port branch 10.0 up to 5dc1c57 2016-12-01 17:05:08 +01:00
Christophe Simonis 5dc1c57601 [MERGE] forward port branch saas-11 up to 7842498 2016-12-01 16:59:33 +01:00
Kishan Gajjar 167057800b [IMP] web,website: Only display planner for group_system users
Planners should only be visible for "base.group_system" user group (admin settings) because there are links to install apps etc. For now missing access rights messages whenever you click a settings link.Only for admin and not by company.
Admin and the user who has "base.group_system" rights can see the planners.
2016-12-01 16:32:01 +01:00
Martin Geubelle ed22e0fb84 [ADD] base: display unpickled value 2016-12-01 14:38:30 +01:00
Odoo Translation Bot 8de795291a [I18N] Update translation terms from Transifex 2016-11-27 03:41:40 +01:00
Christophe Simonis 7d4ac39c4c [MERGE] forward port branch saas-12 up to d853d3c 2016-11-24 18:35:42 +01:00
Odoo Translation Bot 9ab572fa4c [I18N] Update translation terms from Transifex 2016-11-23 13:50:32 +01:00
Yannick Tivisse 98cb4719db [REM] workflow: Remove workflow engine, documentation and tests 2016-11-23 11:52:39 +01:00
Christophe Simonis e348330b57 [MERGE] forward port branch 10.0 up to 6a18e31 2016-11-22 17:59:41 +01:00
Moises Lopez - https://www.vauxoo.com/ 4fb15ccdd7 [RES] base: Add thousand separation for es_MX ","
More information from https://en.wikipedia.org/wiki/Decimal_mark section:
"examples of use"
`The following examples show the decimal mark and the thousands separator in
various countries that use the Arabic numeral system.`
`Style: 1,234,567.89    Countries: Malaysia, Mexico, New Zealand, Pakistan,
Philippines, Singapore, Taiwan, Thailand, United Kingdom, United States`

Closes #14402
2016-11-22 15:08:39 +01:00
angelfentanez e965ac14dd [FIX] modules: add missing parameter to find_module
AddonsImportHook's find_module method to follow PEP302 by setting None as
default for the path parameter
Similar to edeb5a8c

Fixes #14087
Closes #14088
2016-11-22 14:51:05 +01:00
Christophe Simonis 457a705bf0 [MERGE] forward port branch saas-12 up to d1fddd2 2016-11-22 14:02:03 +01:00
Martin Trigaux b5c555ff0a [FIX] base: avoid duplicated translations
This commits fixes the following scenario:

1. load translations in language X
2. modify the source of a translated record (e.g. email template body)
3. click on 'load translations' button (flag)
4. execute the translation wizard for the same language (to refresh)

The translation of the modified record was duplicated.
This was due to the field src in the database being different than the msgid in
the po file. The src value is updated on the `insert_missing` call.

The matching on src for type='model' translations is only needed due to the
translations that are split (e.g. xml views or html content). For the other
translations, matching on the rec_id is enough.

opw-691752
Closes #14310
2016-11-22 11:37:02 +01:00
Jeremy Kersten 651976521b [IMP] base, mail: action server: remove deprecated code 2016-11-21 12:56:59 +01:00
Odoo Translation Bot bad26aae2e [I18N] Update translation terms from Transifex 2016-11-20 03:37:19 +01:00
Christophe Simonis 2d26229052 [MERGE] forward port branch 10.0 up to ea675d8 2016-11-18 18:29:23 +01:00