Commit Graph
102880 Commits
Author SHA1 Message Date
Goffin Simon 342dad44cd [FIX] account_asset: To ensure the migration compatibility with 9.0
This fix allow to keep the same behavior of 8.0 and 10.0 to manage the assets.

In 9.0, the field account_income_recognition_id(oldname='account_expense_depreciation_id') has been
deleted from the account.asset.category.form view with 6120babb45 and
then it was not possible to manage the assets like in 8.0 and 10.0

But as this fix is in a stable version, it must be compatible with instances without any upgrade
of the view account.asset.category.form.

This issue has been solved in saas-11 with this commit: eb8d4aaa59

opw:703860,702265
2017-01-17 09:53:58 +01:00
Pierre Masereel 77767801c6 [FIX] bus: do not suggest company users to portal users
When you are connected as a portal user, you can access to the list of
company users when you try to create a channel of type "Direct Message".

This is caused by a SQL request that doesn't check the access rights of
the user before returning the list of users.

To fix this, we check that the user can create a mail channel, before
returning partners information.

opw-704127
2017-01-16 17:54:12 +01:00
Pierre Masereel 36f6f2647d [FIX] hr: do not show employee users to portal users
When you are connected as a portal user, you can connect to the
backend of Odoo and if you go to your discuss app through the '@' icon,
you can list the employees of the company by mention a employee

This is caused by a SQL request that store in cache the employee
list to minimize requests when mention. The problem
is that those requests don't take into account the rights of a user
to read employees information.

To fix this, we are taking the group 'base.group_user' and read the
information of its users, the 'read' is respecting, the access rights of
the users, and so the employees names, are ont shown anymore to portal
users.

opw-704127
2017-01-16 16:42:18 +01:00
Nicolas Martinelli 9c774c370c [FIX] account_full_reconcile: matching number
When a journal item duplicated, the matching number is duplicated as
well. This will create inconsistencies in the information displayed to
the user, and moreover it will not allow to reconcile the item anymore.

opw-704902
2017-01-16 14:44:44 +01:00
Nicolas Martinelli 3d857e4ca0 [FIX] delivery: default UoM for weight
On a picking, the UoM of the weight is the default UoM for the weight
category. However, weights in Odoo are always considered to be
kilograms.

This might lead to inconsistencies between what is displayed on the
picking and what is printed on a shipper label.

opw-702564
2017-01-16 11:58:28 +01:00
Vipul Bhatt 9ef3ebf858 [IMP] web_calendar: Display in user's language time format
- Y axis : according to 12 hour or 24 hour format
- Event title : following time format in preferenced language

NB: The conversion from 'A' to 'TT' to match fullcalendar v1 should be
removed when fullcalendar is updated to v2, as the syntax will change.
See : http://fullcalendar.io/wiki/Upgrading-to-v2/

Backport of commit c1d813ec1c

opw-704237
2017-01-16 10:17:29 +01:00
Odoo Translation Bot e26045a8e4 [I18N] Update translation terms from Transifex 2017-01-15 00:28:55 +01:00
Nicolas Martinelli c7767b8853 [FIX] base: check grouping format
If the user enters an incorrect grouping format, login won't be possible
anymore since the web client will crash when parsing the field value.

For example, "[3, 0,]" will trigger the issue.

Complement of commit 5959c41631

opw-704388
2017-01-12 14:48:54 +01:00
Pedro M. Baeza 3aa7b8ca27 [FIX] project: Don't reset partner_id in onchange_project when empty
In 3041efb, it was introduced a partner_id reset when project_id is
False, but this causes you can't apply default values to partner_id
directly.

One use case where happens:

* Go to Sales > Customers.
* Select one customer.
* Click on the smart-button "Tasks".
* Create new task.

Before this commit, the customer where you come from is assigned.
After this, no partner is selected.
2017-01-11 17:20:27 +01:00
Nicolas Martinelli ea4c231130 [FIX] web: limit password size
If the user writes a password larger than 4096 characters at the login
screen, it causes a crash instead of displaying the "Wrong
login/password" message.

