Commit Graph

76826 Commits

Author SHA1 Message Date
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
Jos De Graeve 92bfe3208a [FIX] stock: speed up backorder creation in barcode ui
Set no_recompute to True
in order to speed up barcode picking UI

This is done for the same reason than
7b306fc17a
merged through #6754.

The remaining quantities will be computed in the
`do_transfer` method, thanks to the call
`picking_recompute_remaining_quantities`.

There is therefore no need to recompute
the remaining quantities for each pack operation.

Closes #9142
opw-645883
2015-10-20 10:34:15 +02:00
Denis Ledoux 5a4884f017 [FIX] stock: update inventory wizard, default location_id
In a multi-company environment, you might not
have the access to the stock location
`stock.stock_location_stock`,
in such a case, you should not set it as default value.

This is a regression of revision 9bf6f0310e

opw-652387
2015-10-19 17:04:26 +02:00
Martin Trigaux 92e921bed2 [FIX] project: untranslated terms
Were not present in .pot files
Re-export all project related modules
Fixes #9119
2015-10-19 08:50:05 +02:00
Odoo Translation Bot a7c474b3a7 [I18N] Update translation terms from Transifex 2015-10-18 03:00:56 +02:00
Josse Colpaert f102a8bc23 [FIX] stock: in assign method, to force_assign moves should avoid duplicates courtesy of Wolfgang Taferner closes #8522 2015-10-16 15:12:36 +02:00
Nicolas Martinelli de1fb68444 [FIX] google_calendar: fix error type
The call to delete_an_event calls the method _do_request, which will
throw a urllib2.HTTPError.

opw-652219
2015-10-16 10:26:41 +02:00
Goffin Simon a8fa06867b [FIX] procurement_jit_stock: Cancelled MO
To avoid running  procurement in exception or cancel state.

Before the fix:

After cancelling a MO, when recreating the delivery order linked to the sale order in state
"Shipping Exception" the system generated 2 more copies of MO (1 Extra) instead of just one
for the cancelled MO.

After the fix:

Just one MO is recreated for the cancelled MO.

opw:650395
2015-10-16 09:04:09 +02:00
Nicolas Martinelli 8d4ca3d787 [FIX] mail: localize display date in chatter
This will display the localized date in the chatter.

opw-651625
Closes #9038
2015-10-15 15:02:03 +02:00
Nicolas Lempereur ba9771d6ec [FIX] website_membership: don't display old as members
Follow-up of 5ac77c9 which solved the issue when an association was
selected, but not when "All Members" was choosen.

Before this commit, the displayed membership lines would only be the
paid ones, if an association (membership product) was selected. With
this commit this is also the case when no such association is selected.

This commit also correct the member counts in the "country" list :

* with "All members" the free members were not in the counts,
* with not "Free member", the counts didn't took the eventual current name search.

closes #9083
opw-648627
2015-10-15 12:08:51 +02:00
Martin Trigaux 5575f98db1 [FIX] account: missing terms in .pot file 2015-10-15 08:46:39 +02:00
Denis Ledoux fc1f3b3424 [FIX] account_analytic_analysis: integer out of range
When reading the view
`account_analytic_analysis_summary_user`,
through the function fields using `_analysis_all`,
it could lead to an
`integer out of range` if you have a bunch of
`res.users` and or `account.account`. Casting
the multiplication of the integers to a double
solves the issue.

opw-652152
2015-10-14 16:41:00 +02:00
David Monjoie fa48e6f485 [IMP] website_sale: sale_get_order avoid useless sql request
Avoid an sql request when sale_order_id is None.
Improvement of 6b6d7310c0.
Closes PR #8974.
2015-10-14 11:59:54 +02:00
Denis Ledoux 8209368b02 [FIX] web: current transaction is aborted
This reverts commit bd9cbdfc41.

The above revision solved the SQL constraints not being
translated when raised. They were not translated because
the context, containing the lang, was not located as expected
in the `kwargs` dict.

While it solved this issue, it had as side-effect to raise
`current transaction is aborted,
commands ignored until end of transaction block` errors more
often when using the web client.

