Commit Graph
123530 Commits
Author SHA1 Message Date
Swapnesh Shah ec2b4889f9 [FIX] website_sale: Access one order to generate token
closes odoo/odoo#32032

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-03-22 04:31:49 +00:00
Fanny He 90731ad170 [FIX] hr: put accrual leave allocation start in a function
When an accrual leave is allocated to an employee,
it starts from the employee creation date.
However, companies want to create employees before they start working.
Therefore, they want to be able to change the accrual leave allocation start
to when the employee starts working.
For instance, when hr_contract is installed, we can change the
accrual leave allocation start to the date when the first contract starts.

We create the function _get_date_start_work(),
that can be overriden to allow those changes.

OPW-1939378

closes odoo/odoo#31930

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-03-18 18:45:35 +00:00
Julien Castiaux 88348f8ff9 [FIX] purchase_stock: print shipping address
When there are multiple warehouses, the shipping address must appear on
the purchase order and the RFQ.

opw-1955874

closes odoo/odoo#32230

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-29 08:37:19 +00:00
XavierDo a95756faac [FIX] bus: gc event at the end of a polling
When making a poll, an event is registered on each channel. Once
a notification is sent on a channel, only the events of the
notified channel are removed. A pointer to the event is kept
in all other channel the user subscribes to until those channel
are notified.

Since a user usually has many mail.channels but only a few active ones,
a new event and a bunch of pointers are created at each poll and
never removed.

This fix simply remove the pointers to the current event at the
end of a poll.

closes odoo/odoo#31215

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-02-28 15:49:04 +00:00
Goffin Simon 6edd699ee9 [FIX] account_check_printing: Error when clearing the currency
Steps to reproduce the bug:
- Activate multi currencies on your user
- Let's consider currency A and currency B and currency A is the one set on your company
- Create a customer invoice I with currency B
- Go on the tree view of customer invoices and select I
- Click on "Action" and select "Generate an invoice"
- On the wizard, clear the currency B

Bug: A traceback was raised because the function amount_to_text requires a currency.

opw:1958888

closes odoo/odoo#32202

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-03-28 10:45:12 +00:00
Goffin Simon 72932d7956 [FIX] mrp: Printing a BOM with a variant
Steps to reproduce the bug:
- Create a BOM for product P
- Generate variants for P: P1 and P2
- Go to BOM of P and click on Structure & Cost
- Change the current variant to P2
- Click on "Print"

Bug:

A traceback was raised because the function _get_bom expects in arguments that
product_id is an id and not a recordset.

opw:1950401

closes odoo/odoo#32128

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-03-26 12:46:02 +00:00
Nicolas Martinelli 06cd3e5510 [FIX] account: invoices and bills filtering
- Create a new Sale journal
- From the accounting dashboard, click on the name of the journal
  created

Invoices from all sale journals are shown.

The filtering performed is not sufficient: it should filter by journal.

opw-1958446

closes odoo/odoo#32166

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-27 14:15:00 +00:00
Nicolas Lempereur b2b395467f [FIX] delivery: picking weight not updated sometime
The delivery lines (move_lines) have two way to be displayed in a view:

- with move_lines (all move line of a stock.picking)
- with move_ids_without_package (same but removing packages)

But so if we write directly on move_ids_without_package we would not
trigger the stock.picking @api.depends('move_lines') _cal_weight method
thus the picking weight was not updated in some instances.

With this changeset, we adds the move_ids_without_package as depends so
on move_ids_without_package onchange the total weight should be set to
the correct weight or 0 (if move_lines is not in the view) and on write
the correct weight should be computed.

opw-1959523
closes #32157

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-27 11:43:51 +00:00
Julien CastiauxandNans Lefevre e2e27b41ad [FIX] sale: subtotal computation and display
Steps to reproduce:
- Install Accounting and Sale
- Enable the developer mode.
- Go to Settings > Users & Comp > Your user, edit to check both "Tax
Display B2B" and "Tax Display B2C" boxes.
- Go to Settings > General Settings > Accounting > Reporting, check the
"Add totals below sections" box.
- Create a sale order in the sale module, the sale order must have at
least one section with several products.
- Print the sale order. The subtotal amounts are wrong.

There are two different subtotals amount to compute, one for the
*Amount* column and one for the *Total Price*. The actual computation
did not store the two amount in different variables. Multiple template
are broken in the same way.

Fine tunning of 716ff76

Co-authored-by: Nans Lefevre <len@odoo.com>

opw-1950833

closes odoo/odoo#32148

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-03-27 13:16:56 +00:00
Jorge Pinna Puissant 9a8859cc92 [FIX] account: write off with same account as the move lines
Having two move lines to reconcile.
The debit one with a past date.
The credit one with a future date.
Have a write-off in the same account as the move lines.

