Commit Graph
100620 Commits
Author SHA1 Message Date
Denis Ledoux 9fa73d10cf [FIX] account: set payment_method_code as readonly
The payment method code is not supposed to be changed
from an `account.payment`.

Besides, this field is only used for technical reasons,
as stated:
```
Technical field used to adapt the interface to the payment type selected.
```

There is therefore no reason to not set it as readonly.

Not setting it as reandonly could lead to a `write`
operation on the `account.payment.method` with the value
of the code, even if this is already that one set, and
such an operation could be prevented by the access rights.

opw-668624
2016-02-03 18:35:43 +01:00
Olivier Dony 93e8bf8ccf [MERGE] Forward-port saas-6 up to 1f022a0b4a 2016-02-03 16:55:41 +01:00
Olivier Dony 1f022a0b4a [MERGE] Forward-port 8.0 up to rev. 67a63e2cc9 2016-02-03 16:53:30 +01:00
Olivier Dony 67a63e2cc9 [MERGE] Forward-port 7.0 up to rev. cb609bd425 2016-02-03 16:42:29 +01:00
qdp-odoo 967be70c52 [FIX] account: tax of type 'group' wasn't propagating correctly the base of computation for next taxes (in case one of the children had the field 'Affect Base of Subsequent Taxes' set). Fixes issue 641078 2016-02-03 16:37:41 +01:00
Géry Debongnie 5465dccd69 [FIX] mail: prevent the composer to break layout in client action
The composer can grow vertically.  It will eventually grow out of the
chat content, which breaks the layout.  This commit fixes the issue.
2016-02-03 14:36:30 +01:00
Géry Debongnie 90d4f76100 [FIX] mail: users can now reply directly in documents from channels
A missing feature in discuss was the possibility to directly reply to a
message from a channel without opening the document.  This commit add
that feature.  Now, there is a small 'reply' icon in channels (including
inbox/starred) if the message comes from another document.  This icon
opens an extended composer, which will post the message in the document
chatter.
2016-02-03 14:36:30 +01:00
Thomas Groutars cc36e03ddc [FIX] product_visible_discount: wrong argument type
Fix call to v8 method with wrong argument type

Closes #10745
opw-668544
2016-02-03 13:30:17 +01:00
Martin Trigaux aca28c82b4 [FIX] website_sale: do not compute price of every pricelist
This controller was very slow as not providing a pricelist computed the price of
all products of all pricelists.
Instead only fetch the prices for the useful products.
2016-02-03 12:05:42 +01:00
bima d01ecb6e79 [FIX] stock: wrong variable used in _handle_renaming
Could incorrectly rename the stock.location.path objects, and in case
the route has push_ids but no pull_ids would crash the method entirely.

closes #10747
2016-02-03 09:55:43 +01:00
Yannick Tivisse 1fb9227893 [IMP] stock: Missing kanban view on all stock.picking views from dashboard 2016-02-03 09:33:45 +01:00
Nicolas Martinelli b6250eb7f0 [FIX] account: filter taxes
In a multi-company environment, a user from company A which is a parent
of the company B has access to taxes from both companies. The
consequence is that the method _set_taxes will automatically add the
taxes from both companies.
2016-02-03 08:28:34 +01:00
Nicolas Martinelli 932a83de32 [FIX] account: forward port typo
type is not redefined, so this comparison cannot work. Moreover, a lucky
combination made the test pass, while they should not have.

opw-667935
2016-02-03 08:28:34 +01:00
Olivier Dony cb609bd425 [FIX] tools.misc: log errors when parsing fails 2016-02-03 02:25:09 +01:00
Olivier Dony 709323f071 [MERGE] Forward-port saas-6 up to 6562309927 2016-02-03 00:46:18 +01:00
Olivier Dony 6562309927 [MERGE] Forward-port 8.0 up to e8d06f7b20 2016-02-03 00:44:04 +01:00
Olivier Dony e8d06f7b20 [MERGE] Forward-port 7.0 up to bdbcbea285 2016-02-03 00:40:27 +01:00
Olivier Dony bdbcbea285 [FIX] marketing_campaign: incorrect field accessor 2016-02-02 22:43:39 +01:00
Olivier Dony cc724c2e61 [FIX] base: centralize custom data serialization for builtin types only 2016-02-02 22:42:31 +01:00
Olivier Dony 000c681f1e [FIX] ir.values: remove redundant deduplication logic
Handling update/create of existing values is already
handled by ir.values.set() itself.
2016-02-02 19:49:09 +01:00
Olivier Dony f3496dc233 [FIX] ir.qweb: access rights and corner cases for changes in #9978
Method `is_css_preprocessed()` introduced by #9978 at revision
79f13a2aaf might fail when the
user/visitor did not have sufficient access rights to read
the cached assets (depending on ir.attachment ACL)

