Commit Graph
140847 Commits
Author SHA1 Message Date
Christophe Simonis d8524aadf8 [MERGE] forward port branch saas-14 up to e854f68393 2019-08-21 11:26:41 +02:00
Christophe Simonis e854f68393 [MERGE] forward port branch 10.0 up to b058f70941 2019-08-21 11:25:05 +02:00
Simon Lejeune ea92e0b333 [REM] mrp_subcontracting
There was a first version of mrp_subcontracting at rev [1] and now
there's a second verion at rev [2]. As the second version sensibly
changed the flows and models AND we don't have the time to backport the
changes AND saas-12.3 will be released on the saas, we chose to remove
the module in saas-12.3 to not have to support both version once v13 is
released.

[1] d91db5bde6
[2] 9b6a5398df

closes odoo/odoo#35898

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-21 08:49:41 +00:00
Lucas Perais (lpe) 06a516af40 [FIX] gamification, hr_recruitment, maintenance: kankan tooltip no longer supports field tag
In v10.0, it was possible, and kinda work, to have
```
<t t-name="kanban-tooltip">
<ul class="oe_kanban_tooltip">
<li><b>Project:</b> <field name="project_id"/></li>
</ul>
</t>
```

In v11.0 onwards, this "feature" has been dropped, since in kanban records
it doesn't make much sense to a field defined/displayed that way
The right way is to call

`record.(field).(raw_)?value`

This commit adapts the only two modules still having kanban-tooltip classes in their views

OPW 2055132
related to #29802

closes odoo/odoo#35869

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-08-20 14:57:22 +00:00
Wolfgang Taferner 61eccf212b [FIX] payment_stripe: backwards compatibility IE 11
closes odoo/odoo#35944

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-08-22 08:03:10 +00:00
Jairo Llopis f2b7427fb4 [FIX] website_event_track: suggest recipient with an email
If an event track had a speaker assigned who had an email, and the
email field in the track itself was empty, Odoo was suggesting the
user to send an email to an empty recipient, making an error

Now it only suggests the email if there's one.

Fixes odoo/odoo#35941

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-22 08:05:47 +00:00
Lucas Perais (lpe) 42820c35db [FIX] website_slides: adapt youtube api widget to promise
Before this commit, the adaptation of Deferred to Promise was not well done
Hence, the change in video playing status was not handled correclty
i.e. When a video arrives to its end, the next slide or the questions should be displayed

After this commit, when a video is finished, the next slides is displayed

OPW 2052971

closes odoo/odoo#35863

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-20 13:55:48 +00:00
Nicolas Lempereur b058f70941 [FIX] web_editor: font>a colorize a change font color
If you change the color of a link with the editor without using the link
edition menu, this do not work (which might be expected), but if the
text outside the font had been colorized, the font will be applied
outside of the link only.

This is unexpected since if we have: "hello <a>cruel</a> world!", if we
select only "cruel" and change color, the change only happen to "hello"
and "world!".

With this changeset, an anchor in the ancestor prevent to use an
ancestor font tag to change color (which prevent the issue).

opw-2044551
closes #35862

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-08-20 13:48:26 +00:00
Richard Mathot e6a1ac6e64 [FIX] models: avoid Unicode error when translating that error message
Same cause, error, rationale and fix than 0ec0a4a32e

#OneCharacterPatch, reloaded

opw-2056251

closes odoo/odoo#35857

Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
2019-08-20 13:16:07 +00:00
Pierre Masereel 4a6d666246 [FIX] delivery: set carrier on order when carrier line added
When you are adding a line on your sale order that is a delivery line,
the carrier is not always set on the sale order which means that when
the carrier is not explicitly set on the sale order, the carrier won't
be set on picking created from the sale order.

When you are using the wizard on sale order, it works, but when the
carrier is selected on the e-commerce, it is not set on the sale order.

To avoid such difference in behavior, we are writing the carrier_id of
sale order in the function 'set_delivery_line' insread of the wizard and
e-commerce.

closes odoo/odoo#35855

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-08-20 12:52:05 +00:00
Romain Derie 4323008540 [FIX] website_sale_delivery: fix wrong selector + add test
Since commit e8916a817c, it was not possible anymore to go through the
ecommerce checkout when `website_sale_delivery` module was installed.