Before this commit, the function that creates the write-off move lines
(_create_writeoff) returns two move lines (the write-off move line itself
and the balance move line) normally only the balance move line should be
returned. Because of this, the reconciliation is not done correctly:
the credit move line is reconciled with the write-off and the balance
line. And the debit move line is not reconciled.

Now, the function _create_writeoff returns only the balance line so the
debit move line, the credit move line and the balance line are totally
reconciled.

opw-1924973

closes odoo/odoo#32055

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-03-25 08:49:07 +00:00
Nicolas Martinelli b1ed7b4637 [FIX] repair: product change
Make sure to trigger price computation even when the UoM doesn't change.

closes odoo/odoo#32139

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-27 07:16:25 +00:00
Jorge Pinna Puissant e9c7fc0d93 [FIX] base: split _get_rendering_context to allow different models
Allowing to override the _get_rendering_context and call the new
function (_get_rendreing_context_model) with a different custom model
to render the html.

opw-1946792

closes odoo/odoo#32101

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2019-03-25 14:44:27 +00:00
Yenthe666 8527c5adab [FIX] l10n_nl: set correct VAT codes on fiscal position lines
Before this PR quite a lot of the lines on the fiscal positions
"EU landen", "Niet-EU landen" and "Installatie en Afstandsverkopen"
where mapped wrong, some of the lines even referred to another
tax percentage.

Changes:
- The tax "BTW te vorderen laag (inkopen) 9%" on the product
mapped to the tax to apply named "Inkopen import buiten EU laag 6%",
which should be "Inkopen import buiten EU laag 9%" to correctly
counterpart the taxes. All the other changes where similar,
either invalid tax rates where applied or it mapped to a wrong category.
- "Verkopen/omzet overig diensten" on the product would map to
"Installatie/afstandsverkopen buiten EU" as the VAT to apply.
This should map to "Verkopen export buiten EU".
- Added 3 accounts for Omzet NL handelsgoederen 1,
Omzet NL handelsgoederen 2 and Omzet NL handelsgoederen 3
- Mapped the 3 accounts to the fiscal position
"Installatie en Afstandsverkopen" their relevant lines.
- Removed purchase taxes from fiscal position "Installatie en Afstandsverkopen" .
- Mapped the right taxes to the three fiscal positions their VAT tabels.
- Updated .pot file to add the three extra accounts.

Closes #31403

closes odoo/odoo#32130

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-26 13:26:37 +00:00
Nans Lefebvre 0a4e67c609 [FIX] account: only put internal users as followers of vendor bills created by emails
When the pdf of a vendor bill is sent to the alias of a journal,
all the partners that match one of the email address present in the mail thread
are added as followers of the newly created record.
This is a problem since the vendors are actually not concerned by the internal
work that is done, only internal users are.
As a result they get spammed by useless emails, and complain to Christine.
It was put in commit a4df9f8c93 despite not appearing in the task description.

We filter the partners to only keep the ones that belong to internal users.

opw 1958729

closes odoo/odoo#32110

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-03-26 13:30:31 +00:00
Nicolas Martinelli a80126a12a [FIX] repair: price and UoM
- Activate multiple UoM
- Create a Repair Order
- Add a repair line ('Parts') of type 'Add', change the UoM
  => the unit price is not modified
- Add a repair fee ('Operations'), change the UoM
  => the unit price is not modified

The UoM is never taken into account.

opw-1953752

closes odoo/odoo#32127

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-26 12:38:04 +00:00
Tomas Alvarez 0215b6f682 [FIX] website_sale: use sudo to check pricelist code to avoid field groups check
closes odoo/odoo#32111

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-26 03:53:59 +00:00
Nicolas Martinelli 322a964a39 [FIX] purchase: onchange at create
When creating an invoice programmatically, make sure to retrieve the
`currency_id` field set by `_onchange_partner_id`.

opw-1951314

closes odoo/odoo#32097

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-25 13:26:41 +00:00
Nicolas Martinelli 5eb4065486 [IMP] account: onchange at create
Make the onchange calls at invoice creation deterministic and
extendable.

opw-1951314
2019-03-25 13:16:14 +00:00
Jorge Pinna Puissant d8b45d24aa [FIX] account,payment: instant payment post process
Fine-tuning of commit dd8494313f

