Commit Graph
103690 Commits
Author SHA1 Message Date
Goffin Simon ec7f88c334 [FIX] account_asset: Access error with shared product with deferred revenue
Steps to reproduce the bug:
-Let's consider a multicompany environment with company A and B
-Let's consider a shared product P for A and B
-P has a deferred revenue type D set on it
-D is defined in A
-Let's consider a user U in company B
-U creates a SO with P and try to generate the invoice

Bug:

A access error was raised because U is not allowed to see D and
D is needed to genrate the invoice.

opw:1825944
2018-04-09 14:47:31 +02:00
Goffin Simon 026781ec3e [FIX] account: Validating a statement with old posted moves
When validating a statement with old posted moves, the lock date
was checked by function, _check_lock_date and then it was impossible
to validate the statement even if all the moves were already posted.

Backport of this commit: 86a0d31251

opw:1830804
2018-04-09 14:33:29 +02:00
Romain Derie 27162b0e73 [FIX] website_blog: optimize crawler prevention
Commit d39856db prevents crawler to crawl and index blog tag URL which could
lead to possibly millions of URLs combinaison.

Still, it would crawl (but not index) second level of tags combinaison.

This commit ensure that crawling is prevented when already one tag on the URL.
2018-04-05 17:40:30 +02:00
Romain Derie d39856dbe8 [FIX] website_blog: prevent crawler on multiple blog tags page
Before this commit:
If a blog had multiple tags on the page, the crawler would click on every one
of them one after another until every tags combination got crawled.
With a lot of tags, this could result in million of URLs.

Now, we prevent URLs with more than one tag to be crawled.

Eg: With tags 'A', 'B', C':
/A
/A/B
/A/C
/A/B/C
/A/C/B

/B
/B/A
/B/C
/B/A/C
/B/C/A

/C
/C/A
/C/B
/C/A/B
/C/B/A
2018-04-05 16:55:58 +02:00
thomas-tankengine eaf54656fc [FIX] l10n_fr_pos_cert: set decorator on unlink
As unlink from models is still written in old API, needs to set the decorator to
avoid an error when trying to delete a bank statement

Closes #23999
2018-04-04 16:31:49 +02:00
tlemaire 7d2f082d80 [CLA] signature for Thomas Lemaire
Done at #23999
2018-04-04 16:31:48 +02:00
Denis Vermylen (dve) 9d95abd35c [FIX] theme_*: restore category to theme
category was changed to "Website" so it'd appear under the website
category in the store, but it needs to be "Theme" otherwise it doesn't
appear in the "Choose your theme" menu after installing website.

This is a backport of 10.0 https://github.com/odoo/odoo/commit/3d53a740

Without extra themes, the "Choose your theme" would be empty.

fixes #21898
opw-1802936
closes #24042
2018-04-04 16:18:29 +02:00
Bogdan Lisnenko df3192ef87 [FIX] l10n_ca: fixed account type in template
Canadian chart of account template contained incorrect account types for Tax receivable and Tax to pay.
This was fixed. Related issue #8934
2018-04-04 15:46:51 +02:00
mreficent bcad465c93 [FIX] purchase & stock_dropshipping: fix some tests
Related to commit https://github.com/odoo/odoo/commit/0e881fcd3a5671c4fe84b2a47c9d3611e4b823a1
2018-04-04 15:45:52 +02:00
Nicolas Lempereur cbff414cea [FIX] marketing_campaign: traceback on install 9.0
When installed, marketing_campaign shows the root "Marketing" menu by
default but this menu is not an action and just contain a
"Configuration" submenu without action as well.

Thus in community we got on a page without content, and on enterprise we
got a JS error.

note: only happen in 9.0

fixes #21898
opw-1802936
closes #24026
2018-04-04 09:59:37 +02:00
Priyanka Kakadiya d768964a37 [FIX] account_voucher: journal entry creation in multi-currency
When creating sales/purchase receipt for a journal having a secondary currency, an error was raised as the amount_currency had the wrong sign (compared to the debit/credit).

Was Issue #1819396. Was PR #23768
2018-04-03 09:32:43 +02:00
Odoo Translation Bot 89c46e7da6 [I18N] Update translation terms from Transifex 2018-04-01 02:39:07 +02:00
Laurent Smet 1631889e91 [ADD] account_cash_basis_base_account: add module to change the base amount account in tax cash basis entries
To be able to retrieve the base amount of cash basis taxes lines, additional journal items are created for the base as well in the journal entry generated by the payment.
However, these additional journal items debitting and creditting the same account are considered as pollution in reports.

