Commit Graph
106596 Commits
Author SHA1 Message Date
Nicolas Lempereur f8db92e278 [IMP] stock_account: anglo-saxon stock input->expense->default
Before this commit, in anglo-saxon accounting the account of a
vendor's bill line was defined as the stock input account, or the
default account.

With this commit the chain becomes:

- if one: stock input account,
- else if one: expense account,
- else: default account

opw-695167
2016-12-09 15:32:18 +01:00
Eric Antones e191b5af6e [FIX] website_sale: sort by literal not detected for translation
There are literals inside a t tag that should be translated but they are never
exported to the pot file because they are inside a t-value attribute as python
code.

Closes #14344
2016-12-09 14:09:38 +01:00
Nhomar Hernandez 9a0e3a11db [IMP] l10n_mx: Completely refactored Mexican CoA Template. Courtesy of Vauxoo.
* Added accounts provided following the structure provided by the SAT
this accounts are only the minimal necessary ones, with the objective
to set the first easiest engagement to new users and tags will represent the actual information
from the document linked.

* The name of the tag is the concatenation of tag.code + tag.name, because the account.tag
model have not the code field.

Note: we will need more accounts but some of them for special operations
which are not basic at all, then it is better just propose the operational accounts
once we understand a proper closing process.

* Set the proper user-types on accounts in order to be able to use it with the official reports this CoA
for operational purpose.

* Added nature field and data in tags to allow set this value in electronic account report, and
set this value with data pre loaded, we did not use user.type for this due to the fact that the same user type can have different nature (if it grows for credit or debit), I do not know if this field brakes the stable rule we can discuse about that.

* Assign the account tags with in the Mexican CoA template installation, and with an onchange(account.code) when manually modifying/creating accounts.

Rationale: If the code of the accounts follows the pattern 111.00.00 or 111-00-00 then it will
set the tag 111.00 if the tag exists, if not then this will be ignored.

* Generate an account tag by each second level account in SAT catalog, and assign to the corresponding account.
2016-12-09 13:59:09 +01:00
app d6ead3dbe0 [FIX] base: show attachments of archives records
When testing the access rights, attachments associated with
archived/inactive records are inadvertently being hidden due to
the default ORM behavior of search.

Patch simplified while merging.

Closes #14366
2016-12-09 11:51:21 +01:00
Martin Trigaux d29c40e1e1 [FIX] payment_paypal: avoid crash in validation without reference
When `paypal_validate_data` is called without any reference, `tx` is None.
Before the migration, it was catched by a `tx and tx.acquired_id` but it is no
longer the case.

Introduced at f1ac1b12

Fixes #13834
2016-12-09 10:47:51 +01:00
Nicolas Martinelli b27787c92c [FIX] payment_authorize: reconcile transaction
- Create a SO, link it to a Quotation Template (e.g. "Odoo Monthly" from
  the demo data). Note that the Quotation Template must require a
  payment.
- Click on "Preview", then "Accept & Pay" in the website quote
- Pay with Authorize.net
- In the Subscription linked to the SO, change the invoice date to a
  date in the past (so it will generate an invoice)
- Execute manually the Scheduled Action "Generate Recurring Invoices and
  Payments for Subscription Contracts"

The payment is correctly registered on Authorize (you should receive a
confirmation email), but:
- No invoice is generated
- The next invoice date has not been changed

The issue comes from the fact that:
- `payment_authorize` executes the callback method
  `reconcile_pending_transaction` before changing the status of the
  transaction.
- The method `reconcile_pending_transaction` cancels and unlinks the
  invoice if the transaction is not 'done' or 'authorized'.

In order to solve the issue, two fixes are necessary:
- Switch the status update with the callback (this commit), as it is
  already the case for Ogone and Stripe.
- Do not manually call `reconcile_pending_transaction`, since it is
  already executed as callback. This avoids two increments of the period
  (commit in Enterprise).

opw-694730
2016-12-09 09:14:48 +01:00
Nicolas Martinelli b64ac1f454 [FIX] website_sale, website_portal_sale: SO auto-confirm
1. Setup authorize.net acquirer
     Published on website
     Order Confirmation: capture manually
     Store card: always
2. Buy something on the store => SO gets confirmed
3. Buy again but select the saved card
4. You get a confirmation screen on the website, but the SO is not
   actually confirmed in the backend (but it should)

The issue is that the confirmation of the SO is located in the
`form_feedback` method. When paying with a saved credit card, there is
no form filled in since we use a S2S transaction. Therefore, the method
is never called, and the SO never confirmed.

