Commit Graph
135226 Commits
Author SHA1 Message Date
Aurélien Warnon f4803d548b [FIX] survey: fix survey timer related issues
This commit fixes timer related issues on survey flows, for both regulars
surveys and survey sessions.
The timer was unreliable in its completion by a whole second, which had not a
big impact at the user level but could make some tests fail (randomly).

Side changes from this commit:
- Reduced delays in the survey session tests to speed up testing
- Removed some timer flickering on survey views

LINKS

Task 2230526
Runbot error ID 535

closes odoo/odoo#49178

X-original-commit: 15c72aec71d42624685fb0fc9df25279c7855310
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-04-08 07:33:14 +00:00
Sébastien Mottet (oms) e3b5b20b39 [IMP] website_[profile|forum]: show filtering forum on user profile page
- A tag has been added next to the title of each tab in the profile when the user come from a specific forum. The goal is to indicate to the user that the displayed content is specific to a given forum. The tag can be clicked by the user to remove the applied filter.
- Change label in edit profile page from "real name" to "name"
Task Id: 2214425

closes odoo/odoo#48665

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-04-08 07:21:48 +00:00
Nicolas Lempereur dbb0222d63 [FIX] {website_,}sale: no salesperson better than customer
Before 13.0, when there is no salesperson on the customer or company or
website, when a ecommerce sale order is done we get the OdooBot as
salesperson because we update partner on sale order in superuser.

In 13.0, since superuser doesn't change UID, the salesperson will be
assigned to "Public User" or the customer that create this order.

opw-2232201
closes #49141

closes odoo/odoo#49161

X-original-commit: 0b6a2569920b6584652c39b3465998649fe305b4
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-04-07 14:51:40 +00:00
Nicolas Martinelli 4fc45fce2c [FIX] sale_stock: missing dependency
Following #48718

opw-2224335

closes odoo/odoo#49162

X-original-commit: e69c080d6b07578bc162e134d2e3b63335d23800
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-07 14:52:56 +00:00
nje-odoo 0d007f24e6 [IMP] l10n_syscohada : update chart of account to cover a lot of african countries.
Task - 1906494

closes odoo/odoo#49099

closes odoo/odoo#49157

X-original-commit: 25121c7aec6c297e45107dee2982666e9dae4929
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-04-07 14:11:02 +00:00
Hardik Prajapati bc792b225b [FIX] hr_holidays: Fix access error on leave allocation with multi-company
Current Behaviour:
As Admin:
- Install timeoff and enable Multi company
- Create new company and switch to that company
- Go to timeoff > Managers > All > Allocations > Create a record
An AccessError is raised from `_onchange_type` because it try to
access `employee_ids[:1].id` and it may gives employee of another company.

Expected Behaviour:

After this commit, it will not raise the AccessError. if employee of
that company is exist then and then set on leave allocation.
so we have already compute field `employee_id`, it will gives employee
of current company.

closes odoo/odoo#49120

Taskid: 2179571
Closes: #45381
X-original-commit: 73b3d11a0b443116ce91d889397c6d85a13ca1eb
Related: odoo/enterprise#9712
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-04-07 10:03:01 +00:00
Nicolas Martinelli 42690cb4da [FIX] website_profile: fallback if missing kwargs
Avoid casting `None` to integer.

opw-2231620

closes odoo/odoo#49136

X-original-commit: d0eb912242ba0932ce8c56cf625775cb50f1526a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-07 12:17:00 +00:00
Victor Feyens 57eb964182 [IMP] base: document all field types.
closes odoo/odoo#49135

X-original-commit: cc653d3f1a49e2b7b2cc0ec833097bd7cf3528a1
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-04-07 12:11:57 +00:00
Lavish Chhatwani a0348ba3bf [FIX] website_slides: fix right panel alignment issue
There is an alignment issue while browsing courses page in Leaderboard and
Latest achievements panel.

In this commit we simply fix it with no-gutters to have all items aligned
properly.

TaskID - 2227683

closes odoo/odoo#49125