This can be explained by the double check, when the first
check raised this error
- which can happen, e.g. when the cursor is closed,
there is a retry mechanism in such cases -
and by the fact the transaction was not rollbacked.

This issue could have been solved as well by rollbacking
the transaction, but it is regarded as not-so-clean.

Therefore, to solve this issue, while still having
the SQL constraints translated, we apply the
second patch proposed in bd9cbdfc41
commit message, which is not-so-clean as well, but
which is a proper solution.

opw-651393
2015-10-13 17:12:34 +02:00
Raf Ven 38c9deeab4 [FIX] sale: Wrong filter definition
'state', 'in', ('draft') is an invalid definition, ('draft') is not a tuple
should have been ('draft',)

Replacing by simpler 'state', '=', 'draft'

Fixes #8115
Closes #9016
2015-10-13 10:47:48 +02:00
Leonardo Pistone 3349187aab [FIX] stock: propagate owner to backorder moves
When delivering partially a picking in which the moves
had an owner (`restrict_partner_id`) set,
the owner were not kept in the backorder moves.

Closes #4693
2015-10-12 17:47:29 +02:00
Antoine Huvelle 19668013ad [FIX] stock_landed_cost: domain on expense account
In the landed cost types form view
(landed costs types being nothing else than `product.product`),
we force users to choose an account of type `other`,
in order to prevent them from entering wrong data,
other types of accounts,
or receive an error message when setting a view account type.

This domain is actually the domain already applied in the
regular `product.template` and `product.product` form
view, thanks to `account.product_template_form_view`

Closes #4719
2015-10-12 17:15:28 +02:00
Christophe Matthieu 2f842d1703 [FIX] web: assertion error when save after speed multi delete in one2many
To reproduce use a form view with a one2many editable list and create a lot of lines. Then click a few times quickly on the delete.
If the user click at least two times on delete of a same record, the dataset add the id in "to_delete" the virtual id because "to_create" doesn't contains the virtual id of the record deleted previously.

E.g.: create a "Customer Payments" and select a "Customer" and "Payment Method" who generate a lot of "Credits" lines.
2015-10-12 17:15:28 +02:00
Commandant Custo 1881a13699 [FIX] sale: report: find sales of subcategories
When searching for sales of a specific category,
display the products of the whole category subtree.
Consistent with:
* 633df8dc92
* https://github.com/odoo/odoo/blob/8.0/addons/account/report/account_invoice_report_view.xml#L72

Closes #4631
2015-10-12 15:43:36 +02:00
Alexis de Lattre bc3666aed5 [FIX] point_of_sale: redundance in report.pos.order search view
Avoid double entry in search filters of POS reporting.
Replace by 2 other usefull filters.

Closes #4600
2015-10-12 15:38:28 +02:00
Damien Bouvy 156b33c89a [IMP] website_quote: prevent double clicking on the confirm button
Double clicking on the confirm button was actually possible and could confirm the orders multiple times (which could be problematic if some action are linked to the so confirmation)
2015-10-12 14:39:41 +02:00
Damien Bouvy 486cd33091 [FIX] website_quote: prevent modifying the quote state if it's already been processed
Before this fix, it was possible to validate then cancel a quote (or the other way around) simply by using two tabs in your browser. From now on, we only validate/cancel a quote if it's the 'sent' state and advise the customer of the situation if he tries to abuse the process.
2015-10-12 10:43:46 +02:00
Humberto Arocha 81418ec14e [FIX] stock_landed_costs: avoid useless multiple writes
Initialise quant_dict inside for loop as doing outside loops
renders to be a quadratic write of quant object due to the fact that
previous quants are kept each time a new valuation line is read.
In case of posting a Landed Cost record with a huge amount of cost_lines
and huge amount of stock_move having several quants would result in a
extra overhead.

Closes #9005
2015-10-12 10:40:26 +02:00
eLBati c9d5117a2d [FIX] l10n_it: account types.
Without this, balance sheet and profit & loss do not display parent accounts

