Commit Graph
107816 Commits
Author SHA1 Message Date
Nicolas Martinelli 806989b7b0 [FIX] stock_account: change standard price
When MRP and Product Extended are installed:
- Define a manufactured product with valuation as 'Periodic (manual)'
- On the product form, click on "Compute from BOM"

Several issues:
- The field "Counter-Part Account" is mandatory
- Account moves are posted although the product valuation is 'Periodic
  (manual)'

The problem is that the wizard is originally used for products with
valuation 'Perpetual (automated)', where this behavior makes sense. In
this use case, however, it's an issue.

Making the field not mandatory is not possible without an upgrade of the
module, so this will have to be fixed in master branch. Regarding the
creation of account moves, however, this commit solves it.

opw-697867
2016-12-21 15:38:42 +01:00
Denis Ledoux a98d60cb11 [FIX] website: search pages in the menu creation dialog
The revision
8f48baeda6

broke the ability to search pages in the dialog
allowing to add a menu to the website from the website
(From the website, Content > Edit menu)
as `request.website` was not defined in this case

opw-702020
2016-12-21 14:59:29 +01:00
Jeremy Kersten daa90edc8a Revert "[FIX] base_import: parse format from relation fields."
This reverts commit 8416c2bcfa.

Temporary revert this commit, to have enterprise green again...
Need to replace 'full' args by key in context to don't break override
Need to rewrite account_bank_statement_import_csv from enterprise
2016-12-21 14:37:39 +01:00
Goffin Simon b795d69ce8 [FIX] mail: Modifying followers in multi company
In multi company, some followers of a document could be not
readable for a user who has the rights to modify this document.

If the user has the rights to write on a document, he is allowed
to read and modify the followers of this document.

opw:693536
2016-12-21 13:36:29 +01:00
Martin Trigaux 0b0afc62b1 [FIX] test_translation_import: remove inexistant menu
Introduced at 11812b0
2016-12-21 11:04:49 +01:00
Martin Trigaux 53f6552d08 [FIX] tests: migrate to the new api
Leftover references to cr, uid
2016-12-21 11:01:33 +01:00
Pedro M. Baeza 88a9ee2565 [FIX] mail: customers should not follow default internal subtypes
Currently when someone is added as follow to a document default subtypes
are computed if no specific subtypes are given to the subscription. However
if internal subtypes are set as default those are added to all new
followers. It should take into account customers and shared users and avoid
adding them internal subtypes.

Customers and shared users are not notified of messages using an internal
subtype. So currently there is no information leak. However with this fix
we ensure internal subtypes are not followed by external people even if
no notification is created.

From #14704, backport of 03ac47b9
2016-12-21 10:42:49 +01:00
Goffin Simon f9f4bba2c1 [FIX] mrp: field resource_type in mrp.workcenter form view
The field resource_type must be displayed in mrp.workcenter form view

opw:698183
2016-12-21 10:20:51 +01:00
Goffin Simon a3ee4d1914 [FIX] account: Printing Account Tax
Steps to reproduce:

-open Accounting / Configuration / Taxes / Tax Codes
-open any Tax Code
-press Print / Account Tax

Bug: QWebException: "chart_tax_id" while evaluating
"get_lines(data['form']['based_on'], data['form']['company_id'], data['form']['chart_tax_id'])"

Closes: #8923

opw:697423
2016-12-21 10:05:12 +01:00
Nicolas Lempereur 2fc0ad8e0e [FIX] mail: can't send notification in spanish
Line return are missing before mako declarations  causing errors
when rendering the template.

opw-702070
opw-701959
2016-12-21 10:01:33 +01:00
Raphael Collet 253b1a8251 [FIX] performance: do not prefetch binary and serialized fields by default 2016-12-21 09:22:30 +01:00
Jeremy Kersten e8019a23c2 [FIX] calendar: fix end recurrency date for yearly event
Event with interval > 1 was not correctly computed.
This patch doesn't fix existing event but only the new one created after this fix.

