Commit Graph
100938 Commits
Author SHA1 Message Date
Simon Lejeune 14fdabb4bc [REF] tests: inline the full docstring in the logs
meaningless entries like
` Checks that the bundle's cache is working, i.e. that a bundle creates only enough
become
` Checks that the bundle's cache is working, i.e. that a bundle creates only enough ir.attachment records when rendered multiple times

see https://docs.python.org/2/library/unittest.html#unittest.TestCase.shortDescription
2016-03-03 17:45:19 +01:00
Simon Lejeune 9631a30228 [FIX] ir_qweb: don't use a stylesheet cached by another bundle.
An issue could arise if a preprocessed stylesheet asset is present
in multiple bundles: the first bundle will cache a version of this
file (identified by its url) and the second one will cache another
one. The next time the first bundle is rendered in debug mode, it
will use the last created record of the asset.

This could lead to design issues as, for instance, a less asset
could change according to another less asset included in the bundle.

We fix this issue by adding the xmlid of the bundle in the url's
asset. This fix another inconsistency as the compiled version of
an asset is reachable with an url that is not dependent of its
bundle, so if the asset is present in multiple bundle it could
return different values.

Note: this only concern the debug mode
2016-03-03 17:38:20 +01:00
Denis Ledoux 0806506c9c [FIX] sale: sales stats button on product with multiple variants
`default_search_product_id` with several ids simply can't work.

The only way to do it is using a domain in the action.
Anyway, this is unlikely that the user would like
to remove the domain (which is the main interest
of using a filter, the possibility to remove it), as
this will display all sales orders lines, whatever the products,
all mixed up. This is not super-useful.

opw-671022
2016-03-03 17:36:37 +01:00
Raphael Collet a4ea258176 [FIX] fields: company-dependent (property) fields should not be stored or copied 2016-03-03 16:47:05 +01:00
Christophe Matthieu bc4561b26b [FIX] web_editor: can't use mako/jija if remove space to prettify html
Addapt html method to prettify the html code and keep mako structures.

opw-668409
2016-03-03 15:41:02 +01:00
Christophe Matthieu 1320ad8cfe [FIX] mail: button_access is undefined in mail template preview
opw-668409
2016-03-03 15:41:02 +01:00
Martin Trigaux 7952a57b45 [FIX] l10n_multilang: create translations in master lang
When creating the account translations using the account template translations
read it without the environment language.

Otherwise, when the translation is created, the content of `element.name` (the
source term to translate) might be in a different language and already
translated.

This was introduce during the migration at the new API where previous code did
not propagate the context (probably by accident).
2016-03-03 13:56:06 +01:00
Martin Trigaux 5be9619738 [FIX] l10n_multilang: translate accounts after the installation of a CoA
Before this commit, the only way to translate a chart of account was to install
the language (if present in 'spoken_language' field on the chart of account
configuration) **before** the installation of the chart of account.

This commit loads the translations of the chart of account at the installation
of the language too.

To avoid recreating translations at each update of a language, skip if the
language is already installed.
This means than, to benefit from the fix, already deployed instances should
remove (after de-activating it) the language and reinstall it to translate
existing chart of account.

opw-670327

Closes #11091
2016-03-03 13:50:09 +01:00
Nicolas Martinelli 88e7122020 [FIX] mail: mail_server_id
When a specific SMTP server is set on a mail template, it is never used
when the mail is sent. There are two reasons:
- `mail_server_id` is a read-only field set by an onchange. However, a
  read-only field is not sent to the server, so the information is lost.
- The information is stored in the context of the object `Mail`, but it
  is never used. Moreover, when the method `message_post` is called, the
  `Mail` object is not used to post the message, so the information is
  lost again.

The fix includes two parts:
- the `mail_server_id` field is not read-only anymore. Actually, there
  is no reason to make it read-only.
- the information is stored directly in the mail values and used at the
  appropriate moment.

Fixes #6554 (from v9.0)
opw-669958
2016-03-03 13:24:41 +01:00
Nicolas Martinelli fad4788272 [FIX] web_editor: image size
Make sure to create an image of a size larger than zero. A size of zero
will generate a traceback.
2016-03-03 13:24:40 +01:00
Denis Ledoux db95dcd8bc [FIX] models: translate fields label, even for en_US
In Odoo 7.0 & 8.0, this was possible to translate
a field label, from `en_US` to `en_US`. It was
used as an easy way to change the fields label,
instead of creating an inherited view changing
the string attribute of the field everywhere it was needed.