This module and hook allow to move these additional lines to an another account, if needed.

    -task: https://www.odoo.com/web#id=35605&view_type=form&model=project.task&action=333&active_id=967&menu_id=4720
    Was PR #23349
2018-03-29 18:03:32 +02:00
Yenthe V.G 97fc813a1a [FIX] account: fix performance issue with check_lock_date 2018-03-28 15:02:47 +02:00
Goffin Simon 2e3b249723 [FIX] stock_account: Wrong decorator
The function _get_anglo_saxon_price_unit using a record set and a model.
2018-03-28 09:26:55 +02:00
Christophe Simonis f36f1ceccf [FIX] base: avoid duplicated translations when possible
When modifying a translatable record, we try to keep close translations
However, we do not need to do it if there is already a translation for
the matched term.
2018-03-23 15:40:49 +01:00
Ward Marissen 2c5fe07fc7 [FIX] website_portal: Keep country changes
When a portal user changes his account details and presses the 'Save' button
when a mandatory field is not set, the selected country will be reset even when
the user did change the country in the form. This fix prevents this from
happening and leads to an improvement for the end user.

This commit closes #22439
2018-03-21 11:31:27 +01:00
Jairo Llopis 6bd3bae04e [FIX] mass_mailing: domain translation
As Admin:
- Set up 2 languages for the installation, e.g. English and French
- Admin language is English, Demo language is French
- Create a `res.partner.category` named 'Test English'
- Assign the category to a newly created partner
- Create a French translation for 'Test English', e.g. 'Test Francais'

As Demo:
- Create a Mass Mailing
- Select a custom domain: ('category_id', '=', 'Test Francais') => it
  should match one partner
- Save and validate

Now either:
- manually run the scheduled action "Process Mass Mailing Queue" as
  Admin
- wait for the cron to process the mass mailing

No mail will be sent since the domain will be evaluated in the Admin
language, i.e. English. Indeed, the domain
`('category_id', '=', 'Test Francais')` does not match any record in
English.

The solution/workaround is to use the language of the last user who wrote
on the mass mailing.

Closes #20906, Closes #15467, Closes #15445

opw-778922
2018-03-20 13:48:49 +01:00
Nicolas Martinelli 407b85e329 [FIX] product: default quantity on pricelist item
- Create a new pricelist for a new currency
- Set the 'Sale Price' option to 'A single sale price per product', so
  that the user cannot see the pricelist details
- Sell 0.5 unit of the product with the new pricelist

The pricelist is not correctly applied.

This is because the default minimum quantity is 1. Once the user is
selling less than 1 unit, the pricelist is not applied.

opw-1825353
2018-03-20 11:38:24 +01:00
Andreas Perhab 444e2a4ed0 [FIX] doc: correct link to nodejs download
Closes #23733
2018-03-19 17:05:30 +01:00
Andreas Perhab 45faa90732 [CLA] signature for bigbear3001
Done at #23733
2018-03-19 17:05:29 +01:00
Martin Trigaux 9fd5df4305 [FIX] survey: add missing groups
Survey Users have a correct record rule but portal and employee had no rule,
being able to read more records than a Survey User

Closes #23675
2018-03-16 13:58:25 +01:00
Romain Derie 2b5bb95d43 [FIX] website: make 'Optimize SEO' working again (for empty fields)
This commit https://github.com/odoo/odoo/commit/965f49201812cc3cca319a3b5b93331272dd2288 removed empty meta-description and meta-keywords from
the DOM for SEO audit reasons (these tags when empty are considered as
duplicates at a SEO point of view).

By doing so it prevent the 'Optimize SEO' to work correctly since it can't
retrieve the DOM elements that are used to store the user modifications until
he saves.

Now, even when these meta-tags are empty, we display them to people having the
rights to 'Optimize SEO'.

This closes #23659
2018-03-15 15:03:34 +01:00
Yannick Tivisse 1663133873 [FIX] purchase: Don't auto subscribe recipients on mail composers
Purpose
=======

During the refactoring of the purchase module something went wrong when overriding the 'send_mail' method.

The 'mail_post_autofollow' key should have been set into the context only for the purchase orders model.

See: https://github.com/odoo/odoo/commit/cb01be2#diff-fe8587929089e5fdb6c75687011b1c7eR822
2018-03-14 16:09:57 +01:00
Laurent Smet f1608829a1 [FIX] account: add missing constrains dependencies
Create a move line having:

amount_currency = 1000
debit = 0
credit = 1000

The error is raised, it's ok.