X-original-commit: 84270b8f542313235a35fc0449600a8ff5dc8785
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-04-07 10:21:55 +00:00
Loan (lse) b2e6784c69 [FIX] point_of_sale: wrong stock valuation entry
Before this commit:
When a PoS session is closed in anglosaxon accounting with real time stock valuation, the stock moves linked to PoS orders are used to create the stock valuation entry.
When an order is composed of only products of type 'service', there are no picking linked to the order, and so the entry is created with all stock moves having no picking_id.

After this commit:
To avoid this problem, we are checking that the PoS order has a picking before looking for stock moves.

OPW-2206625

closes odoo/odoo#49117

X-original-commit: 0386e1f099bf42a59a79febfa06906dd76bd62e2
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-04-07 09:43:25 +00:00
Raphael Collet 1dc3c0d1a8 [FIX] base: use a dummy "user groups view" during install
While installing a module on an existing database, the modification of
groups should reset the `base.user_groups_view` to a dummy view in order
to validate user views.  The `user_groups_view` is set to its "right"
value at the end of the installation.

closes odoo/odoo#49114

X-original-commit: 071bd77944484bad6f2c0cb9a7a98785dcc693c6
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-04-07 09:25:00 +00:00
Sébastien Mottet (oms) 00404541e0 [IMP] mass_mailing: add minor improvements to views and reporting
Improve the mailing.trace.report search view to help users find their statistics based on specific campaigns, and added some minor changes to mailing views

- Rename "mass mail campaign" to "mailing campaign"
- Rename "create a mass mailing list" to "create a mailing list"
- Add sum footer on bounce
- Add mailing and campaign field to reporting search view
- Hide campaign field in search views when campaign option is not activated

Task ID 2210331

closes odoo/odoo#48711

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-04-02 07:33:25 +00:00
Krupal Oza 3287c28a0e [IMP] mass_mailing{_sms}: allow switching mail server in sent mailing
Currently, users can't switch Outgoing Mail Server once the mailing has been
sent. This might cause issue some situation. For example, the user has two
Email Servers. He tries sending with the first server and something is wrong
then emails couldn't be sent. So in this case user can not edit the mail
server and instead has to create another mailing with second working server.

This commit improves the behavior by removing the readonly attr on
`Mail Server` field of mass mailing.

Task-Id : 2223141
Closes  : #48256

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-30 10:26:54 +00:00
Nicolas Martinelli 5c97602c3f [FIX] point_of_sale: fixed tax price
- Create a tax:
  Fixed price: 0.355
  Included in price
- Assign the tax to product P
- Create a POS order with P and a price 0, pay by bank
- Create a POS order with P and a price 10, pay by bank
- Close the POS session.

The following entry is created:
                      D           C
Tax Received       0.01        0.00
Product Sales      0.00        9.65
Product Sales      0.36        0.00
Receivable        10.00        0.00

Several issues:
- the entry is posted and unbalanced: covered in #48484
- rounding of 0.355 was either 0.36 or 0.35: to fix one day... [1]
- the tax received of 0.36 for the POS order of 0 is booked on the debit
  rather than on credit, leading to a difference 0.01.

This happens because the taxes amounts for the POS order of 10 are
positive, while they should be negative for a sale as done in [2].

We set the amounts as negative as done for incoming invoices, and adapt
the tax line creation accordingly.

[1] The use case is weird: a fixed price of 0.355 while we only have 2
digits in the currency?
[2] https://github.com/odoo/odoo/blob/e415cffa2ffb3fe4b5f0e32bd96b3433387a95e3/addons/account/models/account_move.py#L461

opw-2168096

closes odoo/odoo#49104

X-original-commit: 5df8ed72d03de635f3c38ce59c1b3e9c9ce51ed2
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-07 07:54:38 +00:00
William Henrotin b6c629922d [FIX] stock,mrp: change procure method at cancellation
Usecase : sell a mto/manufacture product. Confirm the sale order.
Cancel the delivery and the production then
duplicate the delivery.
    - if the delivery was cancelled before the production, another
    production is created.
    - if the delivery was cancelled after the production, no other
    production is created.