The Python library used to hash password (passlib) is by default limited
to 4096 characters. Above this limit, it raises an error (source:
https://pythonhosted.org/passlib/lib/passlib.exc.html).

Allowing a password larger than 4096 is not necessary, we just limit the
field maximum length since such a situation should happen because of an
incorrect copy/paste.

opw-704110
2017-01-11 15:18:40 +01:00
Jairo Llopis 2c60356332 [FIX] website_slides: Preserve context when sending emails.
When you pass a dict to `.with_context()`, it completely replaces the context,
removing the language from it.

This causes that when the publisher publishes a slide in another language, the
template gets mixed languages rendering.

Closes #15017
2017-01-11 15:03:25 +01:00
Goffin Simon 562e2657f6 [FIX] account: invoices on unmatched payment
Fine tuning of this commit: 69c41c7
When cancelling a payment, the remove_move_reconcile function was called and
it removed the payment from the invoice and in the payment history, only the
validated payments were kept.

This commit keeps the behavior before this commit: 69c41c7

opw:691692
2017-01-11 13:56:12 +01:00
Nicolas Martinelli 291a94192c [FIX] sale, purchase: tax computation
Set the company rounding policy to "Round Globally". Create the
following SO (or PO), with a 7 % excluded tax:
- Qty      Price
- 880.000  5.79
- 120.000  4.36
- 28.000   2.88
- 68.000   11.09
- 35.000   5.20
- 35.000   5.32

The total tax on the SO is 477.48, while it is 477.50 on the invoice
generated from the SO.

FORWARDPORT UP TO 10.0

Fixes #13687
opw-703519
2017-01-11 11:45:05 +01:00
Nicolas Lempereur 2c66f7bc7f [FIX] web_editor: italic odd behavior because typo
An italic node would be taken as a basic node containing text and thus
would be merged unexpectedly.

For example with the following content : "<i>hello</i> world" removing a
letter of 'world' would merge the text node with hello making it italic.

opw-703722
2017-01-11 10:38:29 +01:00
Olivier Dony cd4ff9341e [FIX] http: make error 400 slightly more user-friendly
Users who get an error 400 due to an invalid CSRF
token might be doing something legit. For example
they may have opened the page with the HTTP form
2 hours before posting it, and let the CSRF token
expire naturally (default lifetime is 1h).

In this situation the "invalid CSRF token" message
might be too cryptic for them to understand that
they need to refresh the form and try again.

Mentioning that their "Session expired" as well
should sound more familiar and lead to the right
reaction.
2017-01-10 17:09:03 +01:00
Denis Ledoux fc813847d8 [FIX] account: wrong counterpart in invoice / out refund register payment
Revision 20935462a0
introduces the below regression:

When registering a payment on a customer invoice refund
or a vendor bill, with a payment difference

e.g. payment of 101 for an invoice of 100

and marking the invoice as fully paid,
the counter part in the payment account move
were wrongly computed:

In those cases,
its the payment total minus the invoice residual total
that must be performed, and not the other way around.

This revision solves this, inspired on how
the payment difference is computed for display
in the wizard on how it was before the above revision,
in the method `_compute_payment_difference`

Fixes #15000
2017-01-10 16:49:21 +01:00
Denis Ledoux 23deeb187d [FIX] account_check_printing: remove useless sudo
This sudo is useless, and prevent the use of the record
rules on the creation of payments.

opw-703143
2017-01-10 15:09:24 +01:00
Nicolas Lempereur 3f7b1f6083 [FIX] web_editor: ignore read only + debug + write
In some case (for example the one solved with b51d21c5) we can have
write done on a field text in read only mode.

With 98ed53ce if :

- such a case happened (in b51d21c5 the fix only worked after the given
  field was written one time) or a similar instance,
- and the user was in debug mode,
- and the widget used was TextFieldHtmlSimple

this could lead to an issue with the code trying to toggle the code view
mode whilst the editor is closed.
2017-01-10 08:31:38 +01:00
Simon Lejeune 17adc2e09e [FIX] barcodes: form view barcode handler: concurrency
Suppose the following usecase: you scan the first product of the
picking. A server onchange is then triggered. You scan the same product
a second time, before the first onchange has returned. You expect that
the first onchange is completely executed before running the second one.
This was not the case. Moreover, some onchanges were not be able to
work with the invalid  state of the formview at some times, and crashed.

The previous implementation was wrong because id didn't run the main
barcode processing mechanism inside a Mutex. It was also wrong because
it didn't correctly wait for the onchange to execute (a previous  barcode
onchanges or some classic ones) before setting the barcode field.
2017-01-09 16:36:00 +01:00
Nicolas Lempereur f27e69eced [FIX] web_editor: harmless ; missing in 98ed53ce 2017-01-09 16:26:15 +01:00
Nicolas Lempereur 81b668c3e3 [IMP] web_editor: tour testing inline editor saving (up to s11)
With 98ed53ce when a form view is saved when a html field is in code
view mode, the change is not lost.