In addition an empty cached asset could trigger a corner case.
2016-02-02 19:16:28 +01:00
Christophe Simonis 588c1efea6 [MERGE] forward port of branch saas-6 up to d613843 2016-02-02 18:37:34 +01:00
Christophe Simonis d6138430e9 [MERGE] forward port of branch 8.0 up to 8848af7 2016-02-02 18:32:46 +01:00
Xavier Morel 8848af76f0 [IMP] account: recordset calling conventions for fixed has_group 2016-02-02 18:28:23 +01:00
Xavier Morel ccb0f6db61 [FIX] base: has_group behaviour under the new API
While the signature makes sense in an old API context (sort-of) it's
very easy to misuse in a new API context as one'd expect `has_group` to
use the subject (recordset), not the user in the environment, compounded
by ``env.user`` being browsed as administrator, resulting in the
"obvious" ``env.user.has_group(foo)`` checking if the
administrator (rather than the current user) has the specified group.

Adds a divergent v8 version of has_group which first checks if it's
called on a non-empty recordset, and in that case use the recordset id,
otherwise fallback on the context user (to handle new API conversions
which used the "correct" call convention rather than the obvious one).

fixes #9649
2016-02-02 18:28:23 +01:00
Simon Lejeune a62597e1fa [ADD] ir_qweb: test less assets invalidation in debug mode 2016-02-02 15:24:51 +01:00
Simon Lejeune 79f13a2aaf [REF] ir_qweb: optimize assets compilation in debug mode
Mainly by moving the authority to handle the ir.attachments records
for Less and SassStylesheetAsset from the asset to the bundle.

We introduce a method `is_css_preprocessed` that will check if the
less/sass assets contained in a bundle already have ir.attachments
records. On top of that, it'll check if these existing records
need to be invalidated by comparing the last modified date of the
file and the __last_updated field on the record. If it is the case,
we chose to unlink all the less/sass attachments from the same
bundle.
2016-02-02 15:24:51 +01:00
Christophe Simonis f0a63e5913 [FIX] delivery: avoid calling unknown method.
Only call `product_id_change_margin` method if exists. This method is
defined in `sale_margin` module, but as there is no dependency between
modules (nor a bridge module), the call have to be done here.
2016-02-02 14:31:30 +01:00
Damien Bouvy a7c664fb6c [FIX] website_quote: handling of uoms in _onchange_product_id
The condition self.uom_id != self.product_id.uom_id could actually
never be met, since a few lines before you could read
self.uom_id = product.product_tmpl_id.uom_id. From now on, simply
check if the uom_id on the cached record is different from the one
on the product and check the price using the pricelist (_compute_price
does not take pricelists into account) with the wonderfully explicit
with_context call.
2016-02-02 14:23:09 +01:00
Christophe Simonis fbd5fab238 [MERGE] forward port of branch saas-6 up to 9ca7ad8 2016-02-02 13:18:33 +01:00
Goffin Simon c736058e90 [FIX] account: bad translation
"Less" must be translated by "Minus" to have the good meaning in
english.

opw:667767
2016-02-02 12:44:15 +01:00
Jeremy Kersten 1f6412a0a4 [FIX] website: sitemap render content at first call
Bug from 0c37a8d
At regeneration of sitemap, content was not set
2016-02-02 12:33:54 +01:00
Jeremy Kersten dd17b3e34f [IMP] website_forum: allow to pass False as value for can_view
Code introducted by commit f39e535 was ignoring the value.
Now, we change the logic to always have True as value regardless the operator.

!= False  become  = True  ...
2016-02-02 12:27:09 +01:00
Christophe Simonis 9ca7ad87b2 [MERGE] forward port of branch 8.0 up to 3ac46ee 2016-02-02 12:25:06 +01:00
Nicolas Martinelli 3ac46ee3d4 [FIX] stock: propagate UoS quantity
Both UoM and UoS quantity change should be propagated.

Fixes #10623
opw-667805
2016-02-02 11:25:57 +01:00
Goffin Simon 5b77e30429 [FIX] sale_stock: product_id_change_with_wh
When changing the quantity of a SO line, the product_id_change_with_wh
must be triggered to check the availability of this product.