Indeed, it would raise a traceback on the confirmation step if more than one
delivery carrier would be available (different qweb if more than one carrier).

Thus, it would not be possible to click on pay now and buy the product.

This commit fixes it and improves the current test to ensure such flows are
working.

closes odoo/odoo#35577

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-08-20 12:33:15 +00:00
Christophe Simonis 121034f79a [MERGE] forward port branch 11.0 up to 1e4de19cd4 2019-08-19 14:43:31 +02:00
Christophe Simonis 1e4de19cd4 [MERGE] forward port branch saas-15 up to c43de33643 2019-08-19 13:54:40 +02:00
wan 9f22d7a445 [FIX] base: same vat with empty string vat
If partner.vat is an empty string, python evaluates it as falsy and doesn't check the remaining of the line. This makes the framework to send ["", ""] as values for the many2one to the browser instead of false.
By forcing to have True or False, this is not a problem anymore as bool() will be False, and False will result in the correct value in the read.

closes odoo/odoo#35807

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-08-19 11:35:40 +00:00
Christophe Simonis 6f55fd65da [FIX] mail: correct test adaptation to async version
Oversight of previous forward-port.
2019-08-20 10:42:44 +02:00
Alex Tuyls 60c438dfb7 [FIX] sale_coupon: performance issue with promotion programs
In case of large cart and promotion program with a discount reward
of percentage type, we are rewriting the reward order lines
multiple times while we can do all in one update.

opw-2038791

closes odoo/enterprise#5086

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>

X-port/Cherry-pick of odoo/enterprise@243e66663a
2019-08-19 19:28:48 +02:00
Christophe Simonis 20e69b3299 [FIX] stock: correctly forward-port 5b83f7214f
Oversight of previous forward-port.
2019-08-19 19:27:53 +02:00
Christophe Simonis 168e54d488 [MERGE] forward port branch 12.0 up to 32039b2ab4 2019-08-19 18:57:08 +02:00
Christophe Simonis 32039b2ab4 [FIX] test_access_rights: add _description to new test model
Oversight of previous forward-port.
2019-08-19 17:08:08 +02:00
Christophe Simonis aac8e0c960 [MERGE] forward port branch saas-11.3 up to 121034f79a 2019-08-19 16:38:30 +02:00
Christophe Simonis c43de33643 [MERGE] forward port branch saas-14 up to fa26279014 2019-08-19 12:51:26 +02:00
Christophe Simonis fa26279014 [MERGE] forward port branch 10.0 up to 59c59cd8a0 2019-08-19 12:47:56 +02:00
Julien CastiauxandHugo Adan 855447fc77 [FIX] ir_rule: invalid user context propagation
Create two models, `object` and `category`. The object have a Many2One
to the category. Override the `search` on the category so it returns a
subset of the records if a context key is present. Create an IR Rule on
object with the following pseudo-domain: `categ_id in category.search([])`.
Search on object with the context key present. Even if the context
should only be applied to category, it is applied to object too thus
there are some object missing.

When evaluating the domain of IR Rules, the current user is propagated
with the current environment context. API calls triggered by the domain
are called with the given context, possibly populating the cache with
different records than it would normally does without the context (i.e.
at `addons/point_of_sale/models/account_journal.py#L19-L23`). Following
requests do use that invalid cache thus return invalid results.

Forcing an empty context on the user used during the evaluation of the
context ensures the IR Rules are working as they should and is
future-proof (cf `load_company` v13 context key)

opw-2041667

closes #35123
closes #35125

closes odoo/odoo#35667

Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>


Co-authored-by: Hugo Adan <hugo@vauxoo.com>
2019-08-19 09:04:09 +00:00
Christophe Simonis b6deb72747 [MERGE] forward port branch 10.0 up to 2fc46a064d 2019-08-19 10:24:42 +02:00
Sapan Zaveri fe59754c52 [IMP] account: warn when invoice date is future
Before this task,
There was no warning message when invoice date is set in
future.

task-2053068

closes odoo/odoo#35796

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-08-19 06:57:29 +00:00
Christophe Simonis 51354fadb0 [MERGE] forward port branch saas-12.3 up to 50e571acf7
closes odoo/odoo#36491

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-11 09:39:33 +00:00
Florian Gilbert da6f24bb4c [FIX] account: Add 'to_check' field on account_move entry view.
This field has been removed unintentionally here: beaa30a3d1

