Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eyal application to employee #48385

wants to merge 1,329 commits into from


Copy link

pinkasey commented Mar 25, 2020

Description of the issue/feature this PR addresses:
Current behavior before PR:

Desired behavior after PR is merged:

I confirm I have signed the CLA and read the PR guidelines at

Cocographique and others added 30 commits Dec 19, 2019
closes #42165

Signed-off-by: Quentin Smetz (qsm) <>
closes #42195

Signed-off-by: Jérémy Kersten (jke) <>
…mpany issue

Currently, we are allowing to select the other company's product as
an alternative product or accessory products on the product.

For example,
	website: W1, W2
	company: C1, C2

	W1-> C1
	W2-> C2

	Product: P1
		company: C1

	Product: P2
		company: C2
		alternative product: P1

And this will give a traceback because we are going to use another company's
products. And this is obviously a wrong behavior.

That's why put a specific domain on the alternative, accessory and optional
product fields to fix this multi-company issues.

Now product wishlist will be also a company-specific.


closes #38844

Signed-off-by: Romain Derie <>
The `ref` field on `account.move` is not required and can yield a falsy
value. This produces a TypeError while doing the comparison in sorted().

closes #42434

closes #42708

Signed-off-by: Quentin De Paoli (qdp) <>
closes #35437

Task: 2042430
Closes: 35437
Signed-off-by: oco-odoo <>
As the keywords are added in the DOM and its' table is also toggled at
the same time, we've to put the toggling of the table after the keywords
pushed in to the DOM.


closes #38931

Signed-off-by: Jérémy Kersten (jke) <>
purpose of this commit is to make import template compatible with v13


closes #42279

Signed-off-by: Damien Bouvy (dbo) <>
closes #43312

Signed-off-by: Josse Colpaert <>
When a payment line is created, and then the order is reloaded, by the
synchronization feature for example, the name displayed on the payment
line is empty.

This happens because the field name is not saved on the server, so
instead of using it, we are directly taking the name of the payment
method linked to the payment line.

closes #43385

Signed-off-by: pimodoo <>
Since new ORM in Odoo, the compute methods should always return values.

In the case of return label in delivery, nothing was returned when there
was no carrier on picking.

So we are now setting the field to False when there are no carrier on


closes #43386

Signed-off-by: Simon Lejeune (sle) <>
Steps to reproduce the bug:

- Let's consider a product template P with an internal reference = I
- Archive P
- In the list view of product template select the Archived filter and
search for I with the Product filter


P was not found.


closes #43411

X-original-commit: 051e858
Signed-off-by: Simon Goffin (sig) <>
- Activate Analytic Accounting
- Set the demo user with only the Purchase User access rights (no
  accounting access rights)
- Create a PO with demo

An AccessError is raised because the user has no access to

We can use `sudo` to retrieve the default account. There is no access
rights error on `account_analytic_id` or `analytic_tag_ids` later on.

Fix the `company_id` at the same time.


closes #43388

Signed-off-by: Nicolas Martinelli (nim) <>

    - Install Employees & Studio
    - Configuration > Check Skills Management
    - Go on an employee form
    - Remove all data in Experience, Education & Skills
    - Open Studio
    - Click in the blank space before Skills
    - Edit Form View



    The ORM tries to get the parent fields because the generated
    datapoint includes them. (45bc7c9)

    Normally the parent model is the same than the child model
    but not in studio.


    Merging the fields in the datapoint only if the models are the same.


closes #41317

Related: odoo/enterprise#7179
Signed-off-by: Nicolas Martinelli (nim) <>
In preview order page, we are looking for product attachments, but if we are
using public user, we get an access rights error leading to a 403 page.


X-original-commit: d07800e
Before this commit, the search domain returns no results.

Fine-tuning of 62c9ded


X-original-commit: f3d178c
Before this commit, in a sales order preview, a search is performed to
search all the attachments in invoiced products or free products.

Now, the search is only performed if the product is a digital product.


closes #43429

X-original-commit: 2c9e783
Signed-off-by: Jorge Pinna Puissant (jpp) <>
Since [1] `computer_hdd_attribute_lines` is archived instead of unlinked in
`TestSaleProductAttributeValueConfig` which leads to indeterminism in tests due
to the missing `flush`.

Indeed `flush` is necessary before `invalidate_cache` since [2] if the data
that are pending being written must be saved to the database before the cache

