Commit Graph
109028 Commits
Author SHA1 Message Date
Goffin Simon 0010be44bb [FIX] hr_timesheet: create a sub task
When creating a sub task, the field default_parent_id is set in
the context. When a sub task is created, a mail.compose.message
was created with the same context. So the default parent_id set in the context
(for a project.task record) was used to create the message and an error was
raised in function get_record_data.

opw:749435
2017-07-05 13:43:23 +02:00
Martin Trigaux 8810cee440 [I18N] all: synchronise saas-14 terms
based on v10 terms and saas-15
add the new languages

Much noise due to the different softwares that do not indent the terms the same
way. Merged the po files with --no-wrap option which makes long lines.

opw-751014
2017-07-05 11:48:45 +02:00
Christophe Simonis 97258040d8 [MERGE] forward port branch 10.0 up to 657e328903 2017-07-04 13:17:16 +02:00
Christophe Simonis 657e328903 [MERGE] forward port branch saas-11 up to 7b0a1e4031 2017-07-04 12:28:38 +02:00
Christophe Simonis 7b0a1e4031 [MERGE] forward port branch 9.0 up to b9131adb48 2017-07-04 11:51:23 +02:00
Martin Trigaux d89761c19a [FIX] point_of_sale: remove bad translations
es_PE are no longer published on transifex
bad fuzzy translation missing the %s
opw-750826
2017-07-04 10:40:06 +02:00
Laurent Smet 7dd344129e [FIX] base_address_city: fix city field duplication (#17919)
In base/res_partner.py, _fields_view_get calls _fields_view_get_address that could calls again
_fields_view_get in case of address_view_id is specified. That leads to issue in base_address_city
because the _fields_view_get_address method will replace two times the city field and then, we get
a view with two city_id fields.

see https://github.com/odoo/odoo/pull/16870 for screenshots
2017-07-04 10:14:53 +02:00
Cédric Snauwaert b1082348e7 [FIX] account: reconciliation, fix query that fetch perfect line match (#17969)
When opening the reconciliation widget, there are two queries that are done,
The first one is to find a move line that perfectly match the statement line
and is done in SQL for performance issue.
The second one is a search with a domain to find all the lines that could be used
in that reconciliation.

1) There was a mismatch between the two. The domain fetches lines that have a payment_id
while the SQL query does not. Which is inconsistent

2) In some case, we did not find a perfect match on the amount using the SQL query because
of a rounding error. Example is for amount 3,3. In python: 3,3 is represented like this
3,3000000000003 and doing a float_round of that value still returns 3,3000000000003
Since we want to match on an exact amount, using float_repr is needed to fix that error
2017-07-03 11:22:32 +02:00
Jeremy Kersten 15da3356a0 [FIX] web: /web/image fix resize if only one limit (height or width)
The old code don't resize correctly if you use params in request.
because if '200' > 500 => return True

Now we force the casting to int to be sure to compare apple to apple.