Event 1/1/2015 repeat every 3 months, 6 times
Before this commit : end recurrency = 1/1/2015 + 6 * 1 month
After this commit:   end recurrency = 1/1/2015 + 6 * 1 month * 3 (interval)

This commit closes #14332
2016-12-20 21:12:19 +01:00
Jeremy Kersten 659d68add5 [FIX] calendar: fix retrocompatibility between datetime module
Fix datetime where the return of rrule is sometime a list,
sometime a set according to the datetime version.
list(set) == list(list) and works in both cases.

Similar fix: #9f09c62
2016-12-20 21:12:10 +01:00
Nicolas Martinelli a9a9f624e4 [FIX] purchase: update of PO line
DO NOT FORWARDPORT!!!

An issue occurs when a PO line is updated following a reordering rule or
a MTO rule.
As an example, a product is configured as follow:
- UoM: Units
- Purchase UoM: Box of 25 Units

To reproduce:
- Sell one unit of product, then run the scheduler
  => it creates a procurement for one unit, but since the product is
  purchased by box of 25, it creates a PO with a box of 25.
- Sell one unit of product, then run the scheduler
  => it creates a procurement for one unit, find the existing PO line,
  round in the purchase UoM (so it gives one box of 25), then add it to
  the PO line.

The solution is to recomputed the necessary quantity at the very end of
the process. For a given PO line, list all procurements and adjust the
quantity.

This is a partial fix, since it doesn't take into account the potential
new price of the seller. However, that would require a major rewrite of
this part of the code, since it was originally written for v8 which
handles the PO line quantity recomputation sequentially instead of
batch.

opw-688916
2016-12-20 18:29:16 +01:00
Jeremy Kersten 3f267a5951 [FIX] mail: avoid to send email about assignation to active_domain.
Before this commit, 'select all' into a list view, and use an action that assign
a user_id to all the records will send n² email, because the function send_mail
use active_domain instead of the current record.

Now, we keep mass_mail mode, but simulate the case where we have clicked on
each record one by one and not all the records matching the active_domain.
So we send only one email by record.

How to reproduce:
   create a action server "record.write(dict(user_id=env.user_id))"
   add this action in context menu
   select all records in a list and apply the action server
2016-12-20 17:58:03 +01:00
Jeremy Kersten 8416c2bcfa [FIX] base_import: parse format from relation fields.
Before this commit, the parser (date, datetime, float, monetary, ...) was only
called on field from current model, and not on sub field.

Eg: product_id.price was not parsed as float, because product_id != float

This commit add an overiddable function to get all the parsers: get_parsers

This commit closes #14572
2016-12-20 17:30:54 +01:00
Nicolas Martinelli 13c7865680 [FIX] website_sale: price separator
Complement of commit
https://github.com/odoo/odoo/commit/fee60159640206558e98d5103c8a883412419f5a

