Commit Graph

76826 Commits

Author SHA1 Message Date
Christophe Simonis 513cea69c6 [FIX] auth_oauth: do not transfer `debug` flag to OAuth provider
This parameter is not part of the spec [1] and may not be supported by
all OAuth providers.

[1] http://tools.ietf.org/html/rfc6749#section-4.2.1
2015-12-08 12:16:42 +01:00
Christophe Simonis 47b2f7ea9e [MERGE] forward port of branch 7.0 up to 3a1c693 2015-12-08 12:16:00 +01:00
FalcoBolger 4ba2e91aa4 [FIX] base_action_rule: pass kwargs when calling create/write's origin method 2015-12-07 12:26:40 +01:00
Goffin Simon 85e33c8e1d [FIX] account_anglo_saxon: incorrect account tax
When changing the account_id of an invoice line, all the tax line,
created from this invoice line and with a tax which has no
"account_collected_id" set, must be set with the same account_id.
Inspired from the function "compute" in model "account.invoice.tax"

closed #9727
opw:657499
2015-12-07 11:29:25 +01:00
Odoo Translation Bot 0de99dd2c8 [I18N] Update translation terms from Transifex 2015-12-06 02:56:34 +01:00
Goffin Simon cccb2351c4 [FIX] account: Bank statement reconciliation
To avoid to reset the partial reconciliation when the number of selected
lines is different to 1.
2015-12-03 11:24:07 +01:00
Goffin Simon 2749f73f9b [FIX] sale: update_tax in product_id_change
Thanks to the fix 503820a, when a fiscal position mapped an included
tax on a SO line, the price unit of the product is recomputed.
This fix has been applied in the function product_id_change in
the model "sale.order.line"

Before the fix, when changing the product uom on a SO line, the price
unit of the SO line was reset with the pricelist price without taking
into account the fact that a included tax could be removed on the SO line.

To avoid this kind of problem, the price unit must be recomputed in any
case according to the taxes.
2015-12-03 09:21:03 +01:00
Goffin Simon d9f92ba160 [FIX] account: included tax with fiscal position
When creating an invoice with a fiscal position(fp) which maps an included tax(itax)
to an excluded tax(etax). Each invoice line mapped by fp must recompute its unit price
to substract the included tax.
Inspired from 503820a

Closes #9811

opw:658109
2015-12-02 16:47:51 +01:00
qdp-odoo 077a168d4c [FIX] stock_account: counterpart account of a cost price adjustment is more likely the expense account instead of the stock input/output. Backport of commit 57d0903154c562 2015-12-02 16:20:32 +01:00
Christophe Matthieu 4d8ec5f931 [FIX] web: readonly fields not transferred from dialog to 2many field
'write_function' transfer the options to 'write' method from the popup form

Steps to reproduce:
1. Create custom model to add a product quantity on hand(readonly) field on stock.move
2. Show this field on Warehouse>All operations>Create a Transfer> Create: Internal Moves
3. Add a Internal Move, then open it again, the quantity on hand field's value show 0. But change the product, the value is correct.
2015-12-02 13:29:51 +01:00
Christophe Matthieu ae175d1574 [FIX] website_blog: change_background doesn't work occasionally
Some time new background image, which I set via "Change cover" button don't saved. Because super is called before the jsonRpc and don't wait that the background is saved.
2015-12-02 10:40:16 +01:00
Martin Trigaux 44eeb387d3 [FIX] purchase: updating existing PO should keep origin
When a make to order product is sold, a purchase order is created or added to an
existing one. In the second case, the origin of the sale order was lost.
It is now added to the existing source.

opw 656688
2015-12-01 15:23:46 +01:00
Christophe Matthieu 1cd03ed7fe [FIX] web: one2many set_value must use dataset last_default_get as default values 2015-12-01 13:41:28 +01:00
Christophe Matthieu 0ba248aeda [FIX] web: prevent default value changes
Load record use values as dataset and change object value (for eg: add virtual id in the default value object).
2015-12-01 13:41:28 +01:00
Denis Ledoux 06eccf5a54 [FIX] event: located dates in events name
The user timezone wasn't respected in the events name.

e.g. for a user with timezone UTC+1,
for an event
from 12/01/2015 00:00:00
to   12/02/2015 00:00:00
The dates in the event name were set to
(2015-11-30 - 2015-12-01)
while it must be
(2015-12-01 - 2015-12-02)