This was no longer the case in 9.0,
following the revision 9593a29.

The translated terms for `en_US` have been
excluded, for performance reasons
as it was considered not possible to have
translated terms for the `en_US` language.

The fact is, this is very possible: Nothing
prevents to add a translated term
in `en_US` for a translate-able field,
as this is the case for the fields label,
as mentioned above. This field is then
used as the display value instead of the source
term when being in the `en_US` language.

Besides, the above revision was mainly to
give the possibility to sort a model records
on a translated field, using a join on the translations
table. It was then considered that the join could
be avoided, in the case where the user language was `en_US`,
for performance reasons, but, as this is possible
to give another value to the field value trough
the translations, it should actually be done, even
for the records sorting.

opw-670814
2016-03-03 13:21:56 +01:00
Nicolas Lempereur 17e79711e4 [FIX] web: save initially grouped editable tree view
Test to bind save and discard buttons of an editable tree view are done
only once when initializing it.

But if the view is by default grouped at the beginning, it will be then
"not editable" but only removing the groupby will change this.

So this commit add a case so if the view is grouped when initialized,
the buttons are always bound.

closes #11198
opw-666794
2016-03-03 13:07:22 +01:00
Philipp Hug 8c635a3a4a [I18N] l10n_ch: German translation
Closes #11192
2016-03-03 11:46:34 +01:00
Joren Van Onder 5d07ad5e2f [FIX] point_of_sale: make receipt screen touch scrollable
In the POS we use a touchmove event listener to stop undesired
rubberbanding (in Chrome.disable_rubberbanding()). Elements which should
be scrollable by touch should have the touch-scrollable class. The
receipt screen is obviously one of those, because otherwise you won't be
able to scroll down if you have a long receipt.

opw-670899
2016-03-03 10:02:48 +01:00
Philipp Hug 575e162b6b [CLA] signature for philhug
Closes #11191
2016-03-03 09:44:12 +01:00
qdp-odoo da10eded8c [ADD] l10n_fr_fec: FEC export for the french accounting. Courtesy of Alexis de Lattre (Akretion) 2016-03-03 09:07:17 +01:00
Denis Ledoux 66c1d18579 [FIX] account: Dasbhoard, balance of bank account in foreign currency
When a bank account is set within another currency
than the company currency
(the currency of the journal is set and is different
than the company currency),
the balance displayed was the amount within the company
currency, instead of the amount within the bank account
currency (despite the fact the currency displayed
was the one of the journal).

opw-670815
2016-03-02 17:53:53 +01:00
Denis Ledoux 204f9d3605 [FIX] account: taxes configuration, default filter instead of domain
Convert the domain to display only the sale / purchase
taxes in the taxes list to a default filter doing the same thing,
but which give the possibility to remove the filter
and see taxes with the scope `None`.

opw-670737
2016-03-02 16:27:02 +01:00
Nicolas Martinelli b21af52ed8 [FIX] account: payment sequence
The payment sequence should depend on the company, which is not possible
with the harcoded reference to the sequence ids.

opw-670491
2016-03-02 14:05:45 +01:00
Denis Ledoux 33a7c02b55 [FIX] mrp: product variant name in BOM structure report
When printing a BOM structure using a variant,
the specifications of the variant were not
displayed in the BOM Structure lines,
making it different than what can be found
in the BOM structure form, and therefore
making it impossible to know which variant
has to be used for this BOM structure
from the report.

opw-670448
2016-03-02 13:21:20 +01:00
Denis Ledoux 68d03cef65 [FIX] mrp: Product variant name in production order report
When printing the production order, the name
of the product did not include the variant
specifications, making it different then what
is displayed on the production order form,
and preventing to know which variant was produced
for this production order.

opw-670448
2016-03-02 13:21:20 +01:00
Aaron Bohy 50aeecff84 [FIX] mail: chatter: hide basic composer when opening full composer
opw 670388
2016-03-02 10:24:37 +01:00
Martin Trigaux b705576e93 [FIX] account_full_reconcile: untranslatable module
publish the translations on Transifex
2016-03-02 08:49:01 +01:00
Nicolas Martinelli f5b37a8a07 [FIX] crm_project_issue: move attachments
The attachments are not moved to the issue created. They should.