In the second case, the production cancellation will reset the procure
method of the delivery. The duplication will not trigger the mto
procurement.

This commit will override the procure method of each cancelled moves and
set it to `make_to_stock'. This way, we have the same behavior independently of the flow.

Task : 2212125

closes odoo/odoo#48366

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-26 13:00:26 +00:00
Richard Mathot a6d38439d5 [REV] payment_sips: 9372ff3ac010bd3428eb866ddd3ecfaf939127c4
Python 3.7 is required for function datetime.datetime.fromisoformat to
work.
Ref: https://docs.python.org/3.7/library/datetime.html?highlight=fromisoformat#datetime.datetime.fromisoformat

This is a temporary revert, to avoid rejecting perfectly valid
transactions.

Ref: https://github.com/odoo/odoo/pull/48581
opw-2179123

closes odoo/odoo#49091

X-original-commit: dedac4efd0872bab71e06796f5a3158e2cf7bf15
Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
2020-04-06 16:50:56 +00:00
Victor Feyens 5199d45760 [FIX] mrp: forgotten create decorator
Followup of
https://github.com/odoo/odoo/commit/58df6c86e06304b2c5f020e0fb93988e9e388fe0.

By default, the create, when not specified as `api.model`, supports
creation in batch (thus the batching opportunity isn't lost here).

BUT, if a create override isn't specified as `api.model` or
`api.model_create_multi`, it won't be accessible in rpc calls (because
the ORM thinks a record in self is needed).

It doesn't look like somebody can create stock move lines from the web
client itself, but it doesn't cost anything to follow the global api
(and it's clearer to clearly specify the create as create_multi).

closes odoo/odoo#48964

X-original-commit: a4fd8f8062046bcea97d9f7cfe300e19020cdecd
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-04-03 11:32:11 +00:00
svs-odoo 1b2b14879a [IMP] mrp: no help in workorder tablet view
For the `mrp.routing.workcenter`, removes the help from the `worksheet`
field to set it into the view.
This way, the tooltip doesn't appear each time the user cursor is placed
in front of the pdf in the workorder tablet view (`mpr_workorder`).

task-2225362

closes odoo/odoo#48903

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-04-06 06:24:03 +00:00
Daniel Blanco 326027af09 [FIX] l10n_cl: Adds exempt fiscal positions needed for some document types.
Adds special taxes used in sales and purchase of alcoholic beverages.
[FIX] l10n_cl: change percentage amount of "retencion de segunda categoría" to the value changed by law in year 2020

closes odoo/odoo#48804

X-original-commit: c7592d614728ded8e6a9faa570a49b370515ecea
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-04-01 21:16:15 +00:00
Adrian Torres 24b3cf63ff [FIX] crm: make crm.team.write work in batch again
When `_synchronize_alias` was introduced into crm.team.write, the write
method become incompatible with batch writes because
`_synchronize_alias` assumes `self` is a recordset of length 1 and
performs attribute accesses directly on self, this makes the __get__
crash because it performs a `self.ensure_one()`

With this commit, crm.team.write will iterate over the self recordset
and call `_synchronize_alias` on every record of the recordset.

This also solves a uninstallation problem in sale_crm because a write is
performed on crm.team in an uninstall_hook.

closes odoo/odoo#49088

X-original-commit: a9511cd42be365e58371d717b8197aac644eaf33
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
2020-04-06 16:18:02 +00:00
Aaron Bohy d997aa1574 [FIX] web_tour: consume tip on kanban record drag&drop
This commit concerns tours executed in onboarding mode (the user
manually follows the steps and consumes the tips).

Commit [1] changed the default event type to consume a tip from
'mousedown' to 'click'. This caused an issue when a tip was
attached to an element that had to be dragged and dropped. The
issue has been fixed by [2]. This fix is based on the fact
that draggable elements have classname 'ui-draggable-handle'.

Kanban records are draggable, but their implementation uses the
'sortable' feature of jQuery instead of the 'draggable' one (the
records are also sorted in their column). So [2] isn't enough in
this case. For instance, in the crm tour, the tip telling to drag
and drop a record to another column can't be consumed.

This commit handles the case of sortable elements that have to be
dragged and dropped.

[1] e5bc2e7306251a55ce90adeef992840517c240e6
[2] 3f458fe06e6a629edc72428eab749068c2eba1ba

closes odoo/odoo#49072

X-original-commit: 67335bda1653f592011a57146fb750d7b69cfc27
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-04-06 14:03:39 +00:00
Nicolas Martinelli 1766d3281e [FIX] auth_signup, website, base: identical logins
- Create a website:
  Free sign up
  Specific User Account activated
- In the backend, create a partner "test@test.com"
- Grant him portal access
  => user is not website-specific
- Go to the website, Sign Up with "test@test.com"
  => user is website-specific

At login, an expected singleton error arises at:
https://github.com/odoo/odoo/blob/c53f1c6a58b4c8c9e9b3c87f27281c9bfd65a0e1/odoo/addons/base/models/res_users.py#L613

Because this matches both users:
https://github.com/odoo/odoo/blob/c53f1c6a58b4c8c9e9b3c87f27281c9bfd65a0e1/addons/website/models/website.py#L44

When such a case arises, we make sure to always select the most specific
user first.

opw-2219618

closes odoo/odoo#49089

X-original-commit: 9e217125c0d8c951e895e9799795ac29b7962107
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-06 16:22:31 +00:00
Mohammed Shekha 2b776cbbb5 [IMP] do not propagate default_* key from parent context to sub view
before this commit: from commit: https://github.com/odoo/odoo/commit/d58d6e270f4106d717821438490f60bc4f71306e parent context
was propagated to sub views, propagating whole context to sub view creates
issue as it contains default_* key inside it, there is a chance that sub view
has same field name which matches with default_fieldName in context,
e.g. go to sale order form view and create sale order line, while selecting
product, write in product_id field so that Create and Edit option comes,
select Create and Edit option, so whatever previously written in product_id
field will be added in product.product form's context as default_name,
now go to Purchase tab of product form and try to create Supplier, but note
that Vendors One2many should be editable, if it is not then to produce this
issue, make Vendor o2m list editable top/bottom, as soon as you click on
Vendor o2m's create button traceback generated which comes from name_get of
res.partner, issue raised because vendor o2m has m2o of res.partner and field
name is 'name', when default_get for vendor o2m is called it will propagate context
and context has default_name='typed string in product_id', as name field is
m2o with res.partner it will generate traceback as m2o accepts (id, name) tuple
not string

after this commit: propagate context to sub view but remove default_* keys
from parent context

task-2121161

closes odoo/odoo#49075

X-original-commit: 2e3756e0ce96a9e0c5fa304632a2600cbd832ef5
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-04-06 14:42:34 +00:00
Nicolas Martinelli a210d75f55 [FIX] delivery: multiple tracking links
In case `carrier_tracking_url` is `False`, a `TypeError` is raised and
not catched.

opw-2232268

closes odoo/odoo#49083

X-original-commit: a4b5bd7770bca3f2e4327c65de673e2fcc00e7e5
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-06 15:25:07 +00:00
Nicolas Martinelli 173c6b69dd [FIX] sale_stock: product package
- Activate "Product Packagings" in the Sales Settings
- Define a package on a storable product with a contained Qty of 1.8
- Sell 5.4 units of this product in an SO and use the package.

A warning is raised.

This happens because 5.4 % 1.8 = 2.220446049250313e-16

opw-2228859

closes odoo/odoo#49070

X-original-commit: f1e79c74a5c07d6be3154629f6f381ebaf907fb1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-06 13:51:10 +00:00
Nicolas Lempereur 844a4cb49b [FIX] payment: payment acquirer disabled on uninstall
When we uninstall a payment acquirer, its state should be `disabled`
because when we succedingly reinstall it, we want the
required_if_provider fields to possibly be unset (which is only possible
if the state is not in `enabled` or `test`).

opw-2223094
closes #49033

closes odoo/odoo#49061

X-original-commit: ddf07ef2d9741d1db546efb1364718ff9e247aaf
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-04-06 13:26:23 +00:00
Julien Mougenot e1f9648021 [FIX] web: empty search bar value on autocomplete close
Before this commit, the value of the search bar remained when the auto-completion
dropdown was closed (via click out or "Escape"). This was inconsistent with the
behaviour of the search bar which is supposed to show the auto-completion values
related to the search input.

Now, the value is cleared when the dropdown closes.

Task 2227590

closes odoo/odoo#49066

X-original-commit: 1c3e6ef0a5946ce415c9a210546b207011a51b3d
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2020-04-06 13:38:45 +00:00
Robin Heinz 9a0a793026 [IMP]point_of_sale: Allow to modify pos config
Before, when a session was open, we couldn't change any of the options in the pos config.
Now, we're able to change most of the options except those which would lead to incorrect behavior.

closes odoo/odoo#40500

Task-id: 2086823
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-04-06 12:08:35 +00:00
Andrea Grazioso (agr-odoo) 04dce1445a [FIX] l10n_au,l10n_nz: fix label percentage on gst imports tax
1. Install the Australian Accounting localization pack.
2. Create a Bill, use the existing pre-defined tax, "GST only on
imports".
3. See that the subtotal of the line will be changed to 0.01.
4. See that at the bottom there will be a GST 100000000% amount showing.

The tax data need a upper percentage to avoid the 0.01 rounding issue.

opw-2226119

closes odoo/odoo#49032

X-original-commit: 5bf911fe3c0d2e461e31ab47b74bba173171dbea
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-06 10:49:28 +00:00
Swapnesh Shah cbd103eafc [FIX] sale_coupon: expected singleton archiving coupon
Before this commit, There was expected singleton tracback on Archiving multiple Coupons at once.
With this commit, We are passing single Record to process.

This is manual Forward port of https://github.com/odoo/enterprise/pull/9637
(Coupons modules went from OE to OC in saas-12.3)

closes odoo/odoo#48996

X-original-commit: d8c2c7269560920511598414741ad42e1f7a0213
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-04-03 18:41:06 +00:00
Xavier Morel 9d37cecfca [FIX] core: iterations on LRU
Iteration methods on LRU were removed because they were not
thread-safe and it's not clear that making them thread-safe is the
correct thing to do, so not providing them seems saner.

I thought I'd looked for usages of the LRU but apparently didn't look
hard enough as I missed that it's used by the cron workers (apparently
using the threaded server we only run crons for dbs currently living
in the registry cache, the more you know).

Convert these to iterating on the LRU's internal mapping, and also
don't iterate on the LRU to clear its entries one by one when we can
just clear the entire thing safely, although Registry.delete_all
really seems completely unused.

closes odoo/odoo#49023

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-04-06 09:45:29 +00:00
Pierre Paridans eacc9bfe25 [FIX] web: remove script tag for non-existing test file
This JS test file has already been moved to enterprise.

Upgrade note: updating this template is not mandatory for existing
databases, but a nice to have for new ones.

closes odoo/odoo#49020

X-original-commit: 7b00581a249556695fbfc1b21cbe30d4c702787e
Related: odoo/enterprise#9685
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2020-04-06 09:37:20 +00:00
Toufik Ben Jaa b0cd9c13a0 [FIX] payment: use order company on payment page
- The payment link generated by using the wizard
    `payment.link.wizard` are overriden to generate
    URL linked to sale orders.

    If so, we want the payment acquirer displayed to
    be in the same company as the sale order.

closes odoo/odoo#49018

X-original-commit: 8c299efb6cb4355cec39cdedd8d7c3134f53d199
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2020-04-06 09:24:28 +00:00
oco-odoo 473be98911 [IMP] l10n_ch: remove old development TODO
Oopsy! 0:)

closes odoo/odoo#49005

X-original-commit: 6827757f6dbe2692a5b343b2227240c69d1a4af5
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-04-04 18:12:23 +00:00
Florent de Labarre c2ee3c11a7 [FIX] website_sale : Use the current company
Use the company set there: https://github.com/odoo/odoo/blob/12.0/addons/website_sale/data/mail_template_data.xml#L19

opw:2226703

closes odoo/odoo#48828

X-original-commit: 9bcf008b2ef150deb034d2e787ef5c0bd909fbe8
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-04-02 08:16:25 +00:00
Ankita Raval 4e137f8ff2 [FIX] account: fix ambigius issue.
In this commit,we add a proper reference on credit and debit
because we are referencing an attribute or attributes that
belong to more than one of the tables we are using in the query,
and have not qualified the attribute reference.

closes odoo/odoo#48796

X-original-commit: 9de090926390e2f02dea979347b477e31bc9188f
Signed-off-by: Christophe Simonis <chs@odoo.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-01 20:49:41 +00:00
Xavier Morel 4b7ac65e17 [FIX] survey: use absolute paths
On redirection, werkzeug converts locations from relative to absolute
URLs. Apparently the specific algorithm when given a relative *path*
changed between 0.14 and 0.15, or possibly these paths suddenly became
processed whereas before they were interpreted as absolute?

So in Werkzeug 0.14, `redirect('foo/bar')` was treated as
`redirect('/foo/bar')` but in 0.15 it's first urljoin-ed to the
current path before the redirection is effected.

This is an issue with slides, because survey's get_start_url returns
the url `survey/start/<access_token>` without a leading slash.

The result is that where with 0.14 the certification tour would do this:

    GET /slides_survey/slide/get_certification_url?slide_id=39&fullscreen=1
    GET /survey/start/<id>?answer_token=<token>

with 0.15 or above it does this:

    GET /slides_survey/slide/get_certification_url?slide_id=39&fullscreen=1
    GET /slides_survey/slide/survey/start/<id>?answer_token=<token>

Which weirdly enough doesn't work at all.

closes odoo/odoo#48982

X-original-commit: 82a23883748172c05d2562f244ffbc1558ce01fc
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-04-03 14:19:01 +00:00
Katherine Zaoral d2d1720525 [FIX] l10n_ar: invoice report identification name
Show the identification type name instead of always show VAT in the customer information on the invoice report

closes odoo/odoo#48801

X-original-commit: 5a7ff2c932ae9abe4207291cc20e52a401a560a2
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-04-01 20:56:15 +00:00
Gustavo Valverde 65e457b215 [FIX] l10n_latam_invoice_document: Remove non-existent field
When printing an invoice using l10n_latam_invoice_document it crashes as res.partner does not have an attribute 'l10n_latam_identification_type_id', keeping the whole xpath is not needed as the VAT label is already considered in the account module: https://github.com/odoo/odoo/blob/13.0/addons/account/views/report_invoice.xml#L10

closes odoo/odoo#48800

X-original-commit: 9f0bf9bcaa6c21c36d5abdc5316aa80cef67f12f
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-04-01 20:55:55 +00:00
Paul Morelle d2a1d72be8 [FIX] account: ensure followers are internal users
On invoices, we had cases where the supplier was added as a follower to
the invoice, and an email was sent to them.

This commit adds tests that reproduce the same follower assignment that
happened in saas-12.3, and fixes the issue for 13.0.

We also treat the case when custom_values is None (the default value),
and call the super method instead of just returning False.

Since saas-13.2, account.move.name is computed, so there is no default
value, and no need to specify it at the invoice creation.

closes odoo/odoo#49004

X-original-commit: 4a32716c0c57fe904e1aeea63926fb5b65e3516b
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
2020-04-04 17:47:16 +00:00
Katherine Zaoral 761be431ed [IMP] l10n_cl: update module views to match with removed fields in l10n_latam_invoice_document module
closes odoo/odoo#47547

Related: odoo/enterprise#9216
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-04-01 16:50:11 +00:00
Katherine Zaoral c765bce768 [IMP] l10n_ar: adapt code to remove sequences
* remove logic of sequences in invoices and use new logic to make it work
* add logic do to not let the user to change the pos number in the document number
* update translations
2020-04-01 16:49:04 +00:00
Katherine Zaoral e8286ce4d9 [IMP] l10n_latam_invoice_document: adapt to new sequences
* remove logic of sequences in invoices and use new logic to set invoices sequences.
* re add l10n_latam_document_number field to make the sequence set possible.
* replace type field with move_type field in model account.move
* add new field l10n_latam_manual_number to know when the document number should be or not set
* update compute highest_name everytime that the journal and document type change.
* implement how we deal with first number
* for customer invoices only compute the name after they has been posted
* be able to search by document type code
* update translations
2020-04-01 16:48:53 +00:00
Katherine Zaoral 396ddbb705 [REF] account: make it possible to find your own highest query 2020-04-01 16:43:39 +00:00
Simon Lejeune 0172a12298 [FIX] stock: return: allow stock user to unlink line
Unlinking a return line is convenient and should be allowed for stock
user. Note that the same functionality could be achieved by setting the
quantity to 0 on the line.

related to 65530dfd6a

closes odoo/odoo#48988

X-original-commit: dc77519066993ed245ef863cdf42f6c25e10c99c
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-04-03 15:31:06 +00:00
Christophe Monniez 017361d056 [FIX] web: skip calendar timezone drage and drop qunit test until fixed
Following 889dd9245, there is still a qunit test that randomly crash.

closes odoo/odoo#48977

X-original-commit: cb76a00226cf22d1ed659d736a36fa9b92e0a512
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-04-03 13:17:12 +00:00
Aaron Bohy ebb94e6299 [IMP] web_tour: reset tours from debug manager
This commit improves the "Start tour" dialog accessible via the
DebugManager. It is now possible to reset a tour to its initial
step, so that it can be re-executed (in onboarding mode). The
content of the dialog has been reworked as well:
  - testing tours are displayed in another table
  - tour sequence is displayed
  - tours are sorted by sequence, and by name.

Task 2229909

closes odoo/odoo#48892

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2020-04-03 10:13:33 +00:00
Xavier Morel 1b30a78beb [IMP] core: rebuild LRU on OrderedDict
That's pretty much the entire point of OrderedDict's existence.

Also removed the iteration methods: they're not used and they're not
thread-safe, since they're written as generators they "return"
instantaneously when called immediately unlocking, then the iteration
itself is unprotected, so the entire thing is useless.

They could be reimplemented with explicit locking (a `with self._lock`
internally) if there's ever a use case for it, but that doesn't seem
to be the case at the moment.

closes odoo/odoo#46061

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-04-03 13:16:46 +00:00
Victor Feyens e167f4aeae [FIX] sale_product_matrix: indeterministic tour failure.
Unexpectedly, it sometimes happen in runbot tests that sales order lines
are opened in readonly mode when the sales order is in edit mode.

The SO lines modal shouldn't open at all in SO edit mode because the
lines are editable inline.

closes odoo/odoo#48974

X-original-commit: 7cb2e0cc881eabbd1b24afc0b96fa9caa90a26b4
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-04-03 12:48:01 +00:00
Odoo's Mergebot 90f8d9a5df [REF] marketing apps: better use toggle_active
Purpose of this merge is to call toggle_active or archive / unarchive methods
instead of manually writing on active field. Indeed this allows to trigger
business code related to archive / unarchive which is normally located
in toggle_archive (called by action_archive and action_unarchive).

We also improve some active-related behavior, notably

  * correctly cascade channel archive status to its slides;
  * cascade survey archive status to its certification badge;
  * fix opportunity lost / activated subtype in crm;

See sub commits for more details.

Task ID 2170708
Community PR #46563

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-04-03 15:28:07 +02:00