opw-657962
2015-12-01 12:32:14 +01:00
Goffin Simon c02d0287d8 [IMP] account: Bank statement reconciliation
It was impossible to make a partial reconciliation with several lines.
Each time a new line is proposed for the reconciliation, the previous
partial reconcialtion is canceled. The partial reconciliation can just
be proposed on the last selected line when:
self.get("balance") * (last_line.debit - last_line.credit)<0
2015-12-01 11:07:08 +01:00
Odoo Translation Bot cc82f7518f [I18N] Update translation terms from Transifex 2015-12-01 00:28:25 +01:00
Denis Ledoux eb5d95b135 [FIX] product: _get_image_variant is used for the field `image`
This revision is related to 93d4db9d1e.

Usually, for models with an image, the original `image` is stored
in the field `image`, and then the resized value are in the fields
`image_medium` & `image_small`.

In the specific case of the product variant, this is not the case,
the original image is stored in the field `image_variant`,
and the `image` field uses as well the method `_get_image_variant`.

The `image_get_resized_images` must therefore return the "big image"
as well, which is returned with the key `image`, by default.
This is done using the method argument `return_big`.
2015-11-30 13:51:25 +01:00
Martin Trigaux 44248a07a5 [FIX] base,share: error in_group_xx on user form
res.users form contains virtual fields in_group_ID to be added in res.groups.
Groups with boolean share=True (added by share module) must not be displayed in
the form and should not be modifiable through the user interface.
However, if a module adding/modifying a res.group is earlier in the dependency
graph than 'share' (e.g. only depends from 'base'), the update of the user view
is done before share is loaded and the overrride of 'get_application_groups' is
never executed.

As we can not guarantee that the module is share loaded, put the logic of
hidding the module in base instead of share.

This workaround is quite hacky but is necessary in stable version.
Better fix in 9.0 at cf63d4d

Fixes #6324
Fixes #5820
2015-11-30 13:11:02 +01:00
Denis Ledoux 93d4db9d1e [FIX] product: resized variant images
This is possible to set an image for a specific variant
When this was the case, the image displayed was always the
image within its original size, it wasn't resized
to small and medium sizes.

opw-657055
2015-11-30 13:06:16 +01:00
Goffin Simon 28463d0310 [FIX] delivery, stock_account: invoice on delivery with fiscal position
When creating an invoice on delivery, the right 'account_id' was not
set on the invoice line according to the fiscal position.

opw:657542
2015-11-30 09:46:38 +01:00
Odoo Translation Bot b8dfa91613 [I18N] Update translation terms from Transifex 2015-11-29 02:58:05 +01:00
Nicolas Lempereur da2e4c86a4 [IMP] account: replace selection key in reconciliation
opw-653468

ff note: no need after saas-6
2015-11-27 17:49:21 +01:00
Denis Ledoux 261ccf7c56 [FIX] point_of_sale: quantity uses decimal separator of lang
This revision is related to 5a10903e9b.

The above revision makes so the decimal separator from the language
is used to display the prices.

This revision makes so this decimal separator is used as well
for quantities, to be coherent.

opw-657591
2015-11-27 17:26:31 +01:00
Denis Ledoux 4b003afd0a [FIX] point_of_sale: quantity decimals for new lines
In the pos interface,
when adding a product to the order,
the quantity was set to `1`,
but, when adding the same product again,
the quantity was set to `2.000`.

We use `set_quantity` to not
copy/paste what is already done
in this method to display
correctly the quantity within
the product unit of measure rounding.
2015-11-27 16:55:00 +01:00
Invitu 52d2b7fbcf [FIX] auth_signup: translate password reset email
The password reset email is in the language of the user clicking on the button,
not in the one of the targeted user.

Fixes #9194
Closes ##9195
2015-11-27 15:02:54 +01:00
Olivier Dony 5b60c30a6a [FIX] l10n_eu_service: no reset of install wizard state
Hardcoding the state to `open` is useless as it is the
default state, and forces the state to reset upon every
update, which is annoying.
2015-11-26 18:15:47 +01:00
Denis Ledoux 12f77fa22f [FIX] mail: notify all partners of the thread
As stated in the comment:
```
all notified_partner_ids of the mail.message
have to be notified for the parented messages
```

Record rules are applied when browsing one2many fields.
Therefore, when browsing `message.notified_partner_ids`
with a user other than the SUPERUSER, the multi-company
rules are applied, and a regular user could therefore not see
all partners of the thread, according to which
company the partners are associated with.
Nevertheless, all partners of the thread have to be notified,
including the ones the regular user cannot see.

