Commit Graph
2472 Commits
Author SHA1 Message Date
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
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
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
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
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
Christophe Simonis ea675d8b76 [MERGE] forward port branch saas-12 up to ff7f3d6 2016-11-18 18:03:47 +01:00
Jeremy Kersten a55ee3858c [FIX] *: convert action server to new syntax
Use record / records instead of deprecated locals
2016-11-18 10:03:48 +01:00
Christophe Simonis e2fcace05e [MERGE] forward port branch 10.0 up to 13dc704 2016-11-17 15:27:29 +01:00
Christophe Simonis 13dc7041a6 [MERGE] forward port branch saas-12 up to 1ef4061 2016-11-17 15:24:36 +01:00
Jeremy Kersten 9a8975be46 [FIX] base: add record, records in context of ir.actions
Purpose is to remove old variables in next version:
    - obj
    - object
    - cr
    - user
    - uid
    - context
    - pool
    - workflow

record = model.browse(env.context['active_id'])
records = model.browse(env.context['active_ids'])

obj, object => record
user => env.user
cr => env.cr
uid => env.user.id
context => env.context
pool => env
workflow => record.signal_workflow()
2016-11-16 18:46:01 +01:00
Denis Ledoux 4ea356110e [FIX] base: crons Work Days option
As you can see from the code,
choosing "Work days" or "days" as internval
has exactly the same behavior.

Users might nevertheless expect the interval
"work days" option to avoid running the
action on non-working days, such as
Saturdays and Sundays.

It may have been intended, but it never
worked, since revision 1:
https://github.com/odoo/odoo/blob/004a0b996ff8f269451e07346f71a129a1f3fbaf/bin/addons/base/ir/ir_cron.py#L49-L50

opw-693882
2016-11-16 17:05:14 +01:00
Christophe Simonis dece72d010 [MERGE] forward port branch saas-12 up to ca20038 2016-11-15 13:58:55 +01:00
Martin Trigaux 014a6e283f [I18N] export 10.0 source terms 2016-11-14 16:57:46 +01:00
David Arnold a35d8895b1 [FIX] base: es_CO date format
Closes #14065
2016-11-14 16:39:37 +01:00
Odoo Translation Bot 7a800427df [I18N] Update translation terms from Transifex 2016-11-13 03:42:40 +01:00
David Monjoie ca11d35a62 [FIX] base: enforce deterministic view inheritance
If multiple views had the same name and same priority, the order
of application of their xpath was not deterministic. That may be a
big deal if both of them were doing xpath with position = inside.
2016-11-09 10:51:09 +01:00
Mansi Gandhi 5cb307170d [IMP] base, auth_signup: rename technical users to avoid confusion
* default user > Default User Template
 * Template User > Portal User Template
2016-11-09 10:48:33 +01:00
Moisés López cc444338ed [FIX] base: change Mexican city name
'Distrito Federal' is renamed 'Ciudad de México'
English news:
https://www.theguardian.com/world/2016/jan/29/mexico-city-name-change-federal-district-df
Official reference (spanish):
http://www.dof.gob.mx/nota_detalle.php?codigo=5424565&fecha=05/02/2016

Closes #14034
2016-11-08 15:37:46 +01:00
Christophe Simonis 7eb8ed2769 [MERGE] forward port branch 10.0 up to 3d085f6 2016-11-08 15:13:05 +01:00
fwi-odoo ce91c5b6f5 [FIX] base: partner's default to company instead of individual for sales menu (make clearbit feature visible for on boarding)
Fix commit 69b641d6bc
2016-11-07 15:04:24 +01:00
Odoo Translation Bot 7cfbdd57b4 [I18N] Update translation terms from Transifex 2016-11-07 11:09:10 +01:00