closes odoo/odoo#32124

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-03-26 11:10:52 +00:00
Goffin Simon 660cd529ad [FIX] product: Issues with product configurator with single attribute values
When creating several attribute lines for the same attribute, the function _update_product_template_attribute_values
in model 'product.template.attribute.line' only kept the product.template.attribute.value records of the last
created line. So it generated issues with the product configurator because no value was founded for certain attribute line
in function _get_possible_combinations defined in model 'product.template'.

Now it's forbidden to create several attribute lines for the same attribute.

opw:1950786

closes odoo/odoo#32086

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-03-26 10:45:28 +00:00
Nicolas Martinelli f5e99060b6 [FIX] stock: discard scrap
- Process a WO (e.g. 'Manual Assembly' from the demo data)
- Create a scrap for component 'Drawer Black'
- A new wizard appears:
  'The product XXX is not available in sufficient quantity'
- Click on 'Discard'

A scrap is created in draft, but it cannot be canceled.

The scrap shouldn't have been created in a first place, but this cannot
be changed in stable. Therefore, we delete it.

opw-1946254

closes odoo/odoo#32122

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-26 09:32:43 +00:00
Lucas Perais (lpe) 80b900ee57 [FIX] account: reconciliation matching rule div by zero
Do a MISC operation representing a payment
revert it

Do a statement line for that amount

Click on "reconcile" on the bank journal

Before this commit there was a Division By Zero traceback
This was because the bank account line had a zero amount_residual
due to its reversion
while the statement line was negative.

After this commit, for liquidity lines, we take the total amount instead of the residual
Because a reverted payment line can always be associated with a statement

OPW 1947362
courtesy of @smetl (las@odoo.com) for the fix

closes odoo/odoo#32105

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-03-26 08:35:51 +00:00
Nicolas Martinelli b8950ab49a [FIX] purchase: currency of supplierinfo
Set the currency of the supplier info according to the currency set on
the partner.

opw-1951314

closes odoo/odoo#32098

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-26 08:02:29 +00:00
Christophe Simonis 11b1e12cde [MERGE] forward port branch saas-11.3 up to e9068c290b 2019-03-25 18:28:16 +01:00
Christophe Simonis e9068c290b [MERGE] forward port branch 11.0 up to 0196a6feb5 2019-03-25 16:47:05 +01:00
Martin Trigaux 57e6346442 [FIX] web: format date without locale
moment().locale('en').format('YYYY-MM-DD')
"2019-03-25"
moment().locale('ar').format('YYYY-MM-DD')
"٢٠١٩-٠٣-٢٥"
moment().locale('my').format('YYYY-MM-DD')
"၂၀၁၉-၀၃-၂၅"

Was rejected as a valid bug at moment/moment#4448
Apply the same logic than 109b319d64

Fixes odoo/odoo#32081

closes odoo/odoo#32102

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-25 14:42:28 +00:00
Isabel Esparza 6155210d12 [FIX] crm: states
Onchange to show only the states of an especific country in
opportunities.

Closes #31993
opw-1958170

closes odoo/odoo#32099

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-25 14:13:34 +00:00
Christophe Simonis 0196a6feb5 [MERGE] forward port branch saas-15 up to 6cd6d1d468 2019-03-25 15:12:00 +01:00
Can Tecim a39b1f4595 [ADD] l10n_tr: add provinces of Turkey
closes odoo/odoo#31592

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-25 12:38:05 +00:00
Christophe Simonis 6cd6d1d468 [MERGE] forward port branch saas-14 up to 3c7be1e88f 2019-03-25 13:32:17 +01:00
Christophe Simonis 3c7be1e88f [MERGE] forward port branch 10.0 up to a95811eee2 2019-03-25 13:30:34 +01:00
Xavier Dubuc 46d22fbd4f [FIX] product: template kanban view perf
When displaying product template list in kanban mode, all the variants
of the product template are loaded but aren't used at all. This causes a
perf issue when loaded product templates have a lot of variants.

This commit removes the field `product_variant_ids` from view
`product_template_kanban_view` to avoid that perf issue.

opw 1951369

closes odoo/odoo#32048

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-25 11:44:55 +00:00
Nicolas Lempereur 2a89f0c7f8 [REV] "[FIX] website: language prefixed URL on website"
This reverts commit 5324284f56
This reverts commit ad826f56ba.

If for example we had in a template:

 <script type="text/javascript" src="/payment_stripe/static/src/js/stripe.js"></script>

it has been reproduced to be gotten as:

 <script type="text/javascript" src="/de_DE/payment_stripe/static/src/js/stripe.js"></script>

which is unexpected and could cause an error.
closes #32090

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-25 10:53:25 +00:00
Colinliz a4f9b48667 [CLA] add Colinliz to Inspur CCLA
closes odoo/odoo#32076

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-25 10:02:08 +00:00
Nicolas Martinelli d3bd48d67b [FIX] stock: has_tracking
The field `has_tracking` should be read-only, there is no reason to make
it writeable.