To reproduce the issue:
 - Create a second company 'Second company'
 - Create a third user, associated to the first company 'YourCompany'
 - Set the demo user as in the 'Second company'
 - Create a project 'test' in the first company, 'YourCompany'
 - In the followers of the project, add the Demo user,
   with as subtypes "Stages changes" only
 - As the third user, create a new task in this project
 - Change the stage of this task, as the third user [this is important]
 - Sign in as the demo user, and see that you cannot access
   your messages inbox, due to an access rights error.

opw-650563
2015-11-26 18:08:07 +01:00
Xavier, Sodexis 70847ac5c0 [FIX] account_analytic_default: Default analytic account for invoice on delivery
When creating an invoice from a DO,
if there is no analytical account defined on the SO,
then use the default analytical account for that product.

Closes #9725
opw-657492
2015-11-26 16:34:02 +01:00
Denis Ledoux 1b8c9aed9f [FIX] models: custom fields seen as base fields
This was possible to create custom fields `x_*`
but seen as base fields.

For instance,
 - Go to Settings > Technical > Database Structure > Fields
 - Select a field (any)
 - Click on the model link, to be redirected to the model form
 - Edit & add a custom field from there.
 - Save
 - Notice that the field you just added is saved as a base field.

We solve this issue by assuming that all created fields and models
are customs, except the ones created by the ORM, by the database
initialization, the fields coming from the modules in python.

We therefore remove the mechanism on which a field was set
as custom according to the fact `manual` was set to True within
the context: This is now the case by default.

No change was required for the base fields: The `state` `base`
was already forced for those fields, that are created using
direct SQL requests `INSERT INTO`.

opw-657312
2015-11-26 15:44:29 +01:00
Denis Ledoux da667b573d [FIX] stock: barcode interface, do not reload locations all the time
Locations were search & read each time you changed
the quantity of a product in a picking.

Once the locations loaded the firs time, this is unlikely
the locations will change during the operation. It shoudln't,
at least.

Therefore, for performances, we avoid to load the locations
each time the picking is reloaded.

opw-648529
Fixes #8344
2015-11-26 14:08:44 +01:00
Denis Ledoux adf6d0e557 [FIX] sale_layout: remove `categ_sequence` default value.
`categ_sequence` are stored related fields, to `sale_layout_cat_id.sequence`.
Setting a default value for them has as side effect to rewrite
the value on the related field.

To reproduce the issue:
 - Create a sale layout category, with 10 as sequence
 - Create an invoice with one line, with this sale layout category
 - Come back to the sale layout category,
   notice that the sequence has been changed to 0.

Besides, as the sequence was rewritten on the sale layout category,
the sequence was rewritten on all sale order lines and invoice lines
having this sale layout category.
If you have a bunch of them, this could take a while.

The `categ_sequence` default value is supposed
to come from the sale layout category.

opw-651937
2015-11-26 11:22:48 +01:00
Cedric Snauwaert d179a94da6 [FIX] web: list_view, context when doing name_get call in m2m was not compute correctly
this is a backport of commit fd56268c6ca4e8a6f94f16de9129bd12be87303f
2015-11-26 10:25:15 +01:00
Denis Ledoux b459c4dc03 [FIX] website: possibility to set no url for the home menu
Unsetting the URL of the menu `Home`,
in Settings > Configuration > Website Settings > Configure Website,
leaded to the unavailability of the website.

opw-657572
2015-11-26 10:02:41 +01:00
Martin Trigaux 5c0fd9780e [FIX] calendar: duplicated term 2015-11-26 09:52:42 +01:00
Nicolas Martinelli bb90e55fb5 [FIX] product_visible_discount: corrected price
This applies the commits 503820a and f26b94fd (and their subsequent
corrections) to the calculation of the discount. Indeed, the calculation
of the discount must take into account the corrected price, otherwise
the discount is wrongly computed.

opw-656604
2015-11-25 16:00:13 +01:00
Martin Trigaux 1c5c255186 [FIX] calendar: translatable date content
The time_display is present in a translatable email template but was not
translated. Added the missing term.

Updated .pot file for a few missing terms.
Removed base_calendar.pot that has no reason to be in 8.0

Fixes #9573
2015-11-25 14:36:55 +01:00
Denis Ledoux 2fd14db574 [FIX] stock: multi-company rule for `stock.quant`.
`stock.move` & `stock.product` have multi-company rules.
There is therefore no reason why `stock.quant` could not have one.

Besides, this could lead to access rights issues,
when a user went to the `Quants` list,
in Warehouse > Traceability > Quants,
while there were quants for products in a company different
than the user company.