Closes #8925
2015-10-12 09:53:01 +02:00
Odoo Translation Bot 5dd33e8ca6 [I18N] Update translation terms from Transifex 2015-10-11 03:04:31 +02:00
Christophe Simonis c4844675b8 [MERGE] forward port of branch saas-3 up to a6b11a1 2015-10-10 14:35:44 +02:00
Christophe Simonis a6b11a151e [MERGE] forward port of branch 7.0 up to f8b56e4 2015-10-10 14:25:35 +02:00
Xavier Morel 14d7e20def [FIX] project: don't copy remaining hours when duplicating tasks
Since we're not duplicating work items when duplicating tasks during
project duplication, it doesn't make sense to duplicate the
likely correspondingly adjusted remaining hour.

Behave as if the planned hours had just been set/reset and set the
remaining hours of the new task to that instead.

fixes #8985
2015-10-09 18:57:46 +02:00
Joren Van Onder 617ba72a9d [IMP] point_of_sale: add remote debugging capabilities to the posbox
Sometimes it's useful to ssh into a posbox to quickly troubleshoot an
issue. Talking customers through port forwarding is very difficult
however. We use ngrok to solve this issue.

This implements an interface that allows a user to enter an ngrok
authentication token. After this, ngrok can be started and we should be
able to remotely connect.

Note that ngrok does NOT run by default on the posbox. It can only be
started manually by the user.
2015-10-09 09:38:09 +02:00
Joren Van Onder 3726612735 [FIX] point_of_sale: rm with -f does not return non-zero 2015-10-09 09:38:09 +02:00
Joren Van Onder b25af944a1 [FIX] point_of_sale: remove raspi-config message on posbox
Every time the posbox boots it would say something like:

This raspberry pi is not configured, please run raspi-config

Which is a leftover from the original raspbian image. Raspi-config is
removed on the posbox because we don't need it.
2015-10-09 09:38:09 +02:00
Joren Van Onder 546a1d4a32 [IMP] point_of_sale: support Wi-Fi on the posbox
This allows people to connect the posbox to networks using a wireless
network adapter.

When plugging in a USB Wi-Fi adapter and no network cable, the posbox
will boot and host its own Access Point called "Posbox". Users can
connect their device to this network and can then connect to the posbox
the usual way.

An interface for has been provided that also allows users to instruct
the posbox to connect to a different Wi-Fi network. This is useful when
the client is not running Odoo locally.

It is also possible to make this configuration persistent. With a
persistent Wi-Fi network configuration, the posbox will always try to
connect to the specified network after a reboot.

Attempts have been made to make the Wi-Fi connection as robust as
possible. Upon connection loss, the posbox will automatically attempt to
reconnect.
2015-10-09 09:38:09 +02:00
Alexandre Fayolle a0a4ec6374 [FIX] hr: fix hr.department name_get
hr.department name_get would crash when called with a single id.

Closes #8459
2015-10-09 09:29:38 +02:00
tv-openbig 1423cef6fc [IMP] l10n_de: better defaults values for digits and taxes of l10n_de
The current default values leads to standard proposals of 6 digits
account numbers and in many cases wrong default tax settings. The fix
prevents most users to apply manually the right settings of digits and
default taxes.

Closes #8837
2015-10-08 16:50:38 +02:00
JoshuaJan 7aaffedd21 [FIX] crm: merge opportunities for stages in 'both' type
A crm.lead will either be a lead or an opportunity but a stage can also have
the 'both' type so it should be matched in the domain.

Closes #8434
2015-10-08 13:58:09 +02:00
Mack f8b56e4f40 [FIX] hr_payroll: total_wage return format
Field removed in 9.0 at 04cebbd (because useless). This avoids an error if read.
cf #8781
2015-10-08 12:20:29 +02:00
Joren Van Onder f008240411 [FIX] hw_escpos: certain Epson printers do not identify as a printer
We search for USB devices that identify as a printer through their
DeviceClass or one of their InterfaceClasses. The issue is a lot of
printers use vendor-specific Device/InterfaceClasses.