opw:668236
2016-02-02 09:47:34 +01:00
Thomas Groutars ae7ccb6785 [IMP] product: add monetary widget on list_price
Make consistent display of Sale price and Cost price by showing currency
on both.

opw-668159
Closes #10672
2016-02-02 09:45:22 +01:00
Aaron Bohy 017c4b0a4d [FIX] mail: keep expanded messages expanded after refresh
Commit c04103f re-renders the thread every minute to update messages' date.
As a consequence, the expanded messages are lost (they are shortened again).
This rev. makes sure to keep those messages expanded.
2016-02-02 08:49:54 +01:00
Jeremy Kersten 0c37a8d523 [FIX] website: rename sitemap-1 to sitemap if only one file.
Old code was duplicating the sitemap if less than LOC_PER_SITEMAP urls
2016-02-01 19:07:18 +01:00
Jeremy Kersten 45f70b9f5f [FIX] ir_qweb: use cdn in asset
render_node uses url_for which will add if needed the cdn url
2016-02-01 18:18:16 +01:00
Raphael Collet a688bcdbbd [FIX] fields: make copy_cache not invalidate the cache! 2016-02-01 18:01:02 +01:00
Raphael Collet bac6889c53 [FIX] fields: make related_sudo work for draft records (used by onchange)
Accessing a related field with `related_sudo=True` on a draft record should
effectively traverse the fields as the admin user.  Traversing new records in a
different cache requires that all new records on the path are copied across
caches.  Make the copy across caches recursive when the first record on the
path is a new record.
2016-02-01 17:59:31 +01:00
Jeremy Kersten de8296c3a8 [FIX] website: sitemap fix length
Iterator was consuming the first 45k records.
So don't need to specify an offset, because that will ignore the next 45k.

Eg: if step of 5, and range(1,13),
it will only use [1, 2, 3, 4, 5, 11, 12, 13]
2016-02-01 17:12:14 +01:00
Goffin Simon 08b286111c [FIX] models: MissingError when writing on recordset with duplicates
When writing on a recordset with duplicates, the ORM raises a `MissingError`
because the rowcount gives a difference with the injected ids.  The fix simply
eliminates duplicates from ids.
2016-02-01 14:56:49 +01:00
Cedric Snauwaert 274cbda5b0 [FIX] account: missing filter when opening invoices_to_validate action 2016-02-01 14:38:48 +01:00
Martin Trigaux a46f8bb9c5 [FIX] tools: do not generate translations for exported records
When a record is exported, an external ID, in the form of __export__.<model>_<id>
is created on this record.

When the translations are generated (e.g. "synchronise terms" wizard), the
translations may be duplicated for records that have been exported. If a
translation is submitted before the export (when the record had no external ID
yet), a new empty translation is created as the module differs in the import.

Creating a new translation may be a problem as the new term (equal to the source
term) will be used as the translation value.

Fixes 9480
2016-02-01 14:13:34 +01:00
Joren Van Onder fb460462d0 [FIX] pos_restaurant: correctly pass arguments from overriden method
When overriding a method that calls its super later on, it's important
that arguments is used to correctly pass all arguments to the super.

Consider the following:

// module 1 (not correct)
method: function(a) {
    return _super.call(this, a);
}

// module 2 (correct)
method: function(a, b) {
    return _super.apply(this, arguments);
}

If the method of module 1 gets called first it will throw away the b
argument when it calls _super. Therefore the b argument will never
arrive in method of module 2.
2016-02-01 14:03:30 +01:00
Goffin Simon 8fb8cd6c90 [FIX] pos_discount: discount product
Only the products available in the POS must be set in the field
'discount_product_id'. Inspired from 8cd0127af3

opw:668163
2016-02-01 13:40:47 +01:00
Goffin Simon 9481ee5c2f [FIX] sale_margin: Cost price in a SO line
The margin in a SO line is the difference between the price unit and
the cost price of this SO line. In function "_product_margin" in model
"sale.order.line", the cost price is equal to the purchase_price or
the standard_price of the product. Then the cost price in the SO line
must be set with the same value when creating SO line linked to the delivery.

opw:668090
2016-02-01 13:29:25 +01:00
Nicolas Martinelli a5c8846653 [IMP] delivery: add product_qty to SO line
Add the normalized quantity to the SO line. This field is useful for
delivery carriers, since the package price depends on the weight, which
is always defined as a function fo the product UoM.

opw-667594
2016-02-01 13:04:32 +01:00