opw-653188
2015-11-25 14:32:46 +01:00
Martin Trigaux 1660daf2fb [FIX] crm: avoid constraint errors when merging partners
As for the _update_foreign_keys, the _update_reference_fields method may raise an unique constraint when merging two partners.
In such case, the new record is not relevant and can be removed.

Backport of 8d23a3a86c.
OPW 657338, closes #9705.
2015-11-25 14:15:25 +01:00
Denis Ledoux 3e03cfe7ac [FIX] website: type openerp -> odoo
opw-657169
2015-11-24 16:09:19 +01:00
qdp-odoo f8c261c76a [FIX] account: when a payment is processed in the bank interface, it will complete the partner automatically if a single invoice is found with the same reference. As expected for a structured communication for example. Fixes opw 653452 2015-11-24 10:22:16 +01:00
Thibault Delavallée 8fa7318178 [FIX] project, issue: change user_id + date_start
project.task: use an onchange to update date_start when changing user_id.
Indeed date_start is automatically updated in the create / write. Without
the onchange, this may lead to errors related to date_start being greater
then date_end.

project.issue: code in create and write now takes into account date_open
values given to the method and avoid erasing them.
In issue however the onchange is not added. Indeed the date_open and
date_closed fields are not visible in the view. They are automatically
computed and used to compute statistics.
2015-11-23 17:36:40 +01:00
Thibault Delavallée af6305722f [FIX] mail: server action: do not send directly email notifications
This is a backport of a fix in 9, revision 890f1302c7175e24887e66a2f8b973e72fb4c7e9.
In this revision a context key is added wshen evaluating server actions.
Notification emails created during a server action will be set in the queue
and not send directly.
2015-11-23 17:36:39 +01:00
Thibault Delavallée e74c12ffe2 [FIX] hr_holidays: mailing deadlock / spam
Some fixes coming from V9 revision 2be1dfc1ed7c9814cd3dbf4eb4cc95f842f738c2. The
purpose is to avoid to send emails in batch and to limitate automatic
subscription.

 - add a context key to use the email queue for notifications linked
   to allocations created in batch. This way emails will be send asynchronously
   and will not create a deadlock when having a lot of allocations to process.
 - also fixed a missing context in a browse
2015-11-23 17:36:39 +01:00
Denis Ledoux 6f29cbe3ac [FIX] website,ir_qweb: prevent inherit_branding for assets
The attribute `data-oe-*` (`data-oe-id`, `data-oe-model`, ...)
must not be added when rendering the assets, to avoid
having different assets content,
e.g. a different content for the assets_common,
according if the user is signed in or not,
if the user can edit the website or not.

A different content for an assets according to the
users rights or the user being signed in or not means
that the assets are permanently re-written in the filestore,
which is against the point of the assets.

The content of the assets (assets_common) must not be
different from time to time, it must always be the same
(except when installing a new module, obviously).
Adding the `data-oe` attributes was pointless for the assets
anyway, and prevented having an identical content all
the time, therefore rewritting the assets all the time
in the filestore.

opw-657046
2015-11-23 17:01:03 +01:00
Julien Legros a92b558652 [FIX] mail: update_notification 2015-11-20 15:28:21 +01:00
Denis Ledoux 777f215edb [FIX] website_quote: quote email template
When there is a quote template set on a sale order,
the email sent by default is the email
`Sales Order - Send by Email (Online Quote)`,
and this since 5153b2d281.

Therefore, there is no point to override the content of the
email template `Sales Order - Send by Email` to set
the quotation link in the email template, since this is not
this email which is being used for sales order with an
online quotation template.

Nevertheless, the link to the email quotation must be
put in the `Sales Order - Send by Email (Online Quote)`,
so the customer can access his online quotation directly
from the confirmation email, as it was designed and done
in the override of the `Sales Order - Send by Email`.

opw-657060
2015-11-20 14:35:13 +01:00
Denis Ledoux 8590f0445f [FIX] stock: `partner_id` field in incoming products list
`partner_id` is not the `supplier` of the stock move,
this is the destination address:
`Optional address where goods are to be delivered,
specifically used for allotment`.

The supplier would be a related to the `partner_id`
of the `picking_id`.

Nevertheless, displaying the `supplier` in the `stock.move` list
is not useful. You should use the pickign list for that matter.