opw-670259
2016-03-01 17:49:40 +01:00
Nicolas Martinelli 4ef7faeffa [FIX] crm_project_issue: archive instead of delete
When the user converts the lead into an issue, an error occurs: "Form
view couldn't be loaded". This is because the web layer tries to refresh
the data related to a deleted record.

Instead of deleting the lead, we archive it.

opw-670259
2016-03-01 17:49:40 +01:00
Nicolas Martinelli d3ea95db51 [FIX] crm: convert lead to opportunity
When a lead is converted into an opportunity, the probability should match
the new stage.

opw-669960
2016-03-01 17:39:14 +01:00
Nicolas Martinelli bdd60a75af [FIX] crm: default stage
When a lead/opportunity is created, the probability must match the
probability associated to the stage, as introduced in commit b2733391.
However, the call to `_get_default_stage_id` looses the context, which is
an issue since the method `stage_find` will inspect it in order to find
default values to build the search domain. The result is that the manual
call to `_get_default_stage_id` might return a different result than the
automatic call from `get_default`, and therefore the probability does not
match the stage

opw-669960
2016-03-01 17:39:14 +01:00
Christophe Matthieu a46a3f9958 [FIX] web: can't save if a o2m line have a modifier and try to read db
When the user click on save, 'is_valid' is called on each field.
The o2m test all sub-field (apply modifier and check value).
But, if a modifier change the read-only attribute, the field is reinitialized and call 'render_value' without check 'no_rerender' value.
The relational fields call the db in render_value, and the x2m is invalid because a request is pending.
(change X2ManyListView to keep the 'no_rerender' initial value)

opw-653120
2016-03-01 15:17:05 +01:00
Jeremy Kersten 20ab363a14 [FIX] sale: fix display in form view of sale order line
Div had not impact in quotation view, so I decide to remove it.
But it create an offset in the sale order form view.

Previous commit #2d1db7d fix the form view of quotation lines
but break the form view of sale order line.
https://cloud.githubusercontent.com/assets/10741187/13401517/51989574-df04-11e5-89f0-b3e625d05a7c.png

Related to #11081
2016-03-01 11:30:02 +01:00
Jeremy Kersten 2d1db7dcf7 [FIX] sale: fix form view where label column take all the available space.
introduce by commit xxx

close xxx
2016-02-29 17:16:49 +01:00
Denis Ledoux cca44bdff3 [FIX] gamification: missing model in email template
Therefore, the template could be seen from
the Discuss module, when clicking on "Send Mail",
but, when attempting to use it, it failed
(as it was not applied on the right model).

opw-670546
2016-02-29 15:39:45 +01:00
Christophe Simonis f03eee7480 [MERGE] forward port of branch saas-6 up to d5dcfcb 2016-02-29 11:43:00 +01:00
Christophe Simonis d5dcfcbd00 [MERGE] forward port of branch 8.0 up to feedb0f 2016-02-29 11:37:34 +01:00
Nicolas Martinelli 9af45ffa05 [FIX] account: post move in reconciliation
When an analytic account is specified in the reconciliation, the
analytic lines are not created. This is because the account move is
posted before the account move lines are actually created.

Fixes #10951
opw-670110
2016-02-29 11:29:18 +01:00
Joren Van Onder feedb0f1f4 [FIX] point_of_sale: get the correct logo when using multiple databases
In an environment where multiple database are available the company_logo
controller in the web module will return a placeholder logo (the Odoo
logo) if it can't figure out what db the request belongs to. This logo
is used on the ESC/POS receipts.

Because we load the logo with an anonymous CORS request there is no
authentication on the request. This is necessary because the POS tends
to not be served over HTTPS whereas the rest of Odoo is. Without this
crossOrigin attribute we could potentially end up in a situation where
the canvas is considered tainted by the browser which would prevent us
from extracting the canvas' data with toDataURL(). So removing the
crossOrigin attribute is not an option, specifying the db is the next
best thing.

opw-670471

note: in >=9.0 session is a variable defined in the js module instead of
a property on PosModel, so 'self.session.db' should become 'session.db'.
2016-02-29 09:57:39 +01:00
Nicolas Martinelli bfa68b433c [FIX] mrp_operations: planned end date in Gantt
It is necessary to define the date_stop, otherwise the Gantt view is
unusable.

