Commit Graph

75431 Commits

Author SHA1 Message Date
Denis Ledoux 0200e31f7b [FIX] calendar: context can be frozen in Odoo 8.0 2015-02-20 16:53:02 +01:00
Denis Ledoux b0be8dfdfd [MERGE] forward port of branch saas-3 up to aae75f1 2015-02-20 16:43:15 +01:00
Christophe Simonis a9ba27b79f [FIX] stock: only get first element from cursor row 2015-02-20 16:33:16 +01:00
Jeremy Kersten 337487db60 [FIX] website_blog: change name t-as to avoid to erase exisitng variable tag.
controller render with context { tags, tag, ... };
so use 't-foreach tags t-as tag', erase the 'tag' from controller.
2015-02-20 16:22:15 +01:00
Denis Ledoux aae75f1e29 [FIX] hr_expense: deprecated use of LocalService()
Introduced in a test, during the forward port 7613d5d499
2015-02-20 16:19:44 +01:00
Jeremy Kersten b2aa9c8429 [FIX] website_blog: duplicate blog via front end.
Traceback because id was not casted: AccessError: ('AccessError', u"Database fetch misses ids (u'1') and has extra ids (1), may be caused by a type incoherence in a previous request")
2015-02-20 16:19:34 +01:00
Denis Ledoux 6539104a4f [FIX] calendar: add followers to recurrent events
default_get method of mail.wizard.invite model uses
the key 'default_res_id' to retrieve the res_id of the record
to add the followers.

In the case of recurrent events, virtual ids are used, and
the conversion from virtual ids to real ids is needed.
2015-02-20 16:13:28 +01:00
Denis Michiels b8ecbe3191 [FIX] google_drive : translate the record
Pass the context, with the language setting, when the record is read to
fill the google drive template. That allows to translate the name of the
document and all the informations inside.

opw-626675
2015-02-20 16:08:10 +01:00
Denis Ledoux 7613d5d499 [MERGE] forward port of branch 7.0 up to 27a48f8 2015-02-20 15:57:51 +01:00
Josse Colpaert 4625b5c840 [FIX] speed up with sql query for picking assign
[IMP] Commit and limit query to 1
2015-02-20 15:36:55 +01:00
Denis Ledoux 27a48f8026 [FIX] web: action translation (menuitems & more menu)
This rev. reverts partially 1d76586a1b
This rev. is related to #3462

Regarding addons/web/controllers/main.py
---
name of model ir.actions.actions is not translated
it's the name of server actions, client actions and window actions
that are translated.
Meaning the name of the ir.actions.actions will always be in English,
even when passing the user language within the context.

Regarding addons/web/static/src/js/views.js
---
There is no reason to pass the field values within the context
of the /web/action/load call: The read methods of actions are
not overidden to use the field values. Besides, it pollutes
the context of the action, leading to unwanted behavior, such
as the translation of the action name within the lang available in the
fields of the form view (e.g. the partner form).

Initially, the field values added in the context has been added
within the rev. 542928adde
Indeed, sidebar_context (or sidebar_eval_context nowadays), contains
the field values, and the additional_context passed to /web/action/load
is an extension of this sidebar_context.
We are not sure the reasons why the sidebar_context was passed to the
/web/action/load, but we believe it was to pass the session/user context
containing the lang, timezone, and so on, not to pass the fields values.
2015-02-20 15:36:47 +01:00
Christophe Simonis a5735e7891 [FIX] website_forum{,_doc}: noupdate for website.menu 2015-02-20 14:55:07 +01:00
Denis Ledoux 4ad329de55 [FIX] delivery: shipping invoice line depending on amount total
The delivery module overrode the method _create_invoice_from_picking
to add the shipping costs according to the invoice and the shipping.

The issue is that the method _create_invoice_from_picking creates an empty
invoice, without any line. The lines are added afterwards, using the method
_create_invoice_line_from_vals, within the method _invoice_create_line.
So, after having called _create_invoice_from_picking, the invoice is indeed
created, but without lines, and therefore without the amount total value.
Adding the shipping costs there will thus prevent the shipping costs
based on the total price of the invoice (e.g. free for an order of 500€)