[1] which highlighted the issue was merged after v13.0, but it still makes sense
to merge the current fix in the earliest version possible.

[1] 5361706
[2] 9920f20

closes #43436

Signed-off-by: Christophe Monniez (moc) <>
The creation of an account with a single character code crashes.


closes #43448

Signed-off-by: Nicolas Martinelli (nim) <>

    - Install eCommerce, use Graphene
    - Shop > Any product

    The add to cart button is shifted.


    Quantity field take full-width & max-width is too large.


    Remove width: 100% and reduce the max-width.
    Screenshots on OPW


closes #43451

Signed-off-by: Nicolas Lempereur (nle) <>
- Create a 10 % purchase tax with price included
- Create a Purchase Receipt with a price unit of 100 and the 10 % tax

The total is 90.91 + 8.26 = 99.17.

The root cause of the issue is that... actually I have no idea. For some
mysterious reasons, in case of an `in_invoice`, `in_refund` and
`in_receipt`, we go through `_compute_base_line_taxes` when the price is
changed. In case of the `in_receipt`, we compute the tax based on the
`balance` (= 90.91) rather than the price unit, which screws things up.

Note that in case of `out_*` moves, we simply don't go through
`_compute_base_line_taxes` at all, so Sales Receipts are fine.


closes #43456

Signed-off-by: Nicolas Martinelli (nim) <>
When the french certification is installed for the pos, there is an error when we use it in a company that is not french.
The format of the values sent was not identical to the format of the values expected.
Now the order and the server_id are sent separetly to match the parent function.

closes #43460

Signed-off-by: pimodoo <>
Originally introduced by f3c1e6c

closes #43384

Signed-off-by: Laurent Smet <>

    - Install Time Off
    - Marc Demo > Create leave request
    - Admin > Validate the leave request
    - Marc Demo > Add an attachment

    Nothing happens


    There is a access right issue that is not handled in the


    Handle it by doing a do_warn.


closes #43464

Signed-off-by: Nicolas Lempereur (nle) <>
Apparently some solutions (e.g. bitnami) deploy odoo using async
workers, and not all pg/psycopg2 features are supported in that mode,
notably COPY FROM (bulk-copying data from a stream to postgres). Work
around this issue by disabling "async mode" as we do the copy (by
resetting the wait callback) then re-enabling it.

While this is not an officially supported run mode, it should Do No
Harm™ for normal operations and could help users and clients.

Of important note: while this fixes an error running in async mode, it
will also prevent the worker from yielding while copy_from is
executing. Hopefully that doesn't take too long (as the entire point
of the copy_from is to be fast) but there you are.

Fixes #24145

closes #43472

X-original-commit: c4583cf
Signed-off-by: Xavier Morel (xmo) <>

    - Install Accounting
    - Upload XML bill (tried with a MX one)

    No decoder was found.


    The _create_invoice_from_xml method gets decoders from overrides of
    _get_xml_decoders. There is only 2 overrides: Belgium & Italy.

    All others countries are not handled. So, this error blocks
    the user.


    Log the error instead raising it. (Reproduce V12 behavior)


closes #43393

Signed-off-by: Nicolas Martinelli (nim) <>
When writting number on the point of sale keypad, if you click on the
"+/-" button, you will get 0 (with buffer "-0"), but then you need to
backspace 2 times to remove "-".

This seems odd since this mean that:

=> "+/-" "backspace" "backspace" "5" will get 5.0 units
=> "+/-" "backspace" "backspace" "backspace" will remove line

instead of what would be expected:

=> "+/-" "backspace" "5" will get 5.0 units
=> "+/-" "backspace" "backspace" will remove the line

closes #43495

Signed-off-by: Nicolas Lempereur (nle) <>
As Mitchell Admin:
- Install Leaves
- General Settings > Multi Company
- Create companies A (YourCompany) and B
- Mitchell Admin should be an employee of A, not B
- Switch to company B
- Go to Leaves > Managers > All > Allocations

An AccessError is raised in `_compute_number_of_hours_display` because
we try to access `employee_id.resource_calendar_id.hours_per_day`.

After this AccessError is solved, several others are raised when
accessing a record. They are solved in this commit.


closes #43504

X-original-commit: 9413222
Signed-off-by: Nicolas Martinelli (nim) <>
Install Projects, documents, calendar, website, crm.
Under Settings enable "File Centralization"
Now go to Projects, enter in a Task, click on "schedule activity".
On the activity form under "Activity Type" choose Meeting, click on
"Open Calendar" button.
Choose a slot, edit the event, add a contact type individual, save
Error will popup.