opw-656985
Closes #9219
2015-11-20 11:28:44 +01:00
Xavier Morel c6d6ae8aec [FIX] qweb: handle unicode tags and attributes
closes #8895
2015-11-19 14:59:44 +01:00
Thomas Groutars b665478fa7 [FIX] py.js: unhandled prefix `not`
closes #6129
2015-11-19 13:54:26 +01:00
Thibault Delavallée f57e580f2d [FIX] project_issue: correctly update alias
When choosing use tasks / use issues, correctly update the project alias. Indeed
only the use issues checkbox had an onchange. This revision adds the onchange
on use tasks so that the method correctly computes the new alias destination model.

Also updated the _get_alias_models method to be more modular instead of hardcoding
values. Call super.
2015-11-18 14:41:56 +01:00
Martin Trigaux 2831d94c20 [FIX] survey: no attachment in shared survey
When sharing a survey, a mail.mail is created but the attachment were lost.
This is due to a missing command (6, _, ids) when creating records in
attachment_ids field (many2many).

Fixes #9364, opw 656742
2015-11-18 13:52:21 +01:00
Olivier Dony d117d6645e [MERGE] Forward-port 7.0 up to 051b2ce539 2015-11-17 17:55:17 +01:00
Denis Ledoux f69b0cade1 [MERGE] forward port of branch 7.0 up to df91cb5 2015-11-17 13:04:39 +01:00
Denis Ledoux df91cb5a9a [FIX] mrp: Product Cost Structure decimal precisions
The decimal precisions for the quantities, cost/supplier price
per unit of measure were not respected. It was always
set to 2 digits, whatever the configuration in the database
decimal precisions.

opw-653143
2015-11-17 12:56:28 +01:00
Denis Ledoux dd8cbf49ac [MERGE] forward port of branch 7.0 up to d24fcd1 2015-11-06 16:04:21 +01:00
Denis Ledoux a23468c845 [FIX] hr_timesheet_sheet: total attendances & timesheets performances
For these function fields, bypassing the ORM, using a SQL query,
improves the execution time by 100 for a set of 80 timesheets
in a database with
 - 250K `hr.analytic.timesheet`
&
 - 250K `hr.attendance`.

These function fields depends on a one2many field which use
the SQL view `hr_timesheet_sheet_sheet_day`.

When performing `sheet.period_ids`, two SQL requests are performed,
 - the first just to know the ids in the sql view matching this sheet
 - the second to read the fields `total_attendance` & `total_timesheet`
and the request is performed on the entire set of lines of this view
(~250K lines in the observed use case)

while, when replaced by this SQL request, only one request is performed,
on a restricted set of lines, speeding up significantly the computation
of these computed fields for smaller sets of sheets.

opw-653447
2015-11-05 16:23:48 +01:00
Olivier Dony 789a86901a [FIX] account, l10n_fr: avoid exceptions when processing parameters 2015-11-03 21:38:53 +01:00
Olivier Dony 2ae6481233 [FIX] account, crm, l10n_fr: avoid exceptions when processing parameters 2015-11-03 21:38:53 +01:00
Nicolas Lempereur 9717afbbb7 [FIX] event: fix send mail to event registrant
Currently, the button "Send Email" next to the email address of an event
registration didn't work if a partner was not set.

This commit removes the button, thus removing the feature but partially
adds it back via the chatter suggested recipients in the same way it is
done for a lead.

It is still partially a feature regression since to work the viewing
user need more access rights (e.g read access right on res.partner)
than before.

closes #9486
opw-653127
2015-11-17 16:25:45 +01:00
Nicolas Martinelli f18399f721 [FIX] purchase: invoice state of PO
If the invoicing policy of a PO is set to "Based on incoming shipments"
and the PO contains a product of type "service", it is never considered
as invoiced, and therefore reach the state "Done".

The reason is that no stock move is linked to this PO line, and
therefore it is never considered as invoiced since we check the invoice
state of the associated sotck moves.

This fix assumes that in this specific case, a PO line for a service is
always invoiced, since there is anyway no incoming shipment linked to
it.

opw-654317
2015-11-17 13:40:37 +01:00
Denis Ledoux c9fce1a404 [MERGE] forward port of branch saas-3 up to f69b0ca 2015-11-17 13:05:15 +01:00
Goffin Simon e3b90ba1d4 [FIX] sale_stock: payment_term in supplier invoice
When invoicing a supplier, this is the supplier payment term which
has to be taken into account.

opw:656307
2015-11-17 10:45:17 +01:00
Nicolas Martinelli cf82f0fffc [FIX] account_analytic_default: access rights
The group analytic.group_analytic_accounting should have access to the
account.analytic.default model. Otherwise, a user with only analytic
rights (along with another group which has access to the products, e.g.
Purchase) will not be able to see the product form view. Indeed, the
field rules_count requires an access to the model
account.analytic.default.