Apparently the Epson TM-T88IV is one of those devices. So in order to
work around this, we now first look for a USB device that identifies as
a printer. If those do not exist, we pick the first Epson device, if
those do not exist we pick the first Star device.

Perhaps we should instead start using some kind of probe-based approach
to identify ESC/POS compatible devices.
2015-10-07 13:03:46 +02:00
bramsi 979d23ad8c [FIX] mrp: name_search where args is not defined
In case of name_search with no args (default None, see #8492 for example of
valid scenario, during import)
Construct the domain correcty.

Fixes #8492
2015-10-07 12:50:32 +02:00
Wolfgang Taferner 29d28b05e4 [FIX] account_check_writing: modify voucher amount without company
The code used the key vals['company_id'] while it was not checked it was present
in the write call (and it should not necessary).
If a key is not present, browse the record instead.

Fixes #8906
2015-10-07 12:14:30 +02:00
Martin Trigaux 096fe8a05c [FIX] project: restrict access to dashboard only to project users
Users not belonging to the project user group can not access the model
project.task.history.cumulative
Hide the dashboard for them

Fixes #8606
Closes #8607
2015-10-07 11:19:58 +02:00
Carlos Almeida 48eb1f6df7 [FIX] l10n_br: specify accounts that can be used to reconcile
Fixes #8902
In order for the payment wizard to work, the accounts in invoice header, account_id, should have reconcile=True.
In l10n_br the accounts are, amongst others, "Clientes" and "Fornecedores", a the chart of account should make them by default as reconciliable.
2015-10-07 09:15:21 +02:00
Danimar Ribeiro 18ae91ea92 [FIX] mass_mailing: Check if bounce_alias is not None
If the parameter mail.bounce.alias is not found
2015-10-06 16:11:45 +02:00
David Monjoie 6b6d7310c0 [FIX] website_sale: sale_get_order force_create
Previously, if there was a sale_order_id but it was wrong,
like when the sale order was deleted for example, the function
didn't return a sale order, even with force_create=True.

It used to pass the first 'if' as sale_order_id had a value, so
no new sale order was created. However, as sometimes the id was
referring to a non-existant sale_order, a sale_order.exists() test
was used later, resulting in the function sometimes returning None,
even with force_create = True.

Proposed solution is to test the existence of the browse record with
the given id earlier, instead of testing the existence of the id itself.
2015-10-06 10:59:46 +02:00
Nicolas Mac Rouillon 4400da6ca4 [FIX] project_issue_sheet: restrict inherited view access
The field timesheet_ids (hr.analytic.timesheet) and analytic_account_id
(account.analytic.account) should not be accessible by the portal user.

Fixes #8338
Closes #8354
2015-10-06 09:24:53 +02:00
Goffin Simon 25634df8f2 [FIX] crm: meeting from a logged phone call
The user creating the event should be by default in the attendees (to see the event
he just created in his calendar) and the contact on the logged call
should also be in the attendees by default.

opw:650556
2015-10-05 15:30:46 +02:00
Antonio Espinosa 91d54a0d7d [FIX] website: google_map_link zoom was forced to '10'
Use the parameter zoom as in `google_map_img`
Change the default value to 10 to avoid changing the behaviour for existing
links (zoom was not used anyway).

Closes #8318
2015-10-05 10:24:30 +02:00
Odoo Translation Bot 57b993ffad [I18N] Update translation terms from Transifex 2015-10-04 01:59:01 +02:00
Martin Trigaux 35b9ff7146 [FIX] auth_signup: do not send email to duplicated user
When duplicating a user, an email was sent to a user at the email of the
previous user (as the create is called before changing the email).

Closes #8754
2015-10-02 16:32:55 +02:00
luc-demeyer 66ce0ac970 [FIX] account: name_search for multilang CoA
The `account.account` `name` can be translated
as soon as `l10n_multilang` is installed.

Not passing the context in the calls to
the `search` method prevented to search
on the translations of this name.