This is caused by the whole flow of creating a new document for the
invitation.ics generated for the meetings which has to be sent via email
but get detected as an attachment to be sent into the document app as

Disabling the document creation since it is not a relevant attachment


closes #43341

Signed-off-by: Nicolas Martinelli (nim) <>
Do not crash if the commercial partner doesn't have a name.


closes #43391

X-original-commit: c70122e
Signed-off-by: Nicolas Martinelli (nim) <>
std-odoo and others added 23 commits Nov 4, 2019
A dependecy is missing "lazyloader.js"

Task #2118959

closes #39763

Signed-off-by: Nicolas Martinelli (nim) <>
It very rarely happens that the test is failing due to the following error:

`Tour shop_list_view_b2c failed at step
.oe_product_cart .oe_currency_value:contains("825.00")`

The value found in that case is 750 instead of 825, which indicates that the b2c
setting was not correctly activated.

To exclude the RPC themselves from the equation, it is decided here to move the
setting change directly in the Python.

closes #44528

X-original-commit: 3edc889
Signed-off-by: Sébastien Theys (seb) <>
Since this option is soon to be used, this rename is a last tweek
to make it more logical to use since it will point to a single
upgrade dir most of the time.

closes #44558

Signed-off-by: Christophe Simonis <>
…t message / parent is not readable

How to reproduce

Have a portal user commenting a task on the customer portal. He may experience
a crash if previous message / first message is not available, for example
if it is internal or not published.

This is due to reference computation used in outgoing emails as it is based
on parent messageID. Accessing it crashes although it should not as it is
used only for technical purpose.


In this comme we fix that issue by browsing the reference message as sudo
to access its messageID. A test is added to avoid regressions.

Task ID 2061760
PR #36845

closes #43332

X-original-commit: 2b3d924
Signed-off-by: Sébastien Theys (seb) <>
Co-authored-by: jpr-odoo <>

Before this commit, the method _mail_find_partner_from_emails could
return a list mixing partner ids and partner recordset, that could
lead to issue when trying to read the different elements.

With this commit, we ensure that we return a list of records only.

closes #44588

Signed-off-by: Yannick Tivisse (yti) <>

With the commit some time ago #d382288, I removed to take the first,
but you can have multiple transfer accounts in one company.

The best way is to just do a limit=1

closes #44592

Signed-off-by: oco-odoo <>
When an order is synchronized to the server, there is a timeout of 7.5
seconds that is left before considering that the order has not been
synchronized, and should be re-syncronised.

Since syncronization of order in pos_restaurant have been made, there
are more operations than before that are performed, and the
synchronization of an order can take more than that.

The validation of a picking can also take a lot of time, almost when
products are kits and compose of multiple products.

The problem, is that if it takes more than 7.5, the same order will be
pushed again to the server, even if the previous sychro still running,
which will lead to wait the previous request that has the lok on the
same records, all this blocked request can lead to block all workers of
the server because all requests are trying to modify same objects.

So we've increased the timout for flushed orders.

closes #44600

Signed-off-by: Olivier Dony (odo) <>
Simple `this` instead of `self` mistake which prevents the widgets to
trigger up events.

closes #44609

X-original-commit: 033ad66
Signed-off-by: Quentin Smetz (qsm) <>
Steps to reproduce the bug:

- Give 'Administrator' rights for the Sales app and no rights for the Point of Sales app to the demo user
- Try to access CRM > Sales > Team Pipelines as Marc Demo


Access Rights error on pos.session


closes #44618

Signed-off-by: Simon Goffin (sig) <>
Highlight the 'Validate Inventory' button only if there is at least one
inventory line.


closes #44628

Signed-off-by: Nicolas Martinelli (nim) <>
Because the tax closing entry is created (empty) at the creation of the
CoA, it is not possible anymore to change it later, even if the user
didn't create any journal entry.
By checking that there are no account.move.line instead of account.move,
and also there are no entries with a name different from '/' (to ensure
that the sequences are untouched) we can change the CoA if needed.

closes #44647

Signed-off-by: Laurent Smet <>
    When you have su == True in your env and you call _name_search
    the _name_search was switching back to su = False
    when you call with_user with the same user or with None

    To reproduce the issue, take a model where a user has
    no access.control.list allowing to read the model
    call name_search with sudo.