opw-653735
2015-11-17 08:08:38 +01:00
Matthieu Dietrich 0d0bb69bb1 [FIX] stock: Only re-reserve moves not done or cancelled
`Recheck availability` must ignore
the done or cancelled moves.

Otherwise, it raises the warning telling you cannot
unreserve a done move.
856b31719c/addons/stock/stock.py (L1899)

To reproduce the issue:
 - Create a delivery order,
   with 10 stockable product A
   & 10 stockable product B,
   mark as todo.
 - Create a receipt,
   with 5 stockable product A,
   mark as todo & transfer.
 - Cancel the move of stockable product B from the delivery order,
   in Traceability -> Stock Moves.
 - Come back to the delivery order, `check availability`,
   then, `recheck availability`

Closes #9550
2015-11-16 17:13:25 +01:00
Goffin Simon 856b31719c [FIX] product: _check_valid_attribute
To check if the values set for the attribute are valid.

opw:653945
2015-11-16 13:50:19 +01:00
Martin Trigaux c054350dac [FIX] account_check_writing: undefined amount
In check_writing report, amount is the content of the field amount_to_text that
we can not guarantee has been filled (done in onchange so could be avoided, also
for other languages, etc.)
Instead of potentially failing, double check amount is filled.
cf https://www.odoo.com/groups/59/14976615
2015-11-16 12:15:40 +01:00
Odoo Translation Bot 396181648c [I18N] Update translation terms from Transifex 2015-11-15 03:03:19 +01:00
Goffin Simon 26189bf67a [FIX] website_sale, website_sale_options: optional_product_ids
The field optional_product_ids is not in the model "product.template" if
the module website_sale_options is not installed.

opw:654273
2015-11-13 13:05:33 +01:00
Christophe Simonis 5b77f9d39f [FIX] website: pass context as keyword argument when calling method. 2015-11-12 12:09:53 +01:00
Nicolas Lempereur a8ae94485d [FIX] website_sale: unify image update when change variant
The variants on a product in the ecommerce can appear:
- naturally, not a list, colored square for color, ...
- in a list of radio button.

To have the second kind, we need to enable the "List View of Variants"
customize option.

One part of the code was not the same which cause an issue when saving
the image of the variant, it was saved on the product.template instead.

This commit add an "update_product_image" function which is now called
in both scenario.

first half of:
opw-654279

forward port note: in 9.0 website/image -> web/image
2015-11-10 16:34:57 +01:00
Nicolas Lempereur 15b0596c31 [IMP] web: remove onchange on m2o one remove record
These onchanges were needless since it was already done by the
BufferedDataSet when we use alter_ids to add/remove ids/virtual ids from
the recordset.

The onchanges this commit remove were introduced with 6b907bb4d in
juliet 2012 whilst the onchange in the BufferedDataSet when using
dataset alter_ids was with dd747c096 in october 2012.

closes #8273
fixes #7595
opw-644706
2015-11-10 12:38:04 +01:00
Nicolas Lempereur 3e1d5a5cca [IMP] web: remove needless o2m onchange
Partial backport of master (-> v9) commit 059230512.

for the issue when removing an invoice line from an account.invoice,
three onchange where triggered:

- ListView account.invoice.line unlink the line id from its dataset,
  [[first onchange]]
  -> the line id is removed from the dataset which trigger an onchange

after this is done (and the onchange is finished), the following
onchange happen:

-- remove each record of the Collection of the ListView
   -> this remove the id of these record from the ListView List dataset
      [[second onchange]]
      -> this trigger an onchange albeit the dataset is not changed
         (since it was already removed before the first onchange)
   -> this trigger an onchange on the one2many_list of the ListView
      which has the same dataset as the ListView
      [[third onchange]]
      -> so an onchange is called yet again.

this commit removes the second onchange in this case where we remove ids
already removed from the dataset.

closes #8273
fixes #7595
opw-644706
2015-11-10 12:36:06 +01:00
Manuel Vázquez Acosta c333385eda [FIX] account_voucher: amount currency on supplier payment
In scenario described at #1490 (comment 152726416), amount_currency of a
supplier payment has the incorrect sign
Complete ede807d2955
Closes #9347
2015-11-09 17:07:25 +01:00
Denis Ledoux 7cab554590 [FIX] portal_sale,website_quote: templates compatible with wysiwyg
<% are automatically escaped as soon as the wysiwyg tool
is used to edit the template.
The wysiwyg tool is not compatible with Jinja, and
it isn't expected to be.