opw-1958266

closes odoo/odoo#32080

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-25 08:24:01 +00:00
Odoo Translation Bot fa12433867 [I18N] Update translation terms from Transifex 2019-03-24 03:11:51 +01:00
Nicolas Lempereur ad826f56ba [FIX] http_routing: ignore # when checking multilang URL
With 953a693df when a route is not found we assume it is a website.page
that can be multilang.

But with #31792 we should once again prefix URL by the language if
necessary.

The combination of the two cause issue when an url like `/web#home` is
tested since we do not take `#` into account, we check if the route is
multilang but no route `/web#home` is found => so we get
`/fr_FR/web#home`.

With this fix, `#fragment` is not taken into account when searching
route.

related to #31792
related to opw-1922051
closes #32059

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-22 16:51:09 +00:00
Nicolas Lempereur 5324284f56 [FIX] website: language prefixed URL on website
In 10.0 and before, if we were eg. on website page /fr_FR/contact, if
`fr_FR` language (french) is installed and not the default website
language we would have all URL towards translated content (route with
multilang=True) prefixed with /fr_FR/ (the language code).

With 9cd982bcc some improvments were done to CDN but this also breaks
language prefixing, so this cause an unecessary redirect:

- we are on /fr_FR/contact and click on "Shop"
- we go to /shop
- odoo redirects US /fr_FR/shop

With this PR, URLs are prefixed with language once again.

note: the added test is hackish but the function tested depends on a lot
of odoo.http things that are hard to use for test (request.render,
request.context, request.httpreqest).

opw-1922051
closes #31792

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-22 16:14:09 +00:00
Christophe Simonis 3a0bedd655 [MERGE] forward port branch saas-15 up to 48e4c18fc4 2019-03-22 16:26:33 +01:00
Christophe Simonis 48e4c18fc4 [MERGE] forward port branch saas-14 up to cded89b531 2019-03-22 13:26:19 +01:00
Christophe Simonis cded89b531 [MERGE] forward port branch 10.0 up to f1c72ee8ee 2019-03-22 13:25:55 +01:00
Nicolas Lempereur a11147a091 [FIX] payment_stripe: regression 98fe5054c2
opw-1939323

closes odoo/odoo#32026

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-21 16:51:18 +00:00
Nicolas Martinelli 3a76d45706 [FIX] crm_enterprise: prorated revenue
- Create 2 `crm.lead`:
  Expected Revenue: 100; Probability: 99 %
  Expected Revenue: 200; Probability: 0 %
- Go to Reporting > Sales Channels

The amount displayed next to 'Open Opportunities' is 148.5 is instead of
99.

opw-1947975

closes odoo/odoo#32011

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-21 14:33:36 +00:00
Nicolas Martinelli 723c657dd3 [FIX] website_quote: amount comparison
The price comparison can be incorrect because of float representation
differences. We make the template more robust against this problem.

opw-1945541

closes odoo/odoo#32012

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-21 13:34:55 +00:00
Goffin Simon 02b28bbc39 [FIX] stock_picking_barch: Picking Barcodes missing on batch pickings report
The picking barcode must be displayed in the batch picking report like in 11.0

opw:1958092

closes odoo/odoo#32004

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-03-21 09:39:42 +00:00
Odoo Translation Bot 7e9a13a64d [I18N] Update translation terms from Transifex 2019-03-24 01:24:01 +01:00
qsm-odoo aed56c9bda [FIX] website_forum: BS4, restore edit profile page
+ Add some spacing between the navbar and the forum layout

closes odoo/odoo#32060

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-03-22 16:55:29 +00:00
Martin Trigaux 48143116e9 [FIX] base: ignore empty translatable attribute
Complete cd4080839f
  <span class="fa fa-globe" title="Title stuff"/>
is not correctly extracted but
  <span class="fa fa-globe" title=""/>
was also extracted while there is no content

Check the size of the content too

Similar content is present on odoo.com website and should not be translatable
on Transifex

closes odoo/odoo#32018

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-21 15:38:56 +00:00
Toufik Ben Jaa 4a13d5d1f5 [FIX] auth_signup: typo in invitation mail
closes odoo/odoo#32049

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-03-22 13:03:12 +00:00
Nicolas Vannieuwerburgh 78e8634cf5 [DOC] update upgrade service documentation
- Update active target versions
 - document `skip_test` endpoint
 - use `requests` in python snippets<Paste>

closes odoo/odoo#31071

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-22 13:06:16 +00:00