This rev. overrides the method _invoice_create_line instead, as, after
the call to this method, the invoice will be completely set, with all
its lines, and with a correct amount total. The side effect
is that we need to recompute the taxes a second time, using button_compute.

This is not the cleanest way to solve this issue. Indeed, a cleaner patch
would be to change the method _create_invoice_from_picking so it creates
the invoice along with its invoice lines, using the ORM command
(0, _, values) to creates the lines directly within the invoice creation:
invoice['invoice_line'] = [(0, _, values) for values in invoice_lines_vals].

Nevertheless, this is a bigger change, that will probably require API changes,
and therefore should be done in master.

opw-626226
opw-628517
2015-02-20 12:44:11 +01:00
Olivier Dony f55a6046a8 [FIX] account.move.line: no move revalidation for trivial changes
Many trivial changes to journal items, such as the
"blocked" flag for litigation (follow-up), do not affect
the balance of the whole entry. These should not cause
the account.move to be (re)validated.

For example it should be possible to change trivial
fields even on journal entries recorded in a closed
fiscal period.
2015-02-20 12:24:49 +01:00
Vicente Jimenez Aguilar 0892a088fc [FIX] report_webkit: multiple misspellings of wkhtmltopdf
closes #5392
2015-02-20 11:16:13 +01:00
Somesh Khare 7f5bc3fdf0 [Fix] hr_expense: correct amount for included tax with negative sign
Setting an expense with a tax included with a negative base code sign was
getting the wrong amount (tax line as a credit instead of debit). So leading to
a total for the accounting entry superior of the total of the expense (should
not happend as the tax is included).
Add test to verify this scenario.
Fixes #4260, opw 618531
2015-02-20 11:10:32 +05:30
Arthur Maniet 6c37747057 [FIX] account: don't create move lines that have neither an amount or a tax code
Fixes 51e9f90981
2015-02-20 06:07:56 +01:00
Goffin Simon 8e5a0ac43c [FIX]hr_timesheet: prevent quick creation and record opening for account fields
The quick creation and account record opening in the sheets are not useful.
Besides, restricted users (simple employees) have no read access on account.account.

opw:626989
2015-02-19 09:11:21 +01:00
Denis Ledoux 0167acbb52 [FIX] report : translation of report using website editor
In the website editor, the translations are loaded using
the route 'get_view_translations', which returns the translations
of the templates loaded by the website (t-call calls)

The thing is, report templates use the 'translate_doc' method
to actually load the report, translated in the partner language,
and the templates loaded by this method are not seen by the website,
therefore, when calling 'get_view_translations', those report
templates were just ignored, thus their translations are not loaded.

This rev. injects the templates loaded with translate_doc
when rendering the report into the method 'customize_template_get'
(which is used by 'get_view_translations' to retrieve the loaded templates).

The translations of the reports are therefore now loaded corretly when
hitting the "translate" button in the website editor for reports.

Besides, this rev. has as (good) side-effect to add the template,
in the template selection input when editing using the HTML editor.

opw-620713
2015-02-18 16:21:42 +01:00
Anthony Muschang 184ed718a3 [FIX] project_issuer: fix record rule "issue_user_rule"
A message follower is a partner not a user

Closes #5346
2015-02-18 16:10:28 +01:00
Goffin Simon 427835e47f [FIX] website_quote: quote template does not take into account variant prices.
In a quote_line, if the product is a product variant, the unit price must be
the sum of the sale price and the price extra.

opw: 625957
2015-02-18 14:21:42 +01:00
David Monjoie 1581c43026 [FIX] web: revoke last_search when the user made his choice
Without this, if the user creates a second line (or more) with another search query and presses tab (or clicks somewhere else) quickly, it will take the previous search result instead of the new one because the new one did not occur yet.
With this fix, if the search did not have time to process, the Create a product modal appears, just like it already did for the same behavior on the first line.
Fixes 620679.
2015-02-18 13:52:36 +01:00
Jeremy Kersten 2c09ba980d [FIX] calendar: synchro - use current user to synchronize as uid
Else, function like get_primary_calendar return values from administrator and not the user to synchronize
2015-02-18 13:00:39 +01:00
Olivier Dony e3ba594789 [I18N] Remove deprecated PO files (incorrect names)
Those files have already been replaced by
correctly named ones.

