Commit Graph
100873 Commits
Author SHA1 Message Date
Christophe Simonis 469e04e97c [MERGE] forward port of branch saas-8 up to 2611a81 2016-02-02 14:52:15 +01:00
Christophe Simonis 2611a8198e [MERGE] forward port of branch saas-7 up to e765569 2016-02-02 14:48:31 +01:00
Christophe Simonis e765569d04 [MERGE] forward port of branch 9.0 up to f0a63e5 2016-02-02 14:44:39 +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
Martin Trigaux 986da5416c [FIX] base: prevent error on missing config parameter 2016-02-02 11:27:47 +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
Denis Ledoux 2083c16606 [FIX] account: bank statement lines indeterminist order
The order of a bank statement lines is entirely done on the sequence:
`_order = "statement_id desc, sequence"`

The `create` method of `accounT.bank.statement` is overriden
to handle the sequences of each line.

The `write` method as well, except that the set of the sequences
lines is done after the call to `super`. So, if you add
several new lines to a bank statement, the order of the line
you just added can be different before and after save,
as the sequence of these new lines are not set before
actually writting them on the bank statement.

The widget `handle` serves this sequencing purpose. The
fact it isn't used here is most-likely because
it did not exist at the time this was designed.

Besides, this gives the possibility to the user
to add a new line and re-order it where he wants.
For instance, when manually entering a bank statement,
a user could skip unintentionally a line. If he would
like to add it at the right place, before this revision,
he would have to delete all the lines coming
after the line he skipped. Now, he can add
it at the end, and re-order it where he wants.

What is done in the overriden `create` and `write`
is now useless, but we left it for retro-compatibility
purposes, for databases updating their sources without
updating their views.

opw-667541
2016-02-01 12:53:22 +01:00
Jeremy Kersten 17fcdc3ae9 [FIX] website_crm_partner_assign: order by grade, display_name (alphabetical) 2016-02-01 12:16:43 +01:00
Jeremy Kersten f39e5358bc [FIX] website_forum: decrease indexed pages which will return 404
Add filter in domain converter to remove some posts in sitemap.

Avoid to add in sitemap some pages that could not be read
by public user due to a karma restriction.
2016-02-01 12:16:43 +01:00
Jeremy Kersten 22c80fff6e [FIX] utm: use tracking_fields from utm.mixin and not from the current model
This function cannot be overridden in a model which inherit utm.mixin
Limitation by the heritage on AbstractModel

record_crm_lead.tracking_fields() will call tracking_fields() from module
utm.mixin (if not overridden on crm.lead) instead of the overridden method
from utm.mixin.

To force the call of overridden method, we use
self.pool['utm.mixin'].tracking_fields() which respects overridden
methods of utm.mixin, but will ignore overridden method on crm.lead

Eg:

 class utm_mixin(osv.AbstractModel):
    _name = 'utm.mixin'

    def tracking_fields(self):
        return "A"

 class utm_mixin_overridden(osv.AbstractModel):
    _inherit = 'utm.mixin'

    def tracking_fields(self):
        return "B"

 class crm_lead(osv.osv):
    _name = "crm.lead"
    _inherit = ['utm.mixin']

    def func_1(self):
        print self.tracking_fields()
        # print "A"

    def func_2(self):
        print self.pool['utm.mixin'].tracking_fields()
        # print "B"

It's the dispatch method of ir_http which save GET parameters in cookies,
ignoring the overridden tracking_fields method in inherited model.
2016-02-01 12:16:43 +01:00
Aaron Bohy 0de35ffa7f [FIX] mail,web: don't block chat windows when blocking ui
One will still be able to chat in chat windows during long RPCs...
2016-02-01 11:31:36 +01:00
Aaron Bohy db4cb5b74e [FIX] mail: set tabindex of composer's elements
Also focus the subject's input by default in extended composer.
2016-02-01 11:31:09 +01:00
Aaron Bohy 4bab99bdaf [FIX] mail: don't notify 'join/left' messages
Messages of type 'notification' and whose model is 'mail.channel' are
considered as 'system notifications'. This is the case of 'join/left' messages.
They aren't taken into account when computing unread messages anymore.

Also use the same heuristic to decide whether or not to display the message's
star, so from now on pure notifications (not system notifications), like status
change on a document, can be starred.
2016-02-01 11:31:09 +01:00
Aaron Bohy ef77e6821a [FIX] mail: systray: move Inbox counter to its own item
Clicking on that item redirects to the Inbox in Discuss.

The messaging menu's counter is now the number of conversations (public or
private channels, dm and livechat) in which there is at least one unread
message. Moreover, it is emphasized when one of those conversations is a chat.

Also make mass-mailing channels available through the messaging menu (for
consistency as its counter takes those channels into account) and allow to open
them in chat windows without input.
2016-02-01 11:31:09 +01:00
Christophe Simonis 68c928aca7 [FIX] purchase: correct tax for purchase order lines created from procurment
Error introduced during forward-port 2ce9311cfe
2016-02-01 11:19:58 +01:00
Denis Ledoux 29147f4a4a [FIX] web_planner: links to modules form
This partially reverts rev. 84ade6a861