closes odoo/odoo#36540

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-09-09 07:28:24 +00:00
Josse Colpaert 16c1abf339 [IMP] account: add method to get payments
closes odoo/odoo#36228

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-09-04 14:14:58 +00:00
Raphael Collet eef48811ff [FIX] models: callable in api.depends() sees valid _rec_name
Determine `model._rec_name` before the dependencies of the fields.  The
compute method of the automatic field `display_name` uses a callable
depends that retrieves `model._rec_name`.

closes odoo/odoo#36476

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-09 10:07:06 +00:00
Odoo Translation Bot 71cc792c94 [I18N] Update translation terms from Transifex 2019-09-08 06:21:59 +02:00
Lucas Perais (lpe) 54049c14b3 [FIX] portal: should depend on auth_signup
portal uses methods defined in auth_signup
without depending on it (probably counting on the autoinstall)

So before this commit, you could uninstall auth_signup
but every flow involving portal - making share urls - crashed

This commit adds the dependency

OPW 2064883

closes odoo/odoo#36477

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-05 12:58:58 +00:00
Olivier Colson 3405ca4d0b [FIX] account: tax lock date: check constraint when saving instead of posting
Makes 12.4 compatible with these changes, from 12.3: https://github.com/odoo/odoo/pull/36289

closes odoo/odoo#36318

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-09-02 10:24:02 +00:00
Olivier Colson 0058e12469 [IMP] account: display product in account.move.line's form view
Before that, there was no way of opening the product related to an invoice line once the invoice had been validated.

closes odoo/odoo#36336

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-09-02 13:11:22 +00:00
mgh-odoo 1086b6403c [FIX] mail: activity type "Default User" field shown twice
Also moved "Default Description" before "Scheduled Date"

Task-Id 2056407

closes odoo/odoo#35882

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-09-03 08:22:33 +00:00
Odoo Translation Bot 4af010bdec [I18N] Update translation terms from Transifex 2019-09-01 06:24:20 +02:00
Nicolas Seinlet e6ee38e89c [TYPO]
closes odoo/odoo#36258

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-30 08:07:13 +00:00
Laurent Smet 152d1f4fc7 [FIX] account: Fix some issues since account-pocalypse
1) Improve readability / performance of moves checks

The queries checking the move name & the duplicate vendor reference was complex
and unefficient for no reason.

2) Recompute amount_currency when reversing invoice

When reversing an invoice, the amount_currency wasn't recomputed even when dealing with
a refund date having another currency rate.

3) The refund must not keep the payment ref of the reverted invoice.

The payment ref is stored inside the receivable/payable line's name. However, when
duplicating the invoice to create a refund, this must be emptied until a new
payment ref will be set.

4) Reintroduce user_id field on account.move

The field user_id has been renamed to invoice_user_id. However, some mail templates
need to access the generic user_id field for multiple models.

5) Fix 'misc' Journal Entry totals

Misc journal entry must have an amount total always positive and not signed.
Furthermore, we don't know how to compute the amount_untaxed/amount_tax so don't
compute that with such entries.

6) Fix cancelling an exchange difference entry / tax cash basis entry.

When cancelling an exchange difference entry, the reconciliation is undo and then,
the exchange difference entry is reversed. Same for tax cash basis entries.

issue: https://github.com/odoo/odoo/issues/35841

7) Fix creation of cash basis entries for reversed journal entries.

When reconciling entries with one being the reverse of the another one, cash basis entries
for taxes must not be created. However, it must be the case when reconciling the reverse entry
(like refunds) with something.

issue: https://github.com/odoo/odoo/issues/35276

8) Fix matching rules ignoring the structured communication.

Since account-pocalypse, the structured communication is landing on the name of the
journal items. Then, the matching rules must consider it.

closes odoo/odoo#36062

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-08-29 13:04:55 +00:00
Odoo Translation Bot 156142caf2 [I18N] Update translation terms from Transifex 2019-08-25 06:21:10 +02:00
Laurent Smet b73789a53b [FIX] account: Fix cancelling a payment
This commit fixes a wrong condition since the new "cancel" state has been introduced in
journal entries.

issue: https://github.com/odoo/odoo/issues/35362#issuecomment-520641052

