Commit Graph

93384 Commits

Author SHA1 Message Date
Olivier Dony 8d745f9f50 [FIX] account, mail, etc.: uniformize evaluated expressions
opw-626694
2015-05-21 15:26:35 +02:00
Olivier Dony ebb5ddcd65 [I18N] Sync latest translations from Launchpad (not the final one) 2015-05-21 14:42:20 +02:00
Christophe Simonis 327e471c9b [MERGE] forward port of branch saas-3 up to b62ee07 2015-05-21 14:19:24 +02:00
Christophe Simonis b62ee0734c [MERGE] forward port of branch 7.0 up to eaaca65 2015-05-21 14:11:39 +02:00
Martin Trigaux 02b8be4a8b [FIX] mrp: restore removed method _check_phantom_bom
Was removed at 5b479e6 as no longer used (and was a wrongly used there as dit not
check if a "normal" BoM has an higher sequence).
However for stablility reason, we do not remove methods in version 8.0 (if was
used in community).
Will be removed in master.
2015-05-21 14:00:09 +02:00
Christophe Simonis 8a430c4a23 [FIX] base: ir.http: only server_attachement for 404 errors
fixes #6792
2015-05-21 13:46:38 +02:00
Christophe Simonis 1cf5723835 Revert "Revert "[FIX] fields: `digits()` computation""
Thamks to parent commit, `request.env` doesn't raise `AttributeError`
anymore for requests without session bound to a database.

This exception was bubbling up to `digits` property (and `__getattr__`)