Now, create a move line having:

amount_currency = 1000
debit = 1000
credit = 0

Then save, edit and write:

debit = 0
credit = 1000

No error raised, it's wrong!

-opw 1818714
2018-03-13 16:55:36 +01:00
Olivier Colson 7c6da3e076 [FIX] account: display partial payments in overdue report
Before that, partial payments on open invoices were ignored by the query, due to the fact we used checked "reconciled=false" instead of "full_reconcile_id is not null".
2018-03-09 14:14:54 +01:00
qdp-odoo 8b2c25f575 [FIX] account: payment lines of invoices selection
The payment lines shown in the payment widget on invoices, should only list reconciliation made towards the lines sharing the same account as the invoice/bill. Previously, if a tax or an invoice line was using another account set reconciliable, any payment made against this account would be shown in the payment widget, which is wrong.

OPW: 1805968
2018-03-08 15:16:19 +01:00
Christophe Simonis b5da9d65ae [MERGE] forward port branch saas-6 up to f48b754cef 2018-03-08 12:40:38 +01:00
Denis Ledoux f48b754cef [FIX] membership: missing triggers to recompute membership dates
When a membership line has its dates changed
(date_from, date_to, date_cancel)

The membership start/stop dates on the member
(res.partner) were not changed accordigly.

opw-1823981
2018-03-08 12:34:33 +01:00
Denis Ledoux 2f46f3bdb2 [FIX] hr_payroll: generate payslips sets the employee company
In a multi-company environment,
if a user in company A
created a Payslips batch for an employee in the company B
and used the `generate payslips` button,
the created payslip was set with the user company (A) while
it must be the employee company (B).

opw-1820138
2018-03-07 16:16:52 +01:00
Christophe Monniez 9cf9938f04 [CLA][FIX] fix encoding of a CLA that was in ISO8859-1
In a near future (I hope), runbot will reject CLA that are not UTF-8
encoded.
2018-03-07 10:32:52 +01:00
Christophe Simonis 4aea19d9e8 [FIX] sale_crm,crm: handle timezone in dashboard
Complete parent commit by correcting overwritten method.

Also use existing method to retrive date depending on tz in context.
2018-03-06 11:23:46 +01:00
Lucas Perais (lpe) 31ad2aa31e [FIX] crm: avoid timezone date change to mess with dashboard stats
Have your OS be in Vancouver with time = 15:59:00
We are on day X
Have a next activity on a lead, scheduled for today
At 15:59:00 the next activity is not overdue

Before this commit:
Past 16:00:00 the next activity becomes overdue
This is because 16:00:00 is 00:00:00 in UTC (+8 hours)
And the next activity is scheduled for day X
But in UTC, we just passed at day X+1
Hence, the next activity being overdue

After this commit:
The next activity is not overdue, since we are actually on day X

OPW 1815323
2018-03-06 08:58:06 +01:00
qdp-odoo 6deed451ee [FIX] account: fix the runbot after commit 0e881fcd3a
The previous commit forbids to change the currency of a company having accounting entries, but there are some created by demo data and some tests were trying to set a different currency (to set up a fix environment). So in order to allow that in tests, we do it via a SQL query directly
2018-03-05 17:39:10 +01:00
qdp-odoo 0e881fcd3a [FIX] account: forbid the change of currency_id if the accounting app has already been used 2018-03-05 14:50:22 +01:00
qsm-odoo 80f97fbd19 [FIX] website_slides: load viewer for app's iframes only
The website_slides JS was working on all iframe in all pages while it
should only affect its own ones, which contains a PDF document.
2018-03-02 18:13:22 +01:00
qdp-odoo b8824913a7 [FIX] account: fix _amount_residual() dependencies.
The computation of residual amounts on account.move.line does not use account_id.currency_id... and should not. Never.
The previous implementation was thus stupidly recomputing the amount_residual fields on all journal entries of an account as soon as its currency field was touched, for nothing.
2018-03-02 14:45:15 +01:00
tbe-odoo d4ec6b75ac [FIX] yaml tests: Allow use of context inside context evaluation 2018-03-01 11:03:40 +01:00
Odoo Translation Bot fd032df4d1 [I18N] Update translation terms from Transifex 2018-03-01 02:39:27 +01:00
Olivier Colson d1377650da [FIX] account: prevent the user from assigning to an account a tax belonging to another company than the one the account is linked to. 2018-02-28 15:27:48 +01:00
Olivier Colson 239f4fec29 [FIX] account: When modifying the currency or company of a bank journal, also set it on the related res.partner.bank (if set)
See issue https://github.com/odoo/odoo/issues/22980
2018-02-28 11:39:05 +01:00
Lucas Perais (lpe) b6d4cd5deb [FIX] account: reconcile on move reversal
Make an invoice for partner X
Make a payment from partner X (not using the register payment button)
On the invoice, you'll see your payment proposal