On the first load of the product page, the separators are not set
correctly, due to the fact that the RPC call to
`/web/webclient/translations` might not yet be done.
2016-12-20 16:49:39 +01:00
Denis Vermylen (dve) 0c1348345e [FIX] product: return id instead of recordset (bis)
correct 3068afd85a .
2016-12-20 16:30:59 +01:00
Denis Vermylen (dve) 3068afd85a [FIX] product: return id instead of recordset
_get_partner_pricelist could return both a recordset or an ID.
While the ORM handles both where the method is called, a migration script
relies on an ID being returned.
( migrations/sale_contract/9.saas~13.1.1/pre-models.py", line 24 )

This commit ensures an ID is being returned every time.
2016-12-20 16:03:14 +01:00
Goffin Simon 660d2e0c75 [FIX] account: _create_writeoff with excluded taxes
The amount (=credit - debit) of the first line must be equal to the total included
to reconcile balanced entries.

Before the fix, it just worked with included taxes because the amount of
the first line was already equal to the total included.
But with excluded taxes, it didn't work because in this case the amount was equal
to the total excluded. Then it raised: "Cannot create unbalanced journal entry"
due to the second line which includes all the taxes.

opw:697129
2016-12-20 15:44:25 +01:00
David Tran 8a589ac143 [FIX] l10n_vn: wrong account code
account 343112 should be 34312
account 343113 should be 34313

Closes #14557
2016-12-20 15:23:51 +01:00
Goffin Simon 8955d15e9d [FIX] stock: Inventory adjustments in multi company
When making an inventory adjustment in multi company,
the default location_id was all the time taken from
'stock.warehouse0' even if the user was not allowed to read
the warehouse. Inspired from _get_default_location in pos_config.py

opw:695616
2016-12-20 14:07:34 +01:00
Alexis de Lattre 4203360528 [FIX] product: correct forwardport
Introduced at f772303 during forward port
2016-12-20 13:24:16 +01:00
Yenthe V.G c2150623ba [IMP] website_blog: Add subtitle in blog view
Only the name was present but it has 2 fields

Closes #14747
2016-12-20 13:07:59 +01:00
Akim Juillerat 4fdd70fc16 [I18N] l10n_ch: add German translations
For account.tax descriptions
cf #14737
2016-12-20 12:13:47 +01:00
Akim Juillerat fa4e76a9c7 [ADD] l10n_multilang: translate account.tax.template description
In addition to the tax name
Closes #14737
2016-12-20 12:13:17 +01:00
Akim Juillerat 146aa411e6 [CLA] Added Akim Juillerat in C2C
Closes #14779
2016-12-20 11:48:27 +01:00
Jeremy Kersten f36aba31e5 [FIX] website_Sale_options: fix regexp to redirect after the add to cart.
Previous regexp was done on the complete url and not the path name.
In the case of a domain with tld .shop, it didn't work.

This commit closes #14756
2016-12-20 10:32:04 +01:00
Martin Trigaux 551bbc88a1 [FIX] product: evaluate at runtime
The default value for the optional parameter `date` was evaluated at server
launch while it should have been at method execution.

The bug was not detected as it is always called with a date value in standard
modules.

Noticed at #11413
2016-12-20 10:19:20 +01:00
Jeremy Kersten a35cce2008 [FIX] website_customer: fix new api migration
Avoid traceback 'list indices must be integers, not str' when country_id not in sidebar.
env.browse(id).read(['name']) return a list, so country['name'] should be country[0]['name']
2016-12-20 09:49:48 +01:00
Yu Lin dde0d5b89f [FIX] sale_stock: use correct record
With this context, self is the model and has no value.
Replace it with procurement in the parameter which has the real value.

Closes #10507
2016-12-19 18:45:49 +01:00
Yu Lin 4224911b68 [CLA] Signature for uynil
cf #10507
Changed the signature to the `@me.com` address as it was already signed for
elico corp at #10010
2016-12-19 18:45:48 +01:00
Torvald Baade Bringsvor c9b745f642 [FIX] l10n_no: increased tax rates from 8% to 10%
Norwegian authorities have increased the middle tax rate from 8% to 10% from January 1st 2016. Updated the rates accordingly.

Closes #10731
2016-12-19 18:32:06 +01:00
chafique-delli 352ab7c51b [FIX] account: add missing context
Closes #10691
2016-12-19 18:31:00 +01:00
Damien Bouvy de45880eb3 [FIX] payment_paypal: html-decode PDT responses
Courtesy of DynApps
2016-12-19 18:15:49 +01:00
César Castillo 4e8a88a3bd [CLA] signature for ceaucari
Closes #11503
2016-12-19 18:15:21 +01:00
Damien Bouvy 737cca3ec7 Revert "[FIX] payment_paypal: html-decode PDT responses"
This reverts commit 8b64bf7682.

This should have been fixed in 8.0, a moment of distraction made me
push it in 10.0.

This is not the branch you are looking for, carry on.
2016-12-19 18:11:46 +01:00
javierjcf 79975f008e [FIX] mrp: returns a list of ids, no a list of lists
The super returns a list. Should not use append.
Introduced at 1ab007a

Closes #11708
2016-12-19 18:09:41 +01:00
javierjcf f609ff39db [CLA] signature for javierjcf
cf #11708
2016-12-19 18:09:41 +01:00
Nicolas Mac Rouillon 202a2e6959 [FIX] account_voucher: filter suppliers in voucher selection
[FIX] account_voucher: filter suppliers in voucher selection

Closes #12440
2016-12-19 17:34:51 +01:00
Damien Bouvy 8b64bf7682 [FIX] payment_paypal: html-decode PDT responses
Courtesy of DynApps
2016-12-19 17:34:06 +01:00
Jairo Llopis 000d8eba12 [FIX] portal: allow to delete res.partner
Do these steps:

1. Create a partner.
2. Grant him portal access through *Actions > Portal Access Management*.
3. Delete the created user.
4. Delete the partner.

You will get this error:

```
Odoo Warning - Validation Error
The operation cannot be completed, probably due to the following:
- deletion: you may be trying to delete a record while other records still reference it
- creation/update: a mandatory field is not correctly set

[object with reference: Portal User Config - portal.wizard.user]
```

This happens because the wizard (which is a transient model) does not let the partner to be deleted.

With this patch, we avoid that bug.

Closes #12608
2016-12-19 17:26:31 +01:00
Denis Ledoux a4836a81b2 [FIX] hr_payroll: wrong context in revision cfb850cd77 2016-12-19 16:38:09 +01:00
Olivier Laurent 84dc7e8d34 [FIX] anonymization: fix port to new API
A big section of code was wrongly indented (1 level too much).
The method was returning after 1 iteration of the loop.

Closes #14764
2016-12-19 16:15:09 +01:00
Martin Trigaux 51e6bb4727 [FIX] mrp: do not rename warehouse when changing code
If only the code of a warehouse is changed, `name` is None.
Do not try to set None as the new pull name.

Fixes #14766
2016-12-19 16:07:31 +01:00
Martin Trigaux 9d9592137b [FIX] purchase,mrp: match method signature
To have the same as the main method in stock
2016-12-19 16:06:50 +01:00
Nicolas Lempereur de658350df [FIX] website_blog: active/archive typo new API
With 86793a75 some regressions had been introduced.

opw-702025
2016-12-19 16:02:02 +01:00
Denis Ledoux cfb850cd77 [FIX] hr_payroll: month name in the user language
In the payslip name, the month name was set
within the server locale, rather than the
user language.

Therefore, if you had your server default locale
in English but your user in French, the
month name was displayed in English anyway.

opw-692590
2016-12-19 15:54:12 +01:00
Martin Trigaux 387a77ee32 [FIX] purchase: remove useless and broken override
There was several issues with this method:
- the workflow is incorrectly called (`purchase.signal_workflow(...)` instead)
- the workflow no longer exists (`purchase.state = 'sent'` instead)
- the code is only triggered when sending an actual mail and not a notification
- the code is never executed as the change is already changed

The last point is due to the override of `send_mail` in mail.compose.message.
The state is changed before `_postprocess_sent_message` is called (if called at
all).
Similar change of state is already done for sale.order.

This commit replaces and closes #14760
2016-12-19 15:43:01 +01:00
Alexis de Lattre 20ba16e777 [FIX] hr_holidays: compare correctly floats
As the number of holidays are float, we may get a flloating point error when
comparing and having -0.0000000001 instead of 0 for the number of remaining
leaves, making the test fail.

Closes #12809
Fixes #14643
2016-12-19 14:52:37 +01:00