This reverts commit 49cb46fb78.
This reinstate commit eeedd2d9f5.
2015-05-21 13:13:23 +02:00
Christophe Simonis 291119c802 [FIX] http: `request.env` and request.cr` now raise `RuntimeError`.
These method used to raise an `AttributeError` when `self.registry`
returns `None`. Now raises a more appropriated exception.
2015-05-21 13:13:23 +02:00
Colin Newell 6e54c8d17a [FIX] web: avoid marking session as modified every time
The `rotate` flag introduced by 31d817e849
was initialized at the very end of the session init, after
the reset of the `modified` flag.
This had the side-effect of marking the session as modified
for every request, saving the session to disk every time
even without any change.

Closes #6795
2015-05-21 12:52:54 +02:00
Nicolas Martinelli eaaca65594 [FIX] mail: does not write "False" if mail body is empty
opw-640309
2015-05-21 12:22:50 +02:00
Samuel Lefever f57f8c87ab [FIX] website : reset lang variable in template
In website template,
it was not possible to use the variable "lang",
containing the current language,
as the variable was overwrote in website.layout,
in a loop context.

Changing the variable name used by the loop
solves the issue.

opw-639488
closes #6320
2015-05-21 11:44:45 +02:00
Samuel Lefever e2db33a5d4 [ADD] CLA for samuellefever 2015-05-21 11:44:45 +02:00
David Béal 245b5afcfd [FIX] base_import: prioritise field name over string
When importing csv data, the column name is matched on the field name and string
attribute. For some fields (e.g. name & display_name), you could get a match on
both the string and technical field name for different fields
The order of the fields is not deterministic as stored in a dictionnary so
different results were possible at different import.
The technical name should be prioritised (more stable, unique constraint).

Fixes #6657
2015-05-21 10:48:31 +02:00
Goffin Simon 2c0529858f [FIX] point_of_sale: float format
The POS must adapt the float format according to
the language of the user. Inspired from 1da5d89ba3

opw:639567
2015-05-21 10:24:50 +02:00
xmo-odoo 6de6662ecb Merge pull request #6789 from savoirfairelinux/7.0-fix_account_move_line_exception_translation
[FIX] incorrect translation marking
2015-05-21 10:14:40 +02:00
Goffin Simon 5a10903e9b [FIX] point_of_sale: float format
The POS must adapt the float format according to
the language of the user. Inspired from 1da5d89ba3

opw:639567
2015-05-21 09:02:13 +02:00
Denis Ledoux 49cb46fb78 Revert "[FIX] fields: `digits()` computation"
This reverts commit eeedd2d9f5.

This revision introduces an issue more serious than the ones
it fixes. This is no longer possible to receive an email
aimed a sale.order thread with catchall.

To reproduce the issue:
 - Create a new sale order
 - Send a message in the thread to the customer
 - Reply to the mail received in the customer mailbox
 - Traceback, AttributeError: digits

 opw-640370
2015-05-20 19:13:04 +02:00
Joao Alfredo Gama Batista 2e123fbb85 [FIX] Fix exception translation 2015-05-20 11:22:25 -04:00
Nicolas Martinelli ba896aabe7 [FIX] stock: if cost_method of a product is 'average' do not round the currency conversion
This prevents rounding errors if product decimal precision is different from
currency precision.

Fixes #6547
opw-634390

Do not fowardport since already done in v8.0:
https://github.com/odoo/odoo/blob/8.0/addons/stock_account/stock_account.py#L310
2015-05-20 17:00:37 +02:00
Nicolas Martinelli 9c6ae3cf6c [FIX] mrp_operations: adapt the date_planned of the WO when date_planned of MO is changed
Changing the scheduled date (date_planned) of the MO triggers a computation
of the scheduled date of the associated WO in order to keep the data
consistent.

Fixes #6694
opw-639771
2015-05-20 16:57:09 +02:00
Denis Ledoux 7d69759e73 [FIX] calendar: display event reminders
This issue is related to 4f03a6224d.

The above revision aimed to not fetch uselessly fields values

The thing is, `partner_id` of `get_next_potential_limit_alarm` method
expects a partner id, while partner['id'] is actually a user id.

The `partner_id` of the user must be taken, not the user id itself.
2015-05-20 15:49:36 +02:00
Denis Ledoux 54a90179bb [FIX] expression: ensure tuple to compare leaf with TRUE/FALSE leaf
When setting a custom filter with as domain
[(0, '=', 1)]

the domain was rejected, because (0, '=', 1) wasn't
considered as a valid leaf, while it is.

This is because the Javascript converts this domain
using list instead of tuple
[(0, '=', 1)] -> [[0, '=', 1]]

And therefore, comparing the "list" leaf
to the TRUE/FALSE leaf tuple failed.

Ensuring "element" as a tuple solves the issue.

opw-640306
2015-05-20 15:33:35 +02:00
Nicolas Lempereur 4e8f84053d [FIX] pos_restaurant: changed unit caused issue on splitting
Commit 0fd51c2e6 changed the unit rounding from units from 1 to 0.001,
it was done mainly because it's the default unit and in the interface we
see quantities with 3 decimals after the floating point, so people might
expect to be able to set floating point quantities.

This change caused an issue when splitting a bill in the pos restaurant,
instead of a click being a piece of the product, it was 0.001 part of a
product.

This fix overrides the rounding of units in this case.

closes #6780
opw-639865
2015-05-20 14:25:24 +02:00
Denis Ledoux 75aa699f62 [MERGE] forward port of branch saas-3 up to 6026c2f 2015-05-20 13:41:03 +02:00
Denis Ledoux 6026c2f4d0 [MERGE] forward port of branch 7.0 up to cc61d46 2015-05-20 13:39:39 +02:00
Thomas Groutars 7b306fc17a [IMP] stock: improve detailed transfer performance
Transfers were slowed because of the continuous
computation of pickings remaining quantities.

This revision delay the computation at the end of the transfer,
so the computation is performed only once, and it
therefore leads to a huge performance improvment.

opw-634416
2015-05-20 13:07:24 +02:00
Denis Ledoux 453b373a68 [FIX] report: datetime already imported, differently
This rev. is related to 439cdb6871.

The module datetime was already available in the reports,
and it was the entire datetime module that was imported,
not just the class.

This rev. is not recompatible with 439cdb6871,
but there is no other choice, since other existing
reports might already expected the datetime module
and not the class

opw-640299
2015-05-20 12:19:29 +02:00
Denis Ledoux db3e5716b3 [FIX] ir_attachment: write traceback to logs when upload fail
When the upload of an attachment failed,
e.g. for access rights reasons,
the traceback wasn't written or returned anywhere,
preventing the easy debugging.

opw-640242
2015-05-20 11:09:05 +02:00
Denis Ledoux ac92551406 [FIX] ir_attachment: hide Attachments > Add/Delete if not write access
To be able to see record attachments, you need to have
read access to the record.

To be able to add or delete attachment, you need to
have write access to the record.

The button add/delete were displayed as soon
as you had the read access, but if you had not the
write access, both buttons failed.

This revision do not display the add/delete
buttons of Attachment dropdown menu if you do not
have the right to add / delete attachments to the record
(you do not have write access to the record)

opw-640242
2015-05-20 11:08:19 +02:00
Nicolas Martinelli 0fcb15c797 [FIX] payment_adyen: wrong error message
opw-640208
2015-05-20 10:17:28 +02:00
Christophe Simonis eeedd2d9f5 [FIX] fields: `digits()` computation
Ensure we always have an valid cursor when determining `digits()`.

fixes #6605, fixes #6650
2015-05-19 19:59:10 +02:00
Goffin Simon cc61d467fa [FIX] purchase: validate invoice
A user that has the rights in Accounting & Finance equal to Invoicing & Payments
must have the right to validate a supplier invoice.

opw:634601
2015-05-19 14:14:07 +02:00
Nicolas Martinelli c0deb1f726 [FIX] sale_stock: check if moves are already done when cancelling a SO
It prevents to cancel a SO for which moves are already done.

opw-634415
2015-05-19 14:12:26 +02:00
Denis Ledoux bac5b87b73 [FIX] calendar: update cron as SUPERUSER.
As regular employees are not allowed to
alter cron activities.

opw-639419
2015-05-19 11:04:30 +02:00
Denis Ledoux f66b7ee62a [MERGE] forward port of branch saas-3 up to 70f2225 2015-05-19 10:28:30 +02:00
Denis Ledoux 70f22254f5 [MERGE] forward port of branch 7.0 up to 335a8af 2015-05-19 10:26:33 +02:00
Nicolas Martinelli 9b2b437df4 [FIX] sale_stock: add check on invoice type during generation of invoice from delivery
If route is set on dropshipping and the PO invoice is generated from picking, the unit price
used in the supplier invoice must be the cost price. In this particular configuration, this was
not the case because the unit price was replaced by the sale price.

opw-634898
2015-05-19 09:48:51 +02:00
Goffin Simon c5a613840f [FIX] point of sale: function is_paid:
When rounding globally, the function compute_all in charge to compute the taxes for
each line uses a very high currency rounding to avoid rounding per line.
The round must be done on the sum of each total amount line with taxes. To validate a payment with the pos,
the function is_paid verified that this sum is the same that the amount just paid.
Inspired from "sale.order.line", the precision of 'price_unit' and 'price_subtotal' in "pos.order.line"
must be taken from 'Product Price' to avoid rounding per line.

ps: we could not use the function get_all_prices to round globally because it used on every line.

Fixes #6681
Closes #6682
opw:639686
2015-05-19 09:41:51 +02:00
Nicolas Lempereur 6d25a1a18a [FIX] google_calendar: sync date on event date change
Set the record update time when the date is changed via another view
than calendar view. So when an synchronization is done, the update is
taken into account when updating calendar from the odoo to google.

closes #6752
opw-634674
2015-05-19 09:37:28 +02:00
Goffin Simon 6e06318828 [FIX] base: value = 0 for record ir_property
When a record is created with a field property of type integer or float equal to 0, there is
no record created in ir_property for this field. Then for a search of a record with this type of
field equal to 0, it must match all the records that have no corresponding property in the table
"ir.property" for this field.

ps: in 7.0, the function search_multi doesn't exist and the bug linked to cost price
doesn't happen because it's a float field.

opw:639746
2015-05-19 09:30:53 +02:00
Coin Newell a6cba47cd7 [CLA] Colin Newell 2015-05-19 01:45:46 +02:00
Coin Newell 31d817e849 [FIX] web: rotate session identifiers after login/logout
As recommended by OWASP
https://www.owasp.org/index.php/Session_Management_Cheat_Sheet#Renew_the_Session_ID_After_Any_Privilege_Level_Change

Closes #6760
2015-05-19 01:45:46 +02:00
Olivier Dony d5aa22ea5f [FIX] website, website_report: backwards compatibility with outdated templates
* Complements commits a696913364 and
21d4b3fda9 by adding the missing `data-lang`
attribute also in the report layout (in saas-6 a single QWeb
template is used for language links in both reports and website
layouts).

* Fix the "Edit Master" link to work also for outdated templates
where the data-lang attribute is dynamically set to 'default',
and thus cannot be used as URL prefix -> use /website/lang
controller to switch lang instead.
2015-05-18 19:34:11 +02:00
Denis Ledoux 235cd2d015 [FIX] mrp: find company bom when MO created from procurement through cron
Manufacturing Orders can be created from procurements,
as SUPERUSER_ID, since the procurements can be processed
through the WH scheduler, which is always ran as SUPERUSER_ID

In such a case, the record rules are ignored, and a BOM
normally not accessible to a user thanks to the multi-company
record rule could be chosen as the BOM of the MO.

This revision forces to find a BOM from a specific company
in such a case.

opw-640120
2015-05-18 17:20:31 +02:00
Christophe Simonis f722254018 [MERGE] forward port of branch saas-3 up to 0f5b6cf 2015-05-18 17:13:50 +02:00
Christophe Simonis 0f5b6cf60b [MERGE] forward port of branch 7.0 up to c435b84 2015-05-18 17:13:18 +02:00
Jeremy Kersten 30013c57ba [TYPO] website: add semicolon
Thanks @sle-odoo
2015-05-18 16:18:28 +02:00
Jeremy Kersten 21d4b3fda9 [FIX] website: force default lang for edit master option
Since user is redirected automatically in his preferred language, the button edit_master redirect always to
the current lang and so not the master.
2015-05-18 15:53:34 +02:00
Goffin Simon 1c90b9049b [FIX] website_sale_option: update product qty
When there is no user logged in the website, the product id must be written
in the DOM.

opw: 634535
2015-05-18 14:56:56 +02:00
Nicolas Martinelli 335a8afe79 [FIX] stock: remove state modifiers for field note in stock.picking
Remove the state modifiers for field note in stock.picking in order to have a
behavior which is consistent with sales orders or invoices.

opw-639956
2015-05-18 14:52:06 +02:00