before: /web/image/<id>?height=100 => don't return an image with height=100px
after: /web/image/<id>?height=100 => return now an image with height=100px
2017-07-03 10:56:31 +02:00
Jeremy Kersten 4322d96a0c [FIX] website_portal_sale: be sure that form post a vat before to compare
Typo in previous condition. 'vat' in partner is always True.
2017-07-03 10:03:26 +02:00
Jeremy Kersten 404033daf3 [IMP] website_blog: use teaser in rss and not subtitle
This commit closes PR #17942
2017-07-03 10:03:26 +02:00
Odoo Translation Bot 0db908b399 [I18N] Update translation terms from Transifex 2017-07-02 04:27:01 +02:00
Odoo Translation Bot b9131adb48 [I18N] Update translation terms from Transifex 2017-07-02 00:27:47 +02:00
Nicolas Lempereur b3e7753d1b [FIX] web{site,_editor}: allow edit en_US field
If the website default language is not en_US, qweb fields are not
translatable in en_US (and thus can't be translated) because:

- the code expected en_US to be the default language.
- there was a error in website _dispatch

opw-746776
closes #17939
2017-06-30 14:14:27 +02:00
Nicolas Lempereur 2955bf2651 [FIX] web_editor: translation and no default en_US
Before 036ccbef when writing on qweb field with default language mi_SC:

- writing in mi_SC: wrote on the current res.user language (wrong)
- writing in en_US: wrote on en_US translation (right)
- writing in de_DE: wrote on de_DE translation (right)

but after 036ccbef:

- writing in mi_SC: wrote on mi_SC (right)
- writing in en_US: wrote on mi_SC (wrong)
- writing in de_DE: wrote on mi_SC (wrong)

With this commit, this drawback is also solved by keeping the lang in
context if present.

opw-746776
closes #17917
2017-06-30 13:11:51 +02:00
Nicolas Martinelli c61ae3a3ed [FIX] models: copy field with unique constrain
When a model contains a field translatable which has a unique
constrain, it is impossible to copy a record. Indeed, the unicity
constrain is always triggered, even if the model takes in charge the
overriding of the copy method to avoid duplication.

Introduced with commit ce7f31b0b0, with the goal to target only
XML/HTML translations. We apply this behavior in case of a callable
translate property, to target only the desired problematic use case.

opw-749481
2017-06-30 10:52:15 +02:00
Nicolas Martinelli d1e92c312f [FIX] website_form: send email with subject
- Use the form builder to send an email
- Customize the snippet to include the subject and the body
- Send a mail

=> The subject is not included in the email

This is because the subject is filtered out and considered as a
blacklisted field.

It happens because `mail.mail` inherits from `mail.message`. The field
property `website_form_blacklisted` is set to:
- `True` for `mail.mail`
- `False` for `mail.message`

Since we go through all inherited models, the property on `mail.mail` is
overriden by the property on `mail.message`.

It is actually not necessary to go through all inherited models, since
in the case of `inherits`, we copy the fields of the inherited model to
the target model. The check is simplified by only checking the fields of
the current model.

Based on work of @nla-odoo

opw-748926
2017-06-30 10:20:56 +02:00
Nicolas Martinelli 3ffd8d1602 [FIX] account: reset taxes
In an invoice, the modification of an invoice line triggers the complete
recomputation of the tax lines. However, it also deletes any manual
taxes that could have been set (e.g. on vendor bills).

Courtesy of @jjscarafia

Closes #17885
opw-749323
2017-06-30 09:37:38 +02:00
Nicolas Martinelli af11e74c2e [FIX] product: default category
If `product_category_all` is of type view, the installation of some
modules, such as delivery, crashes.

opw-749550
2017-06-30 09:12:54 +02:00
Frédéric Siffert cc06f7c140 [CLA] signature for leNeo
Closes #17846
2017-06-30 09:00:39 +02:00
Nicolas Martinelli 83572e00cc [FIX] point_of_sale: fix included taxes
Really apply commit a9ce4ffb22 to POS orders.

Since the creation of a POS order in the backend is a feature which
nearly not used, we rewrite everything related to onchanges. To avoid
breaking the compatibility, the old onchange code is kept. As long as
the user doesn't upgrade the module it will be used instead of the new
onchange.

opw-746827
2017-06-30 08:45:24 +02:00
Nicolas Martinelli 20c91f474c [FIX] point_of_sale: fix included taxes
The unit_price should be already 'fixed' by the time we get in
`_compute_amount_line_all`.

This reverts commit d938ba87ae.
2017-06-30 08:45:24 +02:00
Richard Mathot 307317dc2d [FIX] l10n_fr_certification: right domain on an integer field 2017-06-30 08:00:54 +02:00
Christophe Simonis 936f39886c [MERGE] forward port branch 10.0 up to cb01cfe9ff 2017-06-29 16:40:39 +02:00
Christophe Simonis cb01cfe9ff [MERGE] forward port branch saas-11 up to aa578e1bee 2017-06-29 16:34:59 +02:00
Lucas Perais (lpe) 6fe3ae841b [FIX] website_crm: make sure we import _ to translate
Fix 4c66eae308 attempted to translate terms but did not import _
This commit does just this
2017-06-29 15:48:56 +02:00
Christophe Simonis aa578e1bee [MERGE] forward port branch 9.0 up to 4d4ff7c5e7 2017-06-29 13:12:53 +02:00
Jérome Maes ffba5c688f [FIX] hr_expense_check: remove duplicate key in manifest
The 'category' key is already present in the manifest.
This duplicated key makes odoo create a new module
category, with a bad xml id
(module_category_accounting_andamp;_finance), since
the ampersand was escaped.
2017-06-29 11:23:48 +02:00
Goffin Simon 9153de1bcf [FIX] website_sale: website payment terms issue with portal users
Steps to reproduce the bug:
-create a child contact of a company C
-invite the child contact as a portal user
-sign into the website and place an order w/ wire transfer as payment acquirer

Bug:
The payment term set on the quotation was not taken from the company C and
the default sales person  was not taken from company C too.

opw:745091
2017-06-29 10:51:01 +02:00
Nicolas Martinelli d63a01f939 [FIX] base: sequence date range
Ensure to search a maximum of 1 record to avoid crash.

opw-748971
2017-06-29 09:33:15 +02:00
Richard Mathot 4d4ff7c5e7 [IMP] doc: mixing attrs and states is iffy 2017-06-28 17:38:32 +02:00
Fabien Meghazi af6328c2a2 [FIX] point_of_sale: pos.order#create loose the company_id since the new api migration (opw: 746677)
https://github.com/odoo/odoo/commit/32b5515a8ff6047db489e569935b4416f946bc26#diff-5eeb7d6a1a488dff039e5cc3300730e1L513
2017-06-28 16:33:24 +02:00
Nicolas Martinelli 685bea92d1 [FIX] account: show the 'reference' field in report
Some module, such as `l10n_be_invoice_bba`, use the field to provide
information to customers. Basically, if this field is filled in, we
should print it.

This reverts commit 59efea7e31.

opw-748930
2017-06-28 16:19:42 +02:00
Naglis Jonaitis 1b1e0a932a [FIX] rating: typo in submit_rating controller endpoint definition
If no method is specified, all are accepted

Closes #17890
2017-06-28 15:52:10 +02:00
Alexis de Lattre bff4922f7c [FIX] l10n_fr_certification: avoid auto-install
As of June 15th 2017, according to
http://proxy-pubminefi.diffusion.finances.gouv.fr/pub/document/18/22503.pdf
Will not be required for all FR companies.
The certification will only be required for POS software, not for accounting
softwares.

Disable autoinstall, waiting to have more information on the changes to be voted.

Closes #17771
2017-06-28 15:15:03 +02:00
Goffin Simon ecdf96e8a7 [FIX] mrp, stock: Traceability of MO disappears when product returned after delivery
Steps to reproduce:

Let's consider product P tracked by serial number
P has a manufacture BOM B with Q as componenent

- Produce P with serial number SN(with MO)
- Send P with SN to a customer A(with SO and DO)
- Force availability on P to a customer B(with SO and DO)
- Return P to stock for customer A.

Bug:

The tracability for P removed the component Q(consumed_quant_ids)
when reconciling the negative quant(generated for B) with the returned
quant from A.

opw:744424
2017-06-28 14:51:27 +02:00
Jeremy Kersten 32423169af [FIX] web: namespace the event for Apps Widget.
With the new client web from v9, we start the new action before to destroy the old one.

When we switch from Apps (store) to Update and vice-versa, iframe was not loaded correctly.

In case of the Apps widget, we are binding event of the new iframe during the start,
and when it is ready, we destroy the old ifram and so unbind the listener of 'message.apps'.

Using a uniq id, we ensure to bind new event, and only unbind old event during the destroy.
2017-06-28 14:36:11 +02:00
Nicolas Martinelli a93195ee4e [FIX] payment: do not create token in backend
Complement of commit e8dec0fdf1

opw-746545
2017-06-28 13:37:26 +02:00
Nicolas Martinelli 1b3a2c488c [FIX] website_portal_sale: access to invoices
In the website portal,the Sales Orders are always rendered as superuser
after access rights check. This is not the case for invoices, which can
lead to access errors when the user tries to download the invoice PDF.

To solve the issue a new route is created. It handles the access rights
checks, then access the invoice document as a superuser.

opw-747854
2017-06-28 10:05:54 +02:00
Nicolas Lempereur 2bda46ce78 [FIX] website_sale_digital: check product tmpl sudo
For example the portal user has restricted access to product template,
this can lead to an issue that should not be in this instance that is
checking if the product template correspond to a product sold.

opw-748480
closes #17871
2017-06-28 09:36:09 +02:00
Goffin Simon cf66983f37 [FIX] base: Language translation import issue
When importing translations with a csv, the state of the translations was
always set to "To translate" even if the state was "Translated"
due to function _inverse_source.

PS: Making self.source when self is considered as record set could lead to an error.
The return in this function was not needed.
In old API this function was called just for one record.
So this function expect only one record at each call.

opw:747877
2017-06-28 09:27:20 +02:00
Nicolas Martinelli 9771056c46 [FIX] mrp: unlink lot
- Set a user with 'User' access rights in Manufacturing and Inventory
- Create 2 products tracked by lot (A and B)
- Receive some quantity of B, define the lots.
- Create a BOM for A, depending on B. The BOM must use routing with at
  least one workorder

With the unprivileged user:
- Create a MO for 1 unit of A
- Update quantity to 3
- Plan the MO
- Go in workorders, start working and set the lot numbers for A and B.
- Finish the WO => Access Error

opw-748825
2017-06-28 08:38:16 +02:00
Jeremy Kersten 653e30d8f8 [FIX] website_sale, website_crm : add missing import and remove useless
Fix: NameError: global name '_' is not defined

Related to odoo/odoo@4c66eae308
2017-06-27 22:29:13 +02:00
Yannick Tivisse 8639152501 [FIX] crm: Prevent to select non-customer on lead quick creation
Purpose
=======

If you create an opp from the kanban you can select any contact (even if not marked "customer")

If you try to add a "non-customer" for the same field from the form view you cannot.

Specification
=============

Apply the same behavior than on the form view.
2017-06-27 15:26:03 +02:00
Goffin Simon a8c12e1fd0 [FIX] sale: Updating dashboard_graph_model when uninstalling Sales
Uninstalling Sales with CRM still installed lead to an error
when clicking on CRM app because the dashboard_graph_model was not
updated for each crm.team record.

opw:748099
2017-06-27 14:02:05 +02:00
Nicolas Martinelli e8dec0fdf1 [FIX] payment: do not create token in backend
Tokens are not meant to be generated from the backend, so we forbid it.

opw-746545
2017-06-27 12:08:15 +02:00
Christophe Simonis b1f738d1ca [MERGE] forward port branch 10.0 up to 89a99407ce 2017-06-27 11:39:43 +02:00
Adrien Dieudonne 1e4f4299bc [FIX] *: reports: check required values for 'render_html'
Some reports require additional information to render. When
accessed in Odoo, the user has to fill a wizard to provide those
information. However, when these reports were opened in Studio,
it crashed as those information were missing (we don't pass
through the configuration wizard in this case).

This fix checks if all the required information are given before
trying to render those reports, and it displays a warning in
the logs in they are missing, which is better than a traceback.
2017-06-27 11:15:24 +02:00
Xavier Morel 89a99407ce [FIX] website_forum: yet more untranslatable terms 2017-06-27 10:36:24 +02:00
Christophe Simonis 80775a7362 [MERGE] forward port branch 10.0 up to 4c66eae308 2017-06-26 18:38:41 +02:00