Fixes #14007
opw-693517
2016-12-09 08:49:36 +01:00
Jeremy Kersten 7d968116bd [FIX] base_geolocalize, website_crm_partner_assign: geolocalize fallback on city
If the street cannot be localized, we retry with only the city.
2016-12-07 16:03:29 +01:00
Jeremy Kersten d3ea014f56 [FIX] website_crm_partner_assign: avoid double click on button
Disable the button at first click to avoid concurrent update when the
user press several time the same button before the end of the first request.

Replace tab by space indentation
Clean unused variable
2016-12-07 15:48:20 +01:00
jl2035 6eaa8f351f [FIX] l10n_si: update oiutdated taxes
Slovenian law has changed and taxes are now 9.5% and 22% instead of 8.0 and
20%.

Closes #14505
2016-12-08 15:42:48 +01:00
jl2035 e24e72fd38 [CLA] signature for jl2035
cf #14505
2016-12-08 15:42:37 +01:00
Balázs Palcsó 2524f01f0b [REM] l10n_hu: remove accounts not valid since beginning of 2016
Closes #14596
2016-12-08 13:30:52 +01:00
Simon Lejeune e433625cfb [FIX] qweb: render of a primary view
Revisions [1] and [2] broke the rendering of extensions-primary view
because it made the wrong assumption that the `read_template` of an
extension-primary view set the `t-name` attribute to the name of the
extension-primary view.

We now patch the `t-name` in the `read_template` result for this case.
[1] 12e36a66f2
[2] 9dd5bd9349
2016-12-08 11:49:06 +01:00
Raphael Collet b62d078c9d [FIX] models: identify sparse fields with field.sparse 2016-12-08 11:08:01 +01:00
Nicolas Martinelli 41c43cdd37 [FIX] mrp: hide Gantt view
The Gantt view should not be displayed for MO, only for WO.
2016-12-08 10:53:11 +01:00
Géry Debongnie 44c1fa7138 [FIX] web: prevent crash in line chart with 1 record
Since commit 8625242884, the graph view crashed when
displaying a line chart with only one record.  The reason is that the
method display_line can return undefined (if no line chart can be
displayed).  In that case, there is no reasy to try to display its
tooltip.

This commit simply protect against the case where it is undefined.
2016-12-08 10:11:24 +01:00
Nicolas Martinelli 2ab85a0783 [FIX] hr_payroll: hidden lines
The domain on the "Payslip Lines" has several consequences:
- Lines are duplicated every time the user clicks on "Compute Sheet"
- Contribution registers that have data are not computed because they
  are not visible
- Hidden payslip lines don't go onto accounting entry

We remove the domain, since the purpose of it is to hide the lines in
the payslip of the employee, not hide them in the backend.

Closes #13926
Fixes #13925
Fixes #13987
opw-694011
2016-12-08 09:07:53 +01:00
Lucas Perais (lpe) 85160f8da2 [FIX] hr_holidays: This commit corrects the behavior of holidays validation
When allocating holidays to an empty tag (or category), double validation doesn't crash anymore, though it does nothing

Closes #14591
OPW #694748
2016-12-08 08:50:27 +01:00
Alexis de Lattre 6665526ccc [IMP] l10n_fr: add some more accounts as well as a model to be used in the bank reconciliation widget. Courtesy of Alexis de Lattre <alexis.delattre@akretion.com> 2016-12-07 16:50:06 +01:00
Nicolas Martinelli e3ee78c7ef [FIX] mrp: start date
The start date of a manufacturing order is never set. One consequence is
that the Gantt view, which relies on this field, is never populated.