If some filter domains use M2O to models current user cannot access,
using sudo() permit to filter even when user cannot access linked

for the accuracy of the fix, add a unit test which reproduce the exact
reported bug.

closes #43582

Signed-off-by: Raphael Collet (rco) <>
in anglo saxon accounting
- receipt products through an rfq
- when creating the vendor bill of the rfq, directly add a landed costs
- post the vendor bill then create the landed cost, validate the landed
- the aml of the LC is not reconciled with the aml of the vendor bill
  for the lc product because the "You are trying to reconcile some
  entries that are already reconciled." error.

We fix this by filtering out the already reconciled aml.
Not that the flow is behaving as expected if the landed cost is created
in another vendor bill, such as the tests were doing. We thus add
another test.

We chose the vendors by searching random res.partner but sometimes
partners of another company are returned, making the _check_company
mechanism raise an error.

closes #44367

Signed-off-by: Simon Lejeune (sle) <>
Steps to reproduce the bug:

- Let's consider a partner P without property_payment_term_id
- Create a SO for P, confirm it and create an invoice I
- In debug mode, on the SO click on the smart button 'invoice'
- On I, click on the 'Set Default' in the debug menu
- Set a payment term PT as default value (ir.default) for all users
- From this view, create a new invoice


The default payment term PT was not set on the new invoice


closes #44648

Signed-off-by: Simon Goffin (sig) <>
Before this commit, when printing in safari a receipt that contains
products with long names, parts of the name were overlapped. This occurs
because, in safari, the library that transforms the html into text
mismanages the spaces.
This is a well known problem, see : niklasvh/html2canvas#1654

Now, the name is printed correctly in safari, same behaviour than the
others browsers.


closes #44658

Signed-off-by: Nicolas Lempereur (nle) <>
Steps to reproduce:
- install sales
- activate units of measures and variants
- set imperial units under general settings (pounds for weight and ft³ for volume)
- create at least 2 variants on a product and access them via the smart button
from product.template

Previous behavior:
the volume remains in m³, it is hardcoded in the template

Current behavior:
the volume is printed just like the weight (generic uom notation)


closes #44649

Signed-off-by: Nicolas Lempereur (nle) <>
Since synchronization of tables was added in POS restaurant,
requests are frequently made to the server to display the
number of open orders on each table.

The implementation of the counting caused O(num_tables) queries,
and those queries were slow on large databases because there
was no index for the `table_id` column.

This patch fixes both problems, and the counting now uses
3 fast queries regardless of the number of tables.

On a sample database with 2k tables and 50k POS orders,
calls to `get_tables_order_count` went down
from 1 s and 100+ SQL queries to 10 ms and 4 queries.

About 2 orders of magnitude faster, with server load drastically
reduced as well.

closes #44660

Signed-off-by: Olivier Dony (odo) <>
Before this commit, it was possible to change the state of the Purchase Agreement when Grouped by `state` on Kanban view which is not Ideal Behavior.

Now we block drag and drop when grouping by State.

closes #44674

Signed-off-by: Simon Lejeune (sle) <>
Steps to reproduce the bug:

- Create a journal entry
- Create a line L1 with an account A and a partner P
- Create a second line L2 with an account A and a partner P
- Create a third line by clicking on 'Add line'


The account A and partner P was not suggested as in saas-12.3


closes #44656

Signed-off-by: Simon Goffin (sig) <>

This comment has been minimized.

Copy link

faisal11472 commented on 7acd855 Mar 2, 2020

cr.execute('SELECT name, id, state, demo AS db demo, latest_version AS installed_version'
' FROM ir_module_module'
' WHERE name IN %s', (tuple(additional_data),)

cr.execute('SELECT name, id, state, demo AS db_demo, latest_version AS installed_version'
' FROM ir_module_module'
' WHERE name IN %s', (tuple(additional_data),)


This comment has been minimized.

Copy link

mart-e commented on .tx/config in b932324 Mar 12, 2020

TIL, adding an entry on .tx/config but not publishing the new module on transifex will crash during the weekly pull. The translations were synchronising only until pos_cache since this commit.

@robodoo robodoo added the seen 🙂 label Mar 25, 2020
@pinkasey pinkasey closed this Mar 25, 2020
@robodoo robodoo added the closed 💔 label Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

You can’t perform that action at this time.