To avoid to have this problem everytime when
editing the portal email templates, we use
a Jinja syntax compatible with the wysiwyg,
as a workaround.

opw-654223
2015-11-09 15:38:17 +01:00
Odoo Translation Bot 7a0a649deb [I18N] Update translation terms from Transifex 2015-11-08 03:01:35 +01:00
Denis Ledoux 8558ecfdf3 [MERGE] forward port of branch saas-3 up to dd8cbf4 2015-11-06 16:08:30 +01:00
Denis Ledoux 384b8d496d [FIX] base_import_module: exception logger for module imports
When importing a module, if an error was raised
during the import, the traceback wasn't displayed
anywhere, making harder the debugging.

While it make sense to not display the entire traceback
to the user, in the web client, this is useful to
diplay the traceback in the logs, for debugging purposes.

opw-653882
2015-11-06 12:03:35 +01:00
Nicolas Martinelli ea2c80cad0 [FIX] web: Python-like rounding method
Javascript and Python handle the rounding of -x.5 differently.

In JS, `Math.round(-0.5)` is equal to `-0`.
In Python, `round(-0.5)` is equal to `-1`.

This will lead to inconsistencies between Python and Javascript, but it
can also lead to inconsistencies in the Javascript itself. Indeed, in
the POS, a refund to the client is entered as a negative number. For
example, `4.245` will be rounded to `4.25`, but a refund of `-4.245`
will be rounded to `-4.24`. The payment and the refund are not
consistent.

Sources:
- http://www.ecma-international.org/ecma-262/6.0/index.html#sec-math.round
- https://docs.python.org/2/library/functions.html#round
- https://en.wikipedia.org/wiki/Rounding#Round_half_up

Fixes #9249
opw-653034
2015-11-04 13:14:59 +01:00
Xavier ALT 2f35c40714 [FIX] web_calendar: date/datetime fields format in calendar views
As everywhere else, dates & datetimes must be formatted according
to the format defined in the `res.lang` of the user, and within
the timezone of the user.

Before this revision, when adding a datetime field to a calendar view,
the raw value of the date was displayed, for instance:
`2015-01-01 10:00:00`
instead of
`01/01/2015 11:00:00`
for a user in English(US), in UTC +1.

fixes #5324
opw-653625
2015-11-04 12:47:28 +01:00
Pedro M. Baeza 0ea130424d [FIX] sale_service: Allow a project user to close a task.
Closing a task associated to a sale order line requires
the write access to the according sale order line, that
a user who is only a Project > User does not have
by default.

Fixes #9286
Closes #9352
2015-11-04 12:09:30 +01:00
Goffin Simon 4324891529 [FIX] website_sale: add to cart with optional products
When clicking on button "add_to_cart" for a product with several options,
 the user must be redirected to the product page. In this way, the user can
 choose the options, he wants to buy with the product before adding the product
 in the cart.

 opw:653356
2015-11-04 09:44:11 +01:00
Adrien Peiffer (ACSONE) 2ae37d7c9a [FIX] hr_contract: access on resource.calendar.attendance for HR officer
Add ACL on resource.calendar.attendance for HR Officer
according access right on resource.calendar

Otherwise, this isn't possible for HR officers to
manage Work Details (`resource.calendar.attendance`),
while they can manage Resource Calendar (`resource.calendar`)