Closes #4511
2015-10-02 11:00:04 +02:00
Jairo Llopis 90968dec1c [FIX] mass_mailing: filter on recipient
When selecting the contacts to recieve a massmailing, restrict to the ones
available for mass-mailing to be consistent with the menu 'Mailing List
Subscribers'

Fix #8463
2015-10-01 16:53:39 +02:00
Humberto Arocha 432d6585c9 [FIX] Landed Cost: When Creating Negative costs with more than one picking line fixes #8714
check_sum fails as whole cost from cost_lines field are
fully allocated to first item in picking.
2015-10-01 16:47:18 +02:00
Emanuel Cino 34ce3e36e1 [FIX] account: reconciliation domain
During reconciliation wizard, the wizard tries to find the best match with
exisiting unreconciled lines.
When more than one line could be reconciled with the bank statement line, the
oldest line was not selected.
e.g.
- statemement line: 10€
- invoice 1: 10€
- invoice 2: 10€
- invoice 3: 5€

The statement line was reconciled with the 5€ invoice instead of the first one.
This was due to the domain not matching when the exact same amount was found.

Sign CLA for compassionCH

Closes #8767
2015-10-01 16:35:09 +02:00
Nicolas Martinelli acb55e321d [FIX] mail: reload only in log after composer
Commit e0c1f54fd7 was supposed to prevent the message fetch in the
inbox view. However, self.is_log refers to the type of message: internal
note or message. This properly checks if the page displayed is the inbox
view before fetching the messages.

Related to #7596
opw-650208
2015-10-01 15:34:58 +02:00
Goffin Simon 2b13234661 [FIX] mrp_operarations: str time comparaison
Format error when comparing str time

opw:648349
2015-10-01 15:05:47 +02:00
Goffin Simon cf87d9b5a3 [FIX] website_sale, website_sale_options: product_variant_ids in website_sale.modal
To show the website_sale.modal, the product_variant_ids must be in the DOM
because all the prices are computed with the product_variant_ids.
From commit 0ff26cf

opw:650167
2015-10-01 09:25:51 +02:00
Odoo Translation Bot 78450f2769 [I18N] Update translation terms from Transifex 2015-10-01 00:32:02 +02:00
Stéphane Bidoul e11490c3a1 [FIX] account: Analytic account domain in reconcile with writeoff wizard
The domain for the analytic account in the `reconcile with writeoff` wizard
should be based on the `type` field, which must be `view`,
not on the `parent_id` field, as it's done everywhere else
(e.g. in the supplier invoice form).

`[('parent_id', '!=', False)]`
and
`[('type', '!=', 'view')]`
is almost the same, but the second domain is more appropriate.

Closes #4562
2015-09-30 16:22:05 +02:00
Denis Ledoux 4c901f8ac6 [FIX] sale: use default_get to define the invoice journal
When creating the invoice of a sales order, from the sales order
(`Create invoice` button on the sale order),
the journal used for the invoice was forced
with a specific domain. Besides, the only reason the journal
is forced is to check there is a sale journal for the
quotation company, and raise a warning if not.
This check was added in 1578c2858d.

This prevented to use the user defined defaults,
(`Set defaults` in the `debug` menu)
to set a different default journal per user.

Using the `default_get` instead solves this issue,
as it uses first the user defined defaults. Besides,
if no user defined defaults are set, it then uses
the default value set in the field definition, which
in this case returns the same journal then the forced
domain mentioned above, the domain used being the same.

There is therefore no change of behavior, while giving
the possibility to use the user defined defaults.

Fixes #8786
2015-09-30 15:59:54 +02:00
Miku Laitinen 9a3b711989 [FIX] payment_transfer: 'Wire Transfer' provider translatable
Closes #8398
2015-09-30 15:21:20 +02:00
Laetitia Gangloff f9859c510c [FIX] stock: compute stock valuation with right quantity
`qty` is the quantity in the product default uom.

`move.price_unit` is the price unit of the product
in this move, for the specific uom of this move.
The quantity to use is therefore the quantity
in the move uom, `move.product_qty`