uk_UA.po -> uk.po
lt_LT.po -> lt.po
nl_NL.po -> nl.po
2015-02-18 12:11:51 +01:00
Olivier Dony 65e8115b8a [I18N] Update translations from Launchpad 8.0 branches (again), after syncing direct changes from 67bdc241bd 2015-02-18 11:58:13 +01:00
Olivier Dony 91d4b947f6 [I18N] Update translations from Launchpad 8.0 branches 2015-02-18 11:51:07 +01:00
Yenthe 67bdc241bd [FIX] incorrect etherpad url URL
closes #5287
2015-02-18 11:43:41 +01:00
Goffin Simon 02d07ef060 [FIX] l10n_eu_service: generate the description (Code) for account taxes. 2015-02-17 17:00:56 +01:00
Goffin Simon 60a8f894f9 [ADD] l10n_eu_service
As of January 1rst, 2015, telecommunications, broadcasting
and electronic services sold within the European Union
have to be always taxed in the country where the customer
belongs. In order to simplify the application of this EU
directive, the Mini One Stop Shop (MOSS) registration scheme
allows businesses to make a unique tax declaration.

This module makes it possible by helping with the creation
of the required EU fiscal positions and taxes in order to
automatically apply and record the required taxes.

This module installs a wizard to help setup fiscal positions
and taxes for selling electronic services inside EU.

The wizard lets you select:
 - the EU countries to which you are selling these
   services
 - your national VAT tax for services, to be mapped
   to the target country's tax
 - optionally: a template fiscal position, in order
   to copy the account mapping. Should be your
   existing B2C Intra-EU fiscal position. (defaults
   to no account mapping)
 - optionally: an account to use for collecting the
   tax amounts (defaults to the account used by your
   national VAT tax for services)

It creates the corresponding fiscal positions and taxes,
automatically applicable for EU sales with a customer
in the selected countries.
The wizard can be run again for adding more countries.

References
++++++++++
- Directive 2008/8/EC
- Council Implementing Regulation (EU) No 1042/2013

Closes #5229
2015-02-17 16:08:15 +01:00
Denis Ledoux fc6ac83608 [FIX] mail: hide delete button when uploading attachment
This is not possible to interrupt the uploading of an attachment.
We therefore hide the 'delete' button during the upload
2015-02-17 15:36:03 +01:00
Richard Mathot af94e5af6b [FIX] calendar: loading problem with some locales
When you try to load calendar_demo.xml, the loading of demo event
`calendar_event_1` fails with fr_BE locale (and probably some others).

This is due to the rendering of the mail template
`calendar_template_meeting_invitation` (which is used when you create
an event).

This template used a method `get_interval()` in calendar.py, which
does not always return Unicode strings. Furthermore, these strings
are dates and should be formatted according to user locale.

PS: Yeah, we love Python2's management of encodings and Unicode...
2015-02-17 14:41:29 +01:00
Arthur Maniet 51e9f90981 [FIX] account: avoid 0.0 tax lines
Don't create useless journal entries for taxes whose amount is 0.0.
Keep tax code lines creation unmodified.
Fixes #5036, opw 627055
2015-02-17 17:39:29 +05:30
Arthur Maniet 058a010456 [FIX] account: in bank statement reconciliation widget, make sure a move line 'ref' is an empty string if the field has no value
Fixes #5272
2015-02-17 11:30:34 +01:00
Denis Ledoux 31527c9a36 [MERGE] forward port of branch saas-3 up to 4c7e078 2015-02-17 11:10:10 +01:00
Arthur Maniet 69b6cf44bd [FIX] account: in bank statement reconciliation, show the invoice line from a partial reconciliation.
Since all the lines in a partial reconciliation share the same state and the same amount_residual, we need to keep only one 'result' line.
It was the first line found that was kept ; now it's the line whose amount is greater than amount_residual, whiwh most likely is the significant one.