This new backend tour check that when saving in or not in code view, the
content is saved effectively.

The test not in code view would ensure issues like #14381 #14351 #14394
are detected on runbot.

closes #14475
opw-693052

note: the old test system is used so this test is only for up to saas-11
2017-01-09 16:06:46 +01:00
Nicolas Lempereur 98ed53ce3a [FIX] web_editor: don't lose modified code view content
The intended scenario when using the code view is the following:

1) click on code view button to use code view
2) make changes
3) click on code view button to get back to wysiwyg view
4) save from the wysiwyg view

If the 3rd step was not done:

- for the inline editor, we lose the changes that have been done in
  code view,
- for the iframe editor, we lose the entirety of the content.

At one time the user was forced to go back to wysiwyg before being able
to save, but this have been removed hence the present usability issue.

With this fix, when the editor content is saved, if the user is in code
view he is automatically set back to wysiwyg view.

fixes #14648
closes #14475
opw-678677
opw-693052
2017-01-09 16:04:42 +01:00
Nicolas Lempereur d40edd7052 [FIX] web: wraparound no create editable list
In e0c4ec54ca a change was done to improve the behavior in some
editable list instances, but this introduced a small issue for
list with line creation disabled.

With this change, doing tab or enter at last line should keep the
previous behavior of wrapping around and not creating a new line.

opw-703748
2017-01-09 15:03:29 +01:00
Odoo Translation Bot d995739241 [I18N] Update translation terms from Transifex 2017-01-08 00:29:28 +01:00
Christophe Simonis e0d33ce07d [MERGE] forward port branch saas-6 up to 9ba3762a32 2017-01-06 17:29:42 +01:00
Christophe Simonis 9ba3762a32 [MERGE] forward port branch 8.0 up to 75692bc988 2017-01-06 17:27:06 +01:00
Christophe Simonis c382c8f2fa [IMP] core: module loading: less verbose logs
Only warn about non loaded declared models with a minimal logging level.
2017-01-06 17:11:30 +01:00
Nicolas Lempereur 678c42aeb0 [FIX] web: FieldCharDomain wrong count if other lang
The number of records selected by a FieldCharDomain was only computed
with the base language.

But when selecting the domain with a modal window, or when sending a
mass mailing restricted to a domain, the current user language is used.

With this commit, the number of records is computed with the current
user language.

opw-693836
2017-01-05 19:18:06 +01:00
Denis Ledoux c389a6576b [FIX] website_mass_mailing: typo in unsubscription confirmations and translatable
There was an obvious typo in these confirmations,
and they were not yet translatable.

opw-703745
2017-01-05 16:59:16 +01:00
Goffin Simon 416892279d [FIX] account_asset: Wrong account set in Vendor Bill
This reverts commit 804ef6f.

1. Generating the vendor bill by adding the related Purchase Order:
in that case, it works well since the system has a first on-change on the product when selecting the asset type;
it sets the asset account in the expense account of the product which in turn is used as the vendor bill account.

2. Creating the vendor by adding manually the product which is an asset:
in that case it takes the wrong account since it used the depreciation account instead of the asset one.

But the labels cannot be changed because the case 1 works.