Closes #4555
2015-09-30 14:47:53 +02:00
Goffin Simon 48ccb19937 [FIX] sale: currency in report sale analysis
In Sale Report Analysis, the price total must be in the currency
of the company.
Introduced by b5c1cb4298
opw:649781
2015-09-29 16:43:47 +02:00
Stefan Rijnhart 0333e4da02 [FIX] product: default category on UoM quick creation
This revision adds the possibility to use the key
`default_category_id` in the context to set
the UoM category when quick creating a new UoM,
like it's the case everywhere else with the
`default_*` keys passed in the context.

Closes #4407
2015-09-29 16:24:22 +02:00
Jairo Llopis 68eaeb684d [ADD] crm: test user notification
Test if the user gets notified for incoming contact requests.
2015-09-29 15:27:46 +02:00
Jairo Llopis ffa28488be [FIX] mail: subscribe to threads before sending first message
Users subscribed to creation of records (new leads in a sales team, new
tasks in a project, etc.) are never notified. The reason is that users
were subscribed after the record creation notification.

Introduced in 43915a8721
Closes #8723
2015-09-29 15:27:46 +02:00
Denis Ledoux 25d8955e98 [FIX] payment: make the payment.acquirer name translatable
To allow to translate "Wire transfer" in the ecommerce.

opw-650450
2015-09-29 15:09:23 +02:00
Denis Ledoux 2d3e9d21a7 [FIX] website_sale: ensure payment transaction is for current order
When ordering on the ecommerce,
if a payment transaction was found in the session,
this transaction was used as transaction for the current order.

Nevertheless, if the transction is no longer linked to
the current order, we should not use it.

This happened, for example, when the quotation
was deleted while the customer/user didn't close
its browser, and the transaction id was therefore
still in its session.

opw-650417
2015-09-29 12:10:04 +02:00
Jos De Graeve c88f0d926c [FIX] sale: company filtered taxes for fix_tax_included_price
This revision is related to:
 - 503820acb6
 - 3b02e3d63d

The taxes used to define the price must be the product taxes
of the company of the order.

Closes #8759
2015-09-29 10:40:33 +02:00
Goffin Simon 06fbf3a572 [FIX] website_quote: price unit for suggested products
In a SO, the unit price of the suggested products must be computed with
the pricelist linked to this SO. Inspired from function 'product_id_change'
in model 'sale.order.line'.

opw:650168
2015-09-29 09:59:53 +02:00
Nicolas Martinelli e11f50599d [FIX] web_graph: duplicates header in pivot
For report with duplicated named headers, several columns could get
squashed together.

This fix check if a value is a duplicate or not, and if it is a
duplicates postfix an number allowing to differentiate the two headers
(for the human and the javascript).

This is the exact same solution than #6722
Backport of 5cff8fbb7c70a372cb5116c2fb98fd622c4d4358
opw-650000
2015-09-29 08:33:36 +02:00
Denis Ledoux fa17b86a9f [FIX] project: multi-company security rules in Tasks Analysis
This change avoid to display the tasks
that a user is not permitted to see
in the reporting view 'Task analysis'

Closes #4399

Courtesy of jkei
https://github.com/jkei
2015-09-28 15:58:15 +02:00
Arnaud Pineux 44bfb2bf44 [FIX] base_import_module: special chars in error messages
use ustr() instead of str() to avoid traceback with translations