opw-693743
2016-12-07 15:50:31 +01:00
Jeremy Kersten 89994fbb88 [FIX[ website_crm_partner_assign: fix mail template
If user had no signature, False was displayed in the mail.
2016-12-07 14:53:42 +01:00
Olivier Dony daff406a22 [FIX] crm: re-introduce fix of b46b0936a8
The new API migration in aa44700dcc
discarded the b46b0936a8 patch,
reintroducing the bug.
2016-12-07 13:00:34 +01:00
Jeremy Kersten 09b3a50cc8 [FIX] website_crm_partner_assign: don't send email to responsible sale.
Only the partner assigned should receive this email.
The saleman will see the lead in the pipe directly.
2016-12-07 11:08:40 +01:00
Jeremy Kersten 2b243e3650 [IMP] mail: allow to pass ´mail_auto_subscribe_no_notify´ in context to avoid spam
When you write on user_id in a model, that will automatically send an email
to the new user_id assigned.

In case where it is write in batch, that can be considered as spam.

In some case, the user will be aware from another way that with this email.
2016-12-07 11:08:31 +01:00
Nicolas Lempereur b51d21c5b8 [FIX] tools: nbsp+sanitize = write
lxml.html.clean module we are using to sanitize html takes either a
tree/element or string, and return us an element of the same type.

We are passing it an unicode string, and it gives us back an unicode
string and if it is possible convert entities to utf-8.

This lead to an issue in html inline fields containing an `&nbsp;`
entity, the entity was converted by the sanitizer to its unicode
character (U+00A0).

Then, when the field value is loaded to be displayed, the internal
value contains U+00A0 characters, but when it is inserted in the page
the browser converts them to `&nbsp;`. Hence in this instance, the
internal value is never equal to the displayed value and a write is
always triggered even without editing.

This commit simple modify the sanitizer so value saved in database
contain `&nbsp;`.

closes #14569
opw-689274
2016-12-06 18:54:46 +01:00
Christophe Simonis aec8e2582f [MERGE] forward port branch saas-11 up to 345755e 2016-12-06 17:24:37 +01:00
Christophe Simonis 345755e271 [MERGE] forward port branch 9.0 up to 799f12c 2016-12-06 16:49:12 +01:00
qdp-odoo 3fc879e3eb [REF] account: improve inheritancy of default_get values of WizardMultiChartsAccounts class.
This will allow localization to define more easily extra bank or cash journals
2016-12-06 16:13:17 +01:00
Juan Pablo Arias 799f12c326 [ADD] base: Colombian data
- adds position before to COP currency in res_currency_data
- adds address_format to Colombia in res_country_data
- CLA signature for kurkop

Closes #10618
2016-12-06 15:55:43 +01:00
Christophe Simonis 5301951931 [MERGE] forward port branch 9.0 up to 1f3f155 2016-12-06 15:18:45 +01:00
Thibault Delavallée db72451607 [FIX] mail: avoid notifying a message by email when it is already an email
When creating a mail.mail without giving a mail_message_id, a new mail.message
is created. It does then through _notify that notifies people of the message
creation. This leads to mail being sent two times, one when sending the
mail.mail, one when sending the notification.

This commits fixes that behavior. When creating directly a mail.mail without
giving a mail.message, call to _notify is bypassed. This way either an email
is created, either a message that has to be notified is created, but not both.
2016-12-06 15:15:48 +01:00
Thibault Delavallée df037e2959 [FIX] mail: correctly handle replies to thread containing external emails
When Odoo sends emails their Message-Ids are either generated by Odoo or
use the original Message-Id in the case of an incoming email going through
the mail gateway.

When the mailgateway handles replies to those emails it checks their
References or In-Reply-To in order to find matching Message-Ids and find
the reply's parent. Currently it is limited to Message-Ids matching the Odoo
pattern. However if an external email began a discussion thread, references
will not hold any odoo-like pattern.

Previously to commit 0028c42136 this was hidden due to a bug when
managing private messages. This code was also managing replies to external
emails due to a probably undesired side effect.

Correct way of checking if an incoming email is a reply to a thread is to
check that References or In-Reply-To Message-Ids match some stored Message-Ids
of mail.message. They don't have to match Odoo patterN
2016-12-06 15:15:48 +01:00
Thibault Delavallée 588b6020a6 [CLEAN] mail: remove unused import 2016-12-06 15:15:48 +01:00
Darshaka Pathirana ecc6733cee [FIX] doc: remove remaining references to 9.0
Closes #14608
2016-12-06 14:58:55 +01:00
Darshaka Pathirana b3a0622b52 [CLA] signature for jkirk
cf #14608
2016-12-06 14:58:54 +01:00
Goffin Simon 45284a3f03 [FIX] sale: action_view_invoice
When clicking on button "invoices" in a SO, the invoice linked
was opened without the action in url. So when refreshing the browser,
a supplier invoice was displayed instaed of a customer invoice.

opw:695844
2016-12-06 14:56:19 +01:00
Nicolas Martinelli 9dc9a058cd [FIX] account_asset: modify asset
- Create a new assets
- Set a any gross value, any number of depreciation, and any number of
  months in period
- Set "Prorata temporis" to True!
- Save, then confirm the asset
- Post at least one of the line by clicking on the red bubble next to it
- Click on "Modify Depreciation" and choose another number of month
- Click on "modify" to confirm the modifications

The depreciation of the latest posted month is duplicated. However, the
first unposted depreciation should be the first period after the last
posted period, as it is the case for non prorata temporis assets.

opw-693081
2016-12-06 14:10:14 +01:00
Atchuthan a55a83cb61 [FIX] report: add fontawesome to print icons in report
Fontawesome icons were available in v9.0, but not in v10.0 following
refactoring.

Closes #14433
opw-694666
2016-12-06 13:24:49 +01:00
Nicolas Martinelli b67871d5c7 [FIX] account: account domain in reconciliation
In the reconciliation widget, create a counterpart line. No domain is
applied on the "Account" field regarding the company, meaning that we
can select an account from any company.

opw-694149
2016-12-06 12:41:06 +01:00
Martin Trigaux 1f3f155a05 [FIX] mail: pass the missing context
session.context no longer exists, it is session.user_context

Add the missing context in the message_fetch call. The dates in the chatter were
not formatted according the user locale.
2016-12-06 11:50:36 +01:00
Martin Trigaux 91139b483a [FIX] mail: untranslated message subtypes
The tacked messages in the chatter were parially translated.
e.g. "Lead created"
The call did not gave the user context and the subtype message was not
translated.

Closes #14589
2016-12-06 11:45:08 +01:00
Nicolas Martinelli 34981f5ad4 [FIX] project_issue_sheet: copy issue
- Create a project which handles Tasks and Issues
- Create an issue
- Book some timesheet on the issue, thanks to the tab "Timesheet"
- Go to the Timesheet application, you'll see that the time booked
  appears in the grid
- Change the time spent from the grid view.

The time added is booked on the issue, while the user doesn't expect it.

This is because the modification of a timesheet line copies an existing
line, then change the necessary values (see method `adjust_grid`).

Ideally, we should have a link module between timesheet grid and project
issue. Another solution would be some hack in the `timesheet_grid`
module to prevent `issue_id` to be copied. However, there is little to
no use of copying a timesheet line in general, so the solution chosen
should not affect the existing processes.

opw-697018
2016-12-06 11:07:25 +01:00
qdp-odoo a20d1e9256 [FIX] account: do not create the 'undistributed profits/losses' account if it is already given in the CoA 2016-12-06 10:22:00 +01:00
Balázs Palcsó 09fdda0c7a [ADD] l10n_hu: add a missing Hungarian account tax template entry
Closes #14582
2016-12-05 17:47:35 +01:00
Balázs Palcsó fa66aad703 [CLA] signature for balapal
cf #14582
2016-12-05 17:47:35 +01:00
Yannick Vaucher 97f95de89c [FIX] website_membership: wrong list of membership line for google map
Variable `membership_line_ids` was misspelled `membership_lines_ids`
Thus the list of partner returned has extra partners not filtered by search domain

Closes #13768
2016-12-05 16:58:10 +01:00
Nicolas Lempereur 83956d4c49 [IMP] mail: keep multiple spaces in chatter and chat
In chat window, a chatter and discuss, the text zone appear as a pure
text zone but is transformed later on in HTML to add mentions links and
possibly other features.

Thus, when we wrote multiple spaces or a space at the next to html tag,
with how html worked they were collpased into one (or zero).

To keep them, we need to wrap the content with `<pre />` tag or replace
spaces with `&nbsp;`.

closes #14593
opw-695535
2016-12-05 16:53:04 +01:00
Nicolas Martinelli 3ea207b5c3 [FIX] mrp: potential traceback
- Create a MO for 500 Units
- Produce 500 Units
- In the "Finished Products" tab, change the produced quantity to 450

At that point, the button "Mark As Done" doesn't appear anymore.
Therefore, we need to change the "Quantity To Produce" to 450 => This
causes a traceback because of a division by zero.

Fixes #14499
opw-695269
2016-12-05 16:50:37 +01:00
Eric Antones d6b26f1d62 [FIX] base: Catalan separator format and thousands separator
* The thousands separator does not appear by default in Catalan language. Using
it is the usual practice

Closes #14123
2016-12-05 16:43:14 +01:00
Alexis de Lattre ef8116628b [FIX] base: display the value of ir.property
For the records with type='selection' (example: "Cost Method Property")

Closes #14413
2016-12-05 16:33:56 +01:00