In this specific part of the code, the goal wasn't
to check if the module was part of the installed modules,
but if the module was part the "known" modules, in order
to jump on its form.

Besides, as this link is most of the time used
to install the according module, it's quite dummy
to search it within the installed modules.

Before this revision, trying to click on the "Install" links
in the planners linked to an empty module form, instead
of the according module form.

opw-667407
2016-02-01 11:13:55 +01:00
qdp-odoo 9eb612c816 [FIX] account: aged partner balance fixed.
- Unkwnown partner line wasn't added to the totals
- Column 'not due' amount fixed (was not working properly in case of partial reconciliation)
- now also includes the partner that have _everything_ reconciled for the requested date but with a reconciliation made after the requested date
- Recompute the amount_residual instead of using the field as it is problematic when requested date is between 2 partial payments of a single invoice
2016-02-01 10:33:26 +01:00
Odoo Translation Bot 3b4bbb8c28 [I18N] Update translation terms from Transifex 2016-01-31 00:33:36 +01:00
Denis Ledoux 820834b17a [MERGE] forward port of branch 9.0 up to 052da3e 2016-01-29 18:51:25 +01:00
Thomas Groutars 052da3e89a [FIX] lang: Add grouping when loading translation
Closes #10669
2016-01-29 18:47:20 +01:00
Christophe Simonis 2077c7dff4 [FIX] website: force (icon) update of "Website" menu item
Note: only relevant for enterprise web client as icon is not display in
ommunity version.
2016-01-29 18:23:28 +01:00
Denis Ledoux 56e3d2d512 [FIX] website_sale: get_pricelist_available from the backend.
The method `get_pricelist_available` can be called from the backend.

(e.g. when using `website.pricelist_id`,
whic is a function field ultimately calling
`get_pricelist_available`).

In such a case, `request.website` is not available,
as the request is not done from the website.

Therefore, we have to fallback in a work-around
to detect the website for which we would like
to get the available pricelists.

Passing the `website_id` in the context
is kinda crappy, but as the website for which
we would like the available pricelists is
not passed in the method params (trough a parameter `ids` for instance),
this is one way to put it through.

opw-668230
2016-01-29 17:51:51 +01:00
Denis Ledoux c66588174a [MERGE] forward port of branch 9.0 up to 6c8bbc3 2016-01-29 17:23:19 +01:00
Denis Ledoux 6c8bbc3d46 Revert "[FIX] fields: make related_sudo work for draft records (used by onchange)"
This reverts commits
 - 995b257a6c
 - 2ebdb5f36e
 - 748a719fd9.

The commit 748a719fd9 leads to an issue
bigger than what it aims to solve:
 - as demo user
 - create a new invoice
 - add a new line
 - select a product
-> traceback

opw-668141
2016-01-29 16:55:23 +01:00
xmo-odoo 19a1c18f57 [FIX] make m2m checkbox labels clickable 2016-01-29 16:24:14 +01:00
Denis Ledoux a157fcd8cd [FIX] sale: Sales configuration, ir.values for all users are restricted.
The global record rule `Defaults: alter personal values only`
(`base.ir_values_default_rule`)
ensures that all users can only create personal `ir.values`.

`ir.values` for all users must therefore be created as sudo.

opw-667140
2016-01-29 16:18:12 +01:00
Aaron Bohy 5e79439dee [FIX] mail: chatter: keep mentions
Message's body is kept when switching from 'New message' to 'Log a note' since
rev. f35b48aa. However, mentionned partners or channels were lost. This rev.
makes sure to preserve both message's body and mentions when switching between
composers.
2016-01-29 13:21:02 +01:00
Aaron Bohy c04103f4da [FIX] mail: various UI fixes/improvements
- don't print chat windows
- add missing 'width: 100%' on composer and Discuss sidebar inputs (required
  for community edition)
- center the Discuss sidebar inputs
- Discuss sidebar items layout: one line, text ellipsis if name is too long
- hide chatter in 'create' mode (messages wrote in the chatter need a res_model
  and a res_id, the latter is not yet existing if we are in 'create' mode)
- revert 2d2dacc: print chatter by default (classname 'hidden-print' can be
  used for specific models for which we don't want the chatter to be printed)
- thread: ensure the displayed message's date is in the past
- re-render threads every minutes to update dates
- don't squash messages in mass mailing channels
2016-01-29 13:21:02 +01:00
Nicolas Martinelli 628a6146d2 [FIX] account: keep only taxes of the company
If the SUPERUSER creates an invoice, we should make sure to keep only
the taxes related to the company of the invoice. This is for example the
case in the PoS, where the invoice is created with the SUPERUSER.

Fixes #10648
2016-01-29 13:16:53 +01:00