Closes #4272
2015-09-28 15:21:24 +02:00
Stefan Rijnhart 5f79cbd029 [FIX] mrp: display lot_id in production wizard if full tracking
Show lot_id on production wizard
if product is fully tracked
(but not marked specifically for production tracking

Closes #4223
2015-09-28 14:19:57 +02:00
Xavier Morel a2388c762e [FIX] gamification: incorrect format breaking challenge acceptation
Reported by @yelizariev

closes #8737
2015-09-28 11:37:46 +02:00
Odoo Translation Bot c764b703ca [I18N] Update translation terms from Transifex 2015-09-27 01:58:59 +02:00
Christophe Simonis 7d68fa0ee6 [MERGE] forward port of branch saas-3 up to 504a04c 2015-09-25 15:03:12 +02:00
Christophe Simonis 504a04c823 [MERGE] forward port of branch 7.0 up to 117b636 2015-09-25 14:56:58 +02:00
Christophe Simonis 117b636d3f [FIX] mail: catch database errors when sending mails 2015-09-25 14:43:00 +02:00
Alexis de Lattre fc11b58239 [FIX] stock: service lines duplication when grouping DO invoices
This is possible that changes happen
during the loop in the multiple pickings:
an update in a picking could update another
picking. The browse must therefore be done
inside the loop to update the pickings with
the latest changes.

Fixes #4201
2015-09-25 12:25:52 +02:00
Pierre Verkest be33912a25 [FIX] report_webkit: get webkit path as SUPERUSER_ID
`ir.config_parameter` is readable by employees only.
It could happen to print a webkit report
as a portal / public user.

Closes #4181
2015-09-24 18:11:42 +02:00
Laetitia Gangloff 34f79f3de7 [FIX] purchase_double_validation: do not update limit on module update
In the module `purchase_double_validation`,
you can change the limit to require a second approval
in the purchase settings.

If the module was updated, the limit was re-set to
its default value.

Closes #4183
2015-09-24 17:59:52 +02:00
Denis Ledoux d24ff706a9 [FIX] account_followup: check_description constraint must take into account the translation
When adding a `%` in the followup letter content,
the constraint checking there is no syntax error
is supposed to raise a warning, telling '%' must
be set as `%%` when you want to display this percentage
char.

This constraint did not take into account the translation,
so when being in another language (e.g. French),
and adding a `%`, the warning was not raised, while
it should have been.

Closes #8680
2015-09-24 17:28:00 +02:00
Laetitia Gangloff 273114204f [FIX] note: `Use fancy note` was re-checked on update
Set security group as not updatable. To be able to not use fancy note

Closes #4178
2015-09-24 16:41:10 +02:00
Goffin Simon ddd2a3e97c [FIX] account: prepare_move_lines_for_reconciliation_widget
In the case where target_currency == company_currency, the actual_debit or the
actual_credit must be equal to the amount_residual defined on the account.move.line
and expressed in the currency of the company. The actual_debit/actual_credit must
take into account the possible partial reconciliations and this is done by the
residual amount.

opw:648744
2015-09-24 12:54:49 +02:00
Christophe Simonis 0cddf87a77 [FIX] {website_,}membership: membership should start the same day of the invoice 2015-09-23 17:15:01 +02:00
Denis Ledoux b1bd0c6cfa [FIX] account_cancel: allow cancel of whole bank statement
This revision is related to 6f355623f0.

The above revision had as goal to not allow the partial cancellation
(line per line) of a confirmed bank statement, as it would
prevent the ability to reconcile the statement, as reconcilling
a confirmed statement it not possible.

Nevertheless, cancelling the whole bank statement should be allowed
(using the `Cancel Statement` button), as this cancel all lines
and re-set the statement in draft.

opw-649864
fixes #8568
2015-09-23 15:38:04 +02:00
Martin Trigaux 19f9328d0b [IMP] l10n_cr: outdated URL
Costa Rica localisation team has moved to GitHub
cf #8651
2015-09-23 14:46:42 +02:00
Goffin Simon bdcae86d67 [FIX] purchase: invoiced purchase order line
When invoice_method == 'picking', a po line is invoiced if all the lines
linked to the po line are in invoices with state not in ['draft', 'cancel'].
To keep the same logic than before commit 9b1ab76.

opw:649746
2015-09-23 14:42:23 +02:00
Martin Trigaux 9e53f04332 [FIX] l10n_hu: missing flag 2015-09-23 10:46:59 +02:00
Christophe Simonis d05ee26a72 [MERGE] forward port of branch saas-3 up to 24bcdb7 2015-09-22 15:40:28 +02:00
Christophe Simonis 24bcdb75fb [MERGE] forward port of branch 7.0 up to c2aff47 2015-09-22 15:30:22 +02:00
Goffin Simon 1bcc5b5797 X] hr_evaluation: _rec_name
To avoid warning when making a name_search on "hr_evaluation.evaluation".
2015-09-22 13:40:26 +02:00
Goffin Simon 14b060ed71 [FIX] purchase: journal_id in auto procurement
The journal_id used in a purchase.order created in auto procurement
(by the function make_po) must be the journal_id of the company_id
set on the procurement. The company_id set on the procurement is
the company_id set on the SO (function _prepare_order_line_procurement).