Closes #9330
2015-11-03 17:04:22 +01:00
Denis Ledoux b12aa82926 [FIX] website_mail_group: Localized messages dates
The messages dates in the groups pages
 - /groups/<model('mail.group'):group>/
 - /groups/<model('mail.group'):group>/<model('mail.message):message/

Did not take into account the user timezone, and always displayed
the date in UTC time.

opw-653508
2015-11-03 14:08:15 +01:00
Odoo Translation Bot 82cd86f181 [I18N] Update translation terms from Transifex 2015-11-01 03:03:27 +01:00
Odoo Translation Bot 80c7209d2e [I18N] Update translation terms from Transifex 2015-11-01 00:31:46 +01:00
Nicolas Lempereur 70d0026125 [FIX] website: don't unescape translation text node content
When we had things like &nbsp; or &amp; in a text we want to translate,
the translation system would save it unescape (so \xa0 and &).

So in this instance, the traduction would not match the real source
which was not subjected to this unescaping.

opw-653173

note: fix is courtesy of dle (no need to forward port after saas-6)
2015-10-30 16:14:03 +01:00
Christophe Matthieu ee2b550f3c [FIX] web: radio button display empty value when change record
When a selection field with widget="radio" is False, the form view display the previews value for this field.

1 - Create a selection field (ex: [("1", "1"), ("2", "2")]), and display it on a form vue.
2 - Go to the form view (all the record have False value for this field).
3 - Change the value of this field for one record.
4 - In readonly mode, all other records now wrongly display this value (still False in DB or when "edit").

#opw-652002
2015-10-29 07:21:36 +01:00
Joren Van Onder 35e9fa5c41 [FIX] point_of_sale: handle POS clients with a closed session
People sometimes have an open POS client (/pos/web) which is associated
to a closed POS session. This causes multiple issues. The most important
problem occurs when a user closes the session and opens a new session
without refreshing the POS client. When doing this new POS orders will
become part of the old, already closed session and no new accounting
entries will be generated.

In order to fix this we make sure to check that the session that's
associated with the order that we get from the client is still open. If
it isn't we'll try to find a new, compatible session and add the order
there. If we cannot find a compatible session we'll create a new one
based on the old, closed one. When creating this new session we bypass
the opening_control phase which normally takes care of opening cash
control.

opw-652356
2015-10-28 14:04:25 +01:00
Denis Ledoux e6a3852c1f [FIX] website: child menus without url.
This is possible to have a child menu without URL.
The condition checking if the `active` class
must be added or not must take that into account.

opw-653132
2015-10-27 13:47:08 +01:00
Nicolas Martinelli 90f47496e6 [FIX] website_sale_delivery: currency of delivery methods
The currency of the delivery method should match the currency of the
company. Indeed, the price specified in the corresponding product is in
the currrency of the company and does not depend on the pricelist.

opw-652716
2015-10-26 10:32:43 +01:00
Joren Van Onder 109cfec679 [IMP] hw_proxy: remove the old docs and refer to the new docs
v13 of the POSBox image is vastly different from all the previous
versions. On top of that it contains a lot of new features. Because of
this a lot of the POSBox documentation had to be rewritten. While doing
that, we also decided to move the documentation to
odoo.com/documentation/user instead of keeping it here.
2015-10-26 09:09:37 +01:00
Nicolas Martinelli b40cb12626 [FIX] website_blog: return correct main_object
If the main object is not set, the default object used is 'ir.ui.view'.
One of the consequence is that website SEO metadata will be stored on
'ir.ui.view' instead of the correct model, in this case 'blog.blog'.
This will cause the SEO metadata to be the same for all the blogs.

opw-651898
2015-10-26 08:38:19 +01:00
Odoo Translation Bot e84c01ebc1 [I18N] Update translation terms from Transifex 2015-10-25 02:02:17 +01:00
Denis Ledoux f2bc45f91f [FIX] website: submenu without url
This is not impossible to have a submenu without URL.
The condition to set the menu item as active or not
must therefore take that into account.

opw-652688
2015-10-23 11:11:42 +02:00
Nicolas Seinlet 8c4877ff0d [FIX] account_asset: Assets Analysis performance
In a real environment with a big dataset,
the query reponse time decreased from 750s to 6s,
by using a join on the sub-select instead of redoing
the select for each line.

Fixes #8812
Closes #9128
2015-10-22 16:04:19 +02:00
Nicolas Seinlet 5c9897a83f [IMP] stock_account: rework on stock_history view joins
- Replace `LEFT JOIN` by simple `JOIN` for required fields
 - Use `JOIN ... ON (...)` syntax instead of implicit join `A.X = B.Y`
 - Remove of unused column quant_id

Closes #9197
opw-650598
2015-10-22 15:59:54 +02:00
Nicolas Seinlet 29bd622521 [FIX] stock_account: stock history performance
Using BIGINT id instead of Text
 - This doesn't change the behavior, just the variable type,
   while being much more efficient.
Using `UNION ALL` instead of simple `UNION`
 - This doesn't change the behavior either,
   as the ids of each sub select cannot collide

Closes #9197
opw-650598
2015-10-22 15:59:54 +02:00
Denis Ledoux 8f6caf9785 [FIX] google_spreadsheet: Spreadsheets list
The URL for the Google Spreadsheets slightly changed
It's now `docs.google.com/spreadsheets/`, and no longer
`docs.odoo.com/spreadsheet/`

The domain is therefore changed to support both cases

opw-651847
2015-10-22 10:08:26 +02:00
Denis Ledoux c456d5f1a7 [FIX] portal: access management, do not re-send emails
When confirming the portal access management wizard,
the invitation email was sent to
users already having access to the portal,
while it should be sent only to
the users for who the access has just
been granted.

opw-650357
2015-10-20 14:31:42 +02:00