Commit Graph

94398 Commits

Author SHA1 Message Date
Jairo Llopis 4eab4d7868 [DOC] reports: clarification about styles
* correct xpath to add style in report.styles
* informations about style troubleshoot

closes #9105
2015-11-20 15:21:56 +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
Lionel Sausin 6188bc6e9d [DOC] Add words of caution about `sudo`
Closes #9655
2015-11-20 13:52:36 +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 e99358415a [FIX] tools: ignore unknown entities while parsing 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
Jesús Alan Ramos Rodríguez 881a46a7ce [CLA] update signature to fix the github account
Closes #9202
2015-11-17 17:14:35 +01:00
Jesús Alan Ramos Rodríguez b6cade2c2d [CLA]: Fix typo and add another e-mail to CLA 2015-11-17 17:14:35 +01:00
michaelhwalther 751b6ba25a [CLA] michaelhwalther sign individual CLA
Closes #9013
2015-11-17 17:14:35 +01:00
Khwunchai Jaengsawang 2cdbd9b9bc [CLA] Khwunchai Jaengsawang sign individual CLA
Closes #8810
2015-11-17 17:14:35 +01:00
Alex Comba 0fd91cec1c [CLA] Alex Comba sign individual CLA
Closes #8523
2015-11-17 17:14:35 +01:00
Panagiotis Issaris 462af90df5 [CLA] Panagiotis Issaris sign individual CLA
Closes #8497
2015-11-17 17:14:35 +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
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
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 afae197073 [IMP] base: timezone handling in server actions.
Give access to `pytz.timezone` (as `timezone`) in `ir.actions.server`
records. Usefull when dealing with date(time)s.
2015-11-12 12:23:27 +01:00
Christophe Simonis 5b77f9d39f [FIX] website: pass context as keyword argument when calling method. 2015-11-12 12:09:53 +01:00
Denis Ledoux 56c08e486f [FIX] expression: `child_of` domain with `parent_store` & non-existing parent
In the `product.template` model,
when searching products within a category that doesn't exist,
all products were returned, while none should be returned.

For instance,
In Sales > Products,
In the search input, search with internal category:
"A category that doesn't exist",
all products were returned.

opw-649548
2015-11-10 16:35:55 +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 dd8cbf49ac [MERGE] forward port of branch 7.0 up to d24fcd1 2015-11-06 16:04:21 +01:00
Atchuthan, Sodexis 38868d4991 [CLA] Added sodexis corporate cla 2015-11-06 12:54:55 +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 Lempereur d24fcd1d2e [IMP] base: test for expression distribute_not
Testing the use case of c28a28e, in which distribute_not was refactored
with iteration instead of recursion.
2015-11-05 17:13:55 +01:00
Raphael Collet c28a28e69e [IMP] osv: use iteration for expression negating
The current code when applying negative operator on an expression used
recursion which in extreme case is not best friend with python.

e.g: on instance with a lot of wharehouse, some simple action could lead
to a domain with lot of elements which could easiliy go over the python
maximum recursion limit.

This commit fixes this by replacing recursion with iteration.

We have a stack of negation flags and loop on each token of the domain
as follow :

- when we iterate on a leaf, it consumes the top negation flag,

- after a '!' operator, the top token negation is inversed,

- after an '&' or '|' operator, the top negation flag is duplicated on
  the top of the stack.

closes #9433
opw-653802
2015-11-05 17:13:28 +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
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
Nicolas Mac Rouillon a69205d561 [CLA] Adding one contributor to adhoc cla 2015-11-03 17:41:40 +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