closes odoo/odoo#35911

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-08-21 11:14:33 +00:00
Laurent Smet 09f672c1a6 [FIX] account: Fix fixed tax in invoice with foreign currency
Before this commit, a fixed tax amount was incorrect in invoices in a multi-currency
environment as the amount was applied both in company's currency and in foreign currency.
In this commit, the amount is converted when dealing with a foreign currency.
2019-08-21 11:12:16 +00:00
Laurent Smet 9bd600027d [FIX] account: Fix tax computation with quantity=0
Before this commit, the tax computation was done in invoices using the balance of each base lines.
However, when dealing with python tax having sometimes an amount only dependent of the price_unit,
we need to handle the case when quantity is zero.

issue: https://github.com/odoo/odoo/issues/35358
2019-08-21 11:11:49 +00:00
Laurent Smet 1ca5c01b36 [FIX] account: Fix price_unit sign in taxes computation
Since the base in compute_all could be negative but is signed to perform the computation,
the price_unit should follow the same logic and be signed when evaluating a python tax.
Before this commit, the price_unit was equivalent to the base line balance and then, was negative
in case of a customer invoice.

E.g. For an out_invoice of 100, the price_unit is 100 but the balance is -100 for the base line.
Then, the computation is done using a base of 100 but having a sign of -1. However, when evaluating
a python tax dependent of the price_unit (here the balance), the price_unit was negative and then,
the tax amount will have a wrong sign at the end.
2019-08-21 07:03:14 +00:00
Christophe Simonis f26de445e5 [MERGE] forward port branch saas-12.3 up to 6f55fd65da 2019-08-20 12:17:04 +02:00
Hiral Bhavsar bc6accc568 [IMP] mass_mailing_sale: remove complex computation of invoices linked to mailing UTM
UTM fields are available in the invoice without sale_crm. That's why just apply
search_read on account.move instead of doing

--> search on sale order
--> map on invoice_ids which is computed
--> search_read on account.invoice.report

to get sale_invoiced_amount.

Currently, stat button 'Invoiced' is not redirecting to invoices tree
view because of wrong action and domain parameters. Thus we, set proper
action and pass valid parameter to get that invoices tree view.

Task 1919391

closes odoo/odoo#35296

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-08-19 13:23:50 +00:00
Yannick Tivisse be983c7002 [FIX] hr: Expose employee timezone on public profile
Purpose
=======

It happens a lot that we access to the employee timezone to compute
presence states, leaves, ...

Instead of sudoing all those accesses, it looks better to expose this
data in the public profile.

closes odoo/odoo#35811

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-19 12:05:19 +00:00
Fanny He f9f288cd47 [FIX] sale_timesheet: correct the context when viewing a contact's SO's tasks
When accessing a SO's tasks from Contacts (the partner_id's page), and
calling action_view_task, the active_id first corresponds to the contact's id.
Therefore, if a project.project exists with the contact's id, one can access
the SO's tasks, but otherwise, we get the error

Record does not exist or has been deleted.

(Records: [partner_id], User: ...)

Thus, if there is one corresponding project, we first update the context:
active_ids is set to project_id,
allowing access to the SO's corresponding project's tasks.
Note that the same thing is done lower:

eval_context.update({'active_id': task_projects.id})

which is too late to avoid trying to access the wrong record.

In the case where there are more than 1 corresponding projects (or if
there are no corresponding tasks), we don't have the issue.

OPW 2052559

closes odoo/odoo#35792

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-08-19 06:20:00 +00:00
Holger Brunn 024d7ebaa0 [FIX] tests: wait for chrome's cookie to be set
In some cases, the first request of a test is made before the
proper setting of the cookie. In that case, Odoo picks a new session,
leaving the request unauthenticated.

closes odoo/odoo#35780

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-08-19 07:29:44 +00:00
Odoo Online 19727047ce [I18N] Update translation terms from Transifex 2019-08-18 06:20:13 +02:00
Odoo Translation Bot 0458337bc3 [I18N] Update translation terms from Transifex 2019-08-18 03:08:13 +02:00
Nicolas Martinelli 57fef7c11c [FIX] survey: certificate of failure
- Take a quizz survey, and fail it
- Go to Answers
- Print the Certification

Even if the quizz was failed, the certification can be printed.

There is no option to prevent printing a PDF, therefore we need to print
a different template.

opw-2049481

closes odoo/odoo#35769

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-16 14:04:03 +00:00