opw-669042
2016-02-29 08:58:52 +01:00
Nicolas Martinelli 5cfbd97689 [FIX] stock: move package
Moving a whole package (option "Allow moving packs") results in a
traceback. Indeed, the method `_get_all_products_quantities` returns
product ids, while `_create_extra_moves` expects browse records.

opw-668180
2016-02-29 08:35:58 +01:00
Odoo Translation Bot 9f073102ef [I18N] Update translation terms from Transifex 2016-02-28 03:00:41 +01:00
Odoo Translation Bot 39d7abae26 [I18N] Update translation terms from Transifex 2016-02-28 00:34:20 +01:00
Thibault Francois 4c1c1ec4d4 [FIX] web_kanban: float_time widget did not work
`instance` was undefined in this context, probably
following a forward-port mistake
2016-02-26 18:56:49 +01:00
Olivier Dony 602f3423c1 [FIX] crm.activity.report: consider all messages as activities
When counting the 'activities' on each opportunity/lead,
this view only considered messages with a subtype that
matched the subtype of a specific crm.activity.

This was not consistent with the crm.opportunity.report
which counted *all* messages on an opportunity as
"activitiy entries".

The latter is considered better because any entry,
(even automated one for tracking field value changes
or automated system responses) corresponds to an "action"
taken on that record.

This patch makes crm.activity.report consistent with
this decision: it will now count all messages.

+ also convert the incorrect `left join` to a plain
[inner] `join`, as we don't want deleted leads to
appear in case orphan messages were left around
(which should not happen anyway).
2016-02-26 18:56:49 +01:00
Olivier Dony c5b879bfd2 [FIX] crm.opportunity.report: query performance
Using a subselect is more efficient than constructing
a complete temporary table of all messages, and then
joining them. This way only messages or relevant
opportunities are used, as most of the time the
report is accessed for a specific subset of opportunities
(by date, salesman, stage, etc.).
The query planner can then use the dedicated index
to quickly access the corresponding messages.

On a sample database with 1 million crm.lead
entries and 10 million mail.message entries
this brings the time for a typical read_group
call on crm.opportunity.report down from 300s to
500ms (600x faster)
2016-02-26 18:56:49 +01:00
Christophe Simonis c9751aff03 [MERGE] forward port of branch 8.0 up to c3a05d0 2016-02-26 16:23:12 +01:00
Christophe Simonis c3a05d0516 [MERGE] forward port of branch 7.0 up to 9f0120d 2016-02-26 16:22:38 +01:00
Jérome Maes de9342fac4 [FIX] ir_attachment : potential buggy comma
Copy/paste mistake and the comma stays at the end of the line. This
causes a wrong affectation : indeed, `index_content` gets a tuple with
the desired value. This does not cause crashes, and the representation
of the tuple is correctly stored in database, but this is not the
expected behavior.
2016-02-26 16:09:36 +01:00
Thibault Delavallée 920ada7054 [FIX] website: wrong computation of view
get_template should accept ids or xml ids. However the id or xml_id is given
to IrUiView.get_view_id that waits for an xml_id. get_template crashed if it
received an id.

This commit solves this by setting view_id to the given id, or resolve the xml_id
through get_view_id.
2016-02-26 15:45:49 +01:00
Damien Bouvy a0bc204bb1 [FIX] payment: missing right for users on payment method
Let's be consistent, shall we?

If portal users can delete their own card, employees should have
the same rights.
2016-02-26 13:48:19 +01:00
Damien Bouvy c9a1d4d01c [FIX] payment: missing delete right for portal user
Portal users should be able to delete their credit card/payment method.
This ACL in combination with the ir.rule allows them to do so.
2016-02-26 13:43:05 +01:00
Josse Colpaert 45d4bd04cb [FIX] purchase: the stock should be valued without the taxes included from the purchase order line
From issue 660592. (already fixed in v9)  When products are received from a purchase line
with taxes included, the cost for the stock valuation (on the stock move) on reception
should be without these taxes included.
2016-02-26 11:45:22 +01:00
qdp-odoo bec9c19a2d [FIX] account: unreconciling a journal item partially that has a currency difference linked was not allowed because the exchange rate was still linked to another line, and thus couldn't be reconciled with its reversal 2016-02-26 11:23:26 +01:00