Fixes #5129
2015-02-17 11:07:14 +01:00
Denis Ledoux 4c7e078478 [MERGE] forward port of branch 7.0 up to 772b213 2015-02-17 10:59:25 +01:00
Anthony Muschang 772b213e69 [FIX] hr_timesheet_sheet: hide button "Add a Line" if readonly sheet
The 'Add a line' button should be hidden when the sheet is readonly.
For instance, for a submitted employee sheet.

closes #4297
opw-628160
2015-02-17 10:56:14 +01:00
Denis Ledoux 550910a8f6 [MERGE] forward port of branch 7.0 up to a87d60f 2015-02-16 18:26:45 +01:00
Christophe Matthieu f9d8493ee9 [FIX] website_sale: In the shopping cart + in the shopping summary (order in front end), the internal reference should not be displayed 2015-02-16 16:59:52 +01:00
Christophe Matthieu 414175cb30 [FIX] website_sale: the cart and modal in ecomerce are not responsive for phone 2015-02-16 16:33:01 +01:00
Denis Ledoux a87d60f70f [FIX] warning: no notes parameter in onchange_product_id
This is related to rev. 4606b4535a
2015-02-16 15:07:21 +01:00
Denis Ledoux 30d3f9605f [FIX] purchase: order line description being reset on qty change
Also set name as False for product_id field in the purchase order line form (popup)
This rev. is related to 11bd7a6774
2015-02-16 15:04:22 +01:00
Denis Ledoux 4606b4535a [FIX] warning: onchange_product method signature
Module 'Warning' overwrites onchange_product_id method of purchase.order.line

The signature in the warning module had 'notes', while there isn't any 'notes'
parameter in the original method, in the purchase module.

The super call was also wrong, ignoring the optional fields, which
were therefore always set to the default value
2015-02-16 15:01:12 +01:00
Jeremy Kersten e4030e2016 [FIX] google_calendar: write info on current user with superuser_id
If the user is not admin, it will synchronize always from start, because last_synchro_date cannot be write on res_users
2015-02-16 14:55:22 +01:00
Denis Ledoux 11bd7a6774 [FIX] purchase: order line description being reset on qty change
The name must be changed when changing of product,
but not for other changes, quantity for instance.
The 'or not uom_id' is just for retro-compatibility concerns
uom_id being False actually means we just changed of product,
and the name must therefore be changed
name as been set as False in the onchange call in the view
for the product_id field, in this rev.,
so the name being False now means th change of product
Nevertheless, existing databases for which the view
is not up to date won't have this change
and we therefore have to rely on something else to know
when the product has been changed or not.

fixes #5295
opw-628138
2015-02-16 14:22:15 +01:00
Denis Ledoux d00d90a95e [FIX] web: cached company logo on database change
When having several databases in the login form (not monodb mode),
when switching from one database to another,
if the company logo was different,
the company logo could be the logo of the database you came from.

fixes #5291
opw-628131
2015-02-16 13:34:58 +01:00
Christophe Matthieu 8518a963e0 [FIX] product: if the product has no attribute and you add one without any value, the product is deleted. 2015-02-16 13:22:50 +01:00
Arthur Maniet 32b4ded242 [FIX] account: bank account field of the transactions in a bank statement
- Field is readonly when the statement is closed
- Only bank accounts with the same partner as the transaction or no partner can be selected
2015-02-16 11:55:45 +01:00
Arthur Maniet d1be21dfdf [IMP] account: feature that links bank accounts to partners upon bank statement closing.
Retreive additional informations to write on the res.partner.bank by using the onchange_partner_id, instead of only writing the partner_id
2015-02-16 11:55:45 +01:00
Christophe Matthieu a7e0b73930 [FIX] website: need to add an attribute on html to apply css selector in function of the browser. Fix the media video display for ie 2015-02-16 10:49:28 +01:00