Now, reverse the move of the payment

Before this commit:
On the invoice you *still have* the payment proposal
This is because nothing reconciled the reversed entries with the original ones when they were created

After this commit:
The reversed moves are reconciled one on one with their original counterparts
And the original payment doesn't show up anymore on the invoice's proposal

OPW 1816462
OPW 1816641
2018-02-28 09:08:38 +01:00
Olivier Sarrat f620e78301 [FIX] doc: remove readonly as button possible attrs
According to #13264, setting a button as readonly is not working
Remove from the documentation

Closes #23114
2018-02-27 17:54:56 +01:00
Jairo Llopis 77db32edf2 [FIX] base: do not force creating localhost SMTP server
Do no recreate the record if it was removed for any reason

Closes #23285
2018-02-27 15:07:08 +01:00
Patrick Tombez f435bc4fe9 [CLA] adds p-tombez to camptocamp's CLA
Closes #23329
2018-02-26 16:36:29 +01:00
qsm-odoo 216d73d727 [FIX] website_slides: fix slide loading (function call with wrong this)
Strangelly, this worked in 9.0 as the `this` element refers to the
`window` which also contains the `$` function. This may still be
wrong in some cases though, so it is fixed here (even if reported for
10.0).

opw-(1)817789
2018-02-23 13:37:00 +01:00
Christophe Monniez cd21ea414e [FIX] packaging: include missing files needed for tests
The test_mimetypes and base_import modules need various files for their
tests. Before this commit some of those files (.ods, .odt, .xlsx, .docx,
.zip) were not included in the packages.

Fixes #22778
2018-02-22 10:22:42 +01:00
Christophe Simonis 4432e1d5c3 [FIX] project: do not reset task's partner when changing project if project is not linked to a specific partner 2018-02-21 17:26:16 +01:00
Swapnesh Shah d6174dd226 [Fix]mrp: Removed unused copy_data method 2018-02-21 15:55:08 +01:00
Romain Derie 2120e667b9 [FIX] website_sale: variants view, currency price and price diff
Before this commit:
1. When enabling 'List View of Variants' on a product page, it would not
   replace the variant normal view as it should since the code being replaced
   is included in the code replacing it.
2.The badge specifying the price difference between the variance and the
  product base price would be calculated by taking the price_extra of the
  variance attribute and converting it in the user currency which was not
  correct if a pricelist was set on the product variant because the price diff
  would then be (the variant price set on the pricelist) - (product base price)
  Note: this is about the 'List View of Variants' mode, not the normal mode
        which list variant attribute and not variant itself
3. The strikethrough amount was not in the user currency

Step to reproduce:
  - Enable variants & pricelists
  - Enable multi-currency and activate 'COP' as second currency (you may want
    to change the currency symbol on edit mode since it is also '$')
  - Go to iPad Retina Display product page in shop
  - Enable 'List View of Variants' in 'Customize'
  - Both Variants selection mode are visible (bug 1)
  - The third variant shows '+$ 50.40' which is the diff between the
    strikethrough prices (in fact the sum of the price_extra of the product
    variant attributes, +50,40 on the 32GO attribute in this case)
    It should show '+$ 40.32' since the price change from $600 to $640.32.
    This is bug n°2
  - Change Public Pricelist currency from USD to COP
  - Back on iPad page, change between the 3 product variants, you will see
    the $ price strikedthrough instead of the COP one:
    Strikedthrough: 750 (it should be 1 714 491,47)
    Price: 1 371 593,17
    This is bug 3
  - You can notice the bug n°2 being more visible since it shows
    '+$ 115 213,83' instead of '+ 92 171.07'
  - Remove the iPad Retina from Public Pricelist and add iPad Retina 32Go
    variant to it with a fix price of $1 000 000.
  - '32Gb, 2.4GHz, White' variant cost $1 000 000 but shows '+ 115 213.83'
    instead of '- 714 491.47' since the base price of Retina is
    '1 714 491.47'.
  - You can play with the pricelist price for this variant up and down, the
    diff price shown in the badge will always be 115 213.83 since it will
    always calculate it by summing all the variant's attribute price_extra
    and then converting it to the user currency.

This closes #14094, closes #22553
2018-02-21 12:18:56 +01:00