opw:702265
2017-01-05 13:21:51 +01:00
Goffin Simon bf89a58acd [FIX] l10n_es: Wrong user_type_id for 47... accounts
opw:696888
2017-01-05 13:01:11 +01:00
Luc De Meyer 75692bc988 Update account_report_common.py (#14891)
[FIX] account: fixed onchange_chart_id that was failing on last and first day of the year.

Courtesy of Noviat
2017-01-05 10:25:39 +01:00
Christophe Simonis cbff8629fa [IMP] core: allow declaration of end migration scripts
These `end` migration script will be executed when all modules have
been updated and models setup.

Also accelerate the search of migration scripts, speeding up registry
loading.
2017-01-04 15:49:02 +01:00
Odoo Translation Bot cc2af89454 [I188888888N] Update translation terms from Transifex 2017-01-04 14:54:07 +01:00
Denis Ledoux b201da493d [FIX] sale: Ukrainian translation instead of English (UK)
opw-702022
2017-01-04 14:31:55 +01:00
Goffin Simon 0ef0e141c0 [FIX] web_graph: Adding to dashboard a customized view
When reading customized views from our dashbord in reporting,
the measures selected in the customized views were not taken into
account. It happened when the customized view was build from a report.

opw:698105
2017-01-04 10:28:33 +01:00
Nicolas Martinelli d619ad464f [FIX] sale_service: update SO lines
To reproduce:
- Create 2 products with 'Track Service' set as 'Create a task and track
  hours'.
- On a SO, add these 2 products and confirm (2 tasks will be created)
- Go to Timesheet > Activities, and create a line for Task 1. The
  delivered quantity of Product 1 in the SO should be modified
  accordingly.
- Change the activity line by setting 'Task 2' instead of 'Task 1'.

The delivered quantity of Product 2 is updated accordingly, but the
delivered quantity of Product 1 is unchanged.

This is a complement of commit 4e60d28d00.

opw-693520
opw-695087
2017-01-03 17:01:47 +01:00
Nicolas Lempereur bbc4137600 [FIX] calendar: partner filter for search more or created
When adding a partner "filter" to the calendar view, it only works if we
select directly the partner and not when we choose him via "search more"
or create him on the fly.

This commit uses the partner id directly which is available in the field
value in those three possible instances.

opw-702491
2017-01-03 16:57:20 +01:00
Philipp Hug 7cd2969b09 [FIX] sale_layout: correct the alignment of taxes
To do the same on the rapport as what was done at #14511
2017-01-03 16:01:50 +01:00
Philipp Hug 4ea61f6c54 [FIX] sale_layout: unify tax displayed field in report
Use the same logic to display taxes as in the default report:
use the tax description and fallback on the name

Already done in report_invoice_document and report_saleorder_document

Closes #14906
2017-01-03 15:57:29 +01:00
Christophe Simonis 1aad733dc4 [IMP] base_import_module: correct validation of custom views
Consider also imported and exported views when validating custom views.
2017-01-03 13:12:17 +01:00
Christophe Simonis fc91feda30 [IMP] core: more lenient check of custom views
By not marking invalid custom views as a failure, this allow database
migrations to not be considered failed for simple errors that can be
solved after migration.
2017-01-03 13:12:17 +01:00
Daniel Dico f984073251 [FIX] pad: get pad content with newlines
Some more recent versions of etherpad can have newlines in the pad
content. Allowing newlines should not break anything that worked
before and allow more etherpad versions to be used.

closes #14877
opw-703173
2017-01-02 18:35:41 +01:00
Christophe Simonis 3805eb620a [MERGE] forward port branch saas-6 up to 7be1a1c55b 2017-01-02 11:42:52 +01:00
Christophe Simonis 7be1a1c55b [MERGE] forward port branch 8.0 up to 2b8fcfc08b 2017-01-02 11:22:45 +01:00
Odoo Translation Bot 2b8fcfc08b [I18N] Update translation terms from Transifex 2017-01-01 02:58:08 +01:00
Odoo Translation Bot 072906795c [I18N] Update translation terms from Transifex 2017-01-01 00:30:05 +01:00
Nicolas Martinelli a71cdd02ec [FIX] payment_paypal: documentation link
The Paypal URL doesn't exist anymore. Redirect to Odoo documentation
instead.

opw-697606
2016-12-30 15:01:43 +01:00
Nicolas Lempereur eb2d598935 [FIX] auth_oauth: dup fail if odoo oauth provider removed
It is unwise to delete it (it can simply be disabled) but it can be done
(and other part of the code take it into account).

opw-703196
2016-12-30 11:29:48 +01:00
Nicolas Martinelli 8a1b55ae04 [FIX] website_sale: default company on SO
In multi-company:
- Create 2 companies A and B
- Set the superuser on company B
- Set the website on company A

When a SO is generated from the eCommerce, it is defined on company B,
while it should be on company A.

opw-695253
2016-12-29 13:49:28 +01:00