When creating the PO in function make_po, the company_id must be set in the
context to use the right journal_id with the function _get_journal in
"purchase.order" model.

opw:648600
2015-09-22 13:34:45 +02:00
eLBati 16fda32a0e [FIX] l10n_it: tax code for Iva al 10% indetraibile
The tax code of `Iva al 10% indetraibile (D)`
is `template_ivacode_pagata_10ind`, like its
sibbling `Iva al 10% indetraibile (I)`.

The fact it wasn't is due to a typo.

Something similar is done with the taxes
`Iva al 20% indetraibile (D)`
and
`Iva al 20% indetraibile (I)`
with the tax code `template_ivacode_pagata_20ind`

opw-649557
Closes #8047
2015-09-21 17:35:01 +02:00
Ruchir Shukla 61300ee7f1 [FIX] stock_landed_costs: modify quants as admin
Nobody has write access to stock.quants so only the admin was able to execute
this method.
Fix it by using SUPERUSER_ID
Closes #8544
2015-09-21 16:40:34 +02:00
Denis Ledoux aabbdc7339 [FIX] web: Safari, download of attachments with accents
The structure `filename*=UTF-8` works in Safari, from
release 6.2 (which is set as version 537 in the user_agent version).

This structure has the advantage to handle the UTF-8 encoding,
and therefore special characters, such as accents.

Therefore, from this Safari release, we use the same format
than other browser. For older releases, we use the format
`filename=`, without UTF-8, ASCII encoded, replacing
special characters by `?`.

opw-649863
2015-09-21 15:30:05 +02:00
Adrien Peiffer (ACSONE) 0b4bd7a6d1 [FIX] mail: allow to delete mail alias all employees
It was allowed for all employees to read, create and edit
mail aliases. Only the deletion was prevented.
Nevertheless, giving the possibility to rename a mail alias
is allmost seen as a deletion, as you can rename it to something
that just won't be used anymore. Therefore, we can consider
to give any employees the rights to delete mail aliases.

Besides, not allowing the unlink leads to issues when the
mail alias is associated to a record the user wants to delete.
He was able to create the record, and its mail aliases, but
he could not remove the record, as he was not allowed to remove
the mail alias.
For instance, an HR officer was able to create a job position,
with its mail alias, but couldn't remove the job position he created.

Closes #8466
2015-09-21 14:26:37 +02:00
Wolfgang Taferner 4f41c3327c [FIX] website_sale: make checkout fields customizable
[FIX] Valuable checkout hooks for website_sale
[FIX] Values might need to be changed for different field mappings
[FIX] Make definition of form fields inheritable within a function
[FIX] Make shipping_info values available for inherited module manipulation

Close #8490
2015-09-18 21:17:51 +02:00
Olivier Dony dbddc8246a [FIX] payment_ogone: move debug logging to the level it belongs to (may include sensitive data) 2015-09-18 19:52:26 +02:00
Olivier Dony 0f06e5f54f [FIX] tests: outdated resource paths in manual test files 2015-09-18 15:52:11 +02:00
Goffin Simon 75233860a2 [FIX] event: confirmation_event and confirmation_registration
-The lang of the partner linked to the "event_registration" record
must be used to send the registration/confirmation email.

-strftime cannot be used on a string.

opw:649510
2015-09-18 10:17:02 +02:00
Nicolas Lempereur 3c39b62bce [FIX] website: escaping and external iframe
jQuery has a special behaviour when using .contents() over an iframe
object. This caused an error for escaping when saving the page with an
iframe content of an external domain.

introduced by 8c77c711
opw-649570
2015-09-18 09:41:32 +02:00