Commit Graph
148305 Commits
Author SHA1 Message Date
Mitul Shah dc5b7ecbf8 [FIX] calendar: remove the 'With Username' in meeting invitation email
Before this Commit,
While creating a custom appointment, The appointment name has 'Username'
and invitation email also has 'Username'. When a customer receives the
invitation email, The 'username' gets twice.

After this Commit,
We have removed the 'With username' part from the default email template.

Task-2713963

closes odoo/odoo#82894

Related: odoo/enterprise#23197
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-02-04 13:06:54 +00:00
Christophe Monniez 8cc0a225a5 [IMP] core: bump master release to 15.3 alpha
closes odoo/odoo#83945

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2022-02-04 11:48:34 +00:00
sofiagvaladze 26a5653f48 [IMP] hr_expense, sale_expense: improve UX (back2basics)
Enterprise PR - odoo/enterprise#23980
Upgrade PR - odoo/enterprise#3206

- UI improvements/changes

- Taxes

    Before this commit, in case taxes were defined on expense,
    the tax amount was added on top of a product price.
    For example, in case product price was 100$, and tax - 15%,
    then expense.total_amount would be 115$.

    Now, tax amount is included in expense.total_amount. To accommodate
    this change, we set following domain - ('price_include', '=', True)
    on tax_ids on expense.

    For the same example, expense.total_amount would be 100$, tax amount
    would be 13.04$ and untaxed amount - 86.96$.

    But, tax amount can be set for non-zero expenses (in case expense.product_id.standard_price !=0).
    For the above example, one could set tax amount to 15$.
    As a result untaxed amount will be 85$ and total amount - 1OO$.

- Journal entry

    Previously, in case journal entry was reset to draft, canceled,
    reversed - it changed the state of the linked expense report.
    Now, actions done on accounting by accountant does not impact expense reports.

task - 2687999

closes odoo/odoo#81904

Related: odoo/upgrade#3206
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-02-04 10:23:43 +00:00
Odoo's Mergebot 3b54f9213e [IMP] web, mail, *: use Yes/No instead of True/False for boolean fields
Purpose
=======
"True" and "False" are not very user-friendly, especially for
non-technical people. Instead, we want to have "Yes" or "No" which have
more sens for non-technical people.

This change is done for the the custom filter and the tracking messages.

Task-2648390

closes odoo/odoo#79911

Related: odoo/enterprise#23863
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-02-04 10:28:13 +01:00
std-odoo d44e591ca9 [IMP] web: use Yes/No instead of True/False in views when grouping
Purpose
=======
When we group the record based on a boolean fields, we want to show
"Yes/No" instead of "True/False".

This has been done for the list view, the pivot view and the kanban
view.

Task-2648390

Part-of: odoo/odoo#79911
2022-02-04 09:28:12 +00:00
std-odoo 36857cdf87 [IMP] mail: use Yes/No instead of True/False in the tracking messages
Purpose
=======
When the value of a tracked boolean field change, we can see in the
chatter "True -> False". It doesn't have that much sens for
non-technical people, and instead we want to use "Yes -> No".

Task-2648390

Part-of: odoo/odoo#79911
2022-02-04 09:28:11 +00:00
std-odoo eddef06ad4 [IMP] web: use Yes/No instead of True/False for the custom filters
Purpose
=======
"True" and "False" are not very user-friendly, especially for
non-technical people. Instead, we want to have "Yes" or "No" for the
custom filters, when we search on a view, which have more sens for
non-technical people.

Task-2648390

Part-of: odoo/odoo#79911
2022-02-04 09:28:11 +00:00
Victor Feyens 405c0dcc9c [IMP] core: warn on duplicate files in manifest data/demo
closes odoo/odoo#83775

Related: odoo/enterprise#23901
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-02-04 07:18:51 +00:00
tsm-odoo dc7d71823d [IMP] mail: add browser key to messaging
closes odoo/odoo#83854

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-03 17:59:46 +00:00
Didier (did) 496c0f0d47 [IMP] mail: cleanup naming in attachmentList model
closes odoo/odoo#83557

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-03 17:59:42 +00:00
stefanorigano (SRI) 8c0d28c3db [FIX] mail: o_Activity, inline avatars alignment
Part of the overall v16 SCSS optimization/restyle (task-2704984).

task-2731819

closes odoo/odoo#82590

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-03 17:08:00 +00:00
stefanorigano (SRI) da5d9e745f [REF] mail: o_Activity, revamp scss
Review and simplify activities SCSS.
Part of the overall v16 SCSS optimization/restyle (task-2704984).

task-2731819

Part-of: odoo/odoo#82590
2022-02-03 17:07:59 +00:00
Louis Wicket (wil) 51a07724d9 [IMP] mail: add test for file upload activity type
Some recent changes have evidenced that the modification of the activity
type of an 'upload_file' activity was not properly covered by the tests.

This commit adds a new test for this specific case.

Part of task-2730667

closes odoo/odoo#82498

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-03 16:14:43 +00:00
Julien Giannone c4bbe13fdf [FIX] mail: click on link in a message preview while replying
When clicking on a mention (or a link) within the preview of the
message we're replying to, there was a traceback because we tried
to update a component which has already been deleted.

closes odoo/odoo#83912

Task-id: 2747321
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-03 15:22:14 +00:00
Luis González 8bf732f050 [FIX] sale: search order lines by order number not working
When searching sale order lines from another model (e.g. task), the
order number was not being considered.

The technical reason for the above is the resulting domaing was like this:

    [
        '|',
        ('order_id.name', 'ilike', 'SO name'),
        ('name', 'ilike', 'SO name'),
        # The below line is added by _name_search of base model
        ('name', 'ilike', 'SO name'),
    ])

So, even though the order number is added to the domain, an extra
condition was forcing the line description to be the only field to be
considered.

closes odoo/odoo#83911

X-original-commit: b5d45d6cae3579970ed55bc65d52c2de2377c381
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-02-03 15:22:09 +00:00
Noe Antoine b68cc2fc02 [FIX] website_slides: restore 'latest created' default promote strategy
To reproduce :
- Create a new documentation course from front-end
- Add a content there
- Edit the course in backend
=> any attempt to save the record or exiting it will trigger an error
as the specific option is set and no content has been manually set.

This has been introduced in 2597345
=> We restore the default 'latest created' that makes it work all the time.

Task-2731468

closes odoo/odoo#83910

X-original-commit: 1973944c0cdd0ea3f706280875acedfbd190333e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-02-03 15:22:05 +00:00
Antoine Vandevenne (anv) be1f134820 [IMP] payment: stop inserting CSRF tokens in test JSON(-RPC) requests
The CSRF token is not checked for JSON(-RPC) requests.

closes odoo/odoo#83906

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-02-03 15:22:00 +00:00
Sébastien Theys 7d905c232b [IMP] mail: pass classname as props in components (follow up)
Part of task-2694196

closes odoo/odoo#83904

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-03 15:21:55 +00:00
Arthur Gossuin (goa) d624b4fbec [IMP] delivery: add shipping insurance
Shipping insurance is a service which may reimburse senders whose parcels are
lost, stolen, and/or damaged in transit. Since most shipping connectors
provide it, it makes sense to put it in the base directory.

task-2701459

closes odoo/odoo#83896

Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-02-03 15:21:43 +00:00
Nicolas (vin) 45666139ee [FIX] account: bank account config company_id
When trying to set up a new bank account using the bank account wizard,
there is an issue with the check company on the linked_journal_id field.

The check will make sure that the company on that field is either false
or the same as the company on the record. But with a recent change in
68f4534aa5 the bank account company_id will be the one from the linked partner.
As the partners for companies have an empty company_id, this check does
not make a lot of sense anymore, as it would be wrong in most cases.
(We expect a journal with the currently selected company, but the bank
account will in most cases have an empty company_id)

closes odoo/odoo#83852

Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-02-03 15:21:39 +00:00
yhu-odoo 699957fd19 [REV] mrp: don't suggest qty to produce when start workorder
In 9f7e6d2bb6ae0a6b0257edf26a5aa069cd00d78e , when start a workorder, we
always suggest the qty to produce to be the full qty to produce on MO.
If the previous WO produced less than the full qty to produce on MO,
user won't aware of that when start the WO. We revert it in this committ

Task-2678388

closes odoo/odoo#83389

Related: odoo/enterprise#23961
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-02-03 15:21:35 +00:00
0b38cc527b [IMP] account: implementation of storno accounting
Storno accounting is the term used to described the process of recording
a reverse action as a negative amount on the same site instead of a
positive amount on the opposite site of the credt/debit.
For instance, when one creates a credit note for an invoice, the values
of debit and credit will be kept in the same column with negative signs
instead of swapping columns like in non-Storno accounting.

It is a business practice commonly used in Eastern European countries.

Countries where Storno accounting is mandatory or considered as best
practice would be :
Czech Republic, Poland, Romania, Russia, Slovakia, Ukraine, Croatia,
Bosnia and Herzegovina, Serbia, Romania, China, Russia, Slovenia

It is available as an option in the settings and is automatically
activated for some countries which use this type of accounting.

otask-2064899

closes odoo/odoo#79581

Related: odoo/upgrade#3212
Signed-off-by: William André (wan) <wan@odoo.com>
Co-authored-by: william-andre <wan@odoo.com>
Co-authored-by: qdp-odoo <qdp@odoo.com>
2022-02-03 15:21:28 +00:00
Habib (ayh) 676c5b5f69 [IMP] account: enable account type domain filter using the context
Users are able to create accounts without restriction on the type of account to be created. With this commit we provide a context key to limit available account types and thus minimise errors.

part of task-2684816

closes odoo/odoo#80831

Related: odoo/enterprise#22198
Signed-off-by: William André (wan) <wan@odoo.com>
2022-02-03 15:21:20 +00:00
Sébastien Theys 092864b5dd [IMP] mail: use useComponent instead of Component.current
Part of task-2694208

closes odoo/odoo#83898

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-03 14:22:58 +00:00
roen-odoo 52256398c9 [FIX] account : PoS invoice product description
Current behavior :
When creating an invoice from a PoS the description attached to the product was not the same as the one in the SO

Steps to reproduce:
- create a SO from Sales
- create an invoice from the SO
- preview the invoice

- open a POS session
- fetch the same SO
- validate the order with an invoice

compare the 2 invoices, they are not the same

opw-2674896

closes odoo/odoo#83833

X-original-commit: dbd766f1b87f91eefce7b6e5946856961fd96c70
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-02-03 13:23:43 +00:00
a6f310fca3 [FIX] base: ignore tags in translations matching
When comparing existing translations to new source value
html tag would invalidate existing translations.
The html tags used for styling (coloring, italic, ...) should not
invalidate the translation as the meaning of the text as not changed.

Changed the logic to compare translations based on textual content only.

+ add some tests.

task-2667950

closes odoo/odoo#83895

X-original-commit: 1fe4b0cc1981382cc3d944ec44276f0aee90945d
Signed-off-by: Antoine Guenet <age@odoo.com>
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
Co-authored-by: rco-odoo <rco@odoo.com>
Co-authored-by: xmo-odoo <xmo@odoo.com>
2022-02-03 11:45:55 +00:00
Sébastien Geelen (sge) 2e2914e5fe [FIX] web_editor: fix italic and underline in FF
When selecting the text content of a link
the underline and italic commands were not working in Firefox.

We re-implement the Browser command to fix this.

task-2667950

X-original-commit: 52a5b2bb692ab6712d497492f4f2fbef3a9a7874
Part-of: odoo/odoo#83895
2022-02-03 11:45:55 +00:00
boan-odoo 7b29e9d70f [IMP] stock: explain removal strategies in help-text
Ref: https://drive.google.com/file/d/1ObNPHzl8fIeNtmRIMLT60KtHJqOhrd0r/view

Note: also added contextual help to the second occurrence of the
"Removal Strategy" combo in
`Configuration>Product categories>...>Force Removal Strategy`.

closes odoo/odoo#83829

Task: 2654703-1
X-original-commit: 4bae10e0d960e5b80055e0e44056493238e552d3
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-02-03 09:56:07 +00:00
Goffin Simon e91b00d053 [FIX] sale_mrp, stock, stock_account: Decimal Accuracy in Inventory report & Valuation report
Steps to reproduce the bug:

- Go to  Settings > Technical > Decimal Accuracy
- Change Unit of Measure to 4 digits
- Go to Inventory report or Valuation report

Bug:

The decimal accuracy in Valuation report for quantity or reserved quantity was in two digits instead of four digits
The decimal accuracy in Inventory report for qty_at_date was in two digits instead of four digits

PS: In stock move report or stock move line report, the decimal accuracy of quantity fields are in four digits

By default digits of Product Unit of Measure is 3, that's why some test had to be modified

opw:2410981

closes odoo/odoo#82989

X-original-commit: 0cf5c4e8241c46724defc0ea7e0d2c881ec2eeab
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-02-03 09:56:03 +00:00
Moises Lopez - https://www.vauxoo.com/ 088b9c2398 [REF] account_check_printing: Speed-up payment creation
The method constraint to validate the Check Number is slow

1. Analyzing the following query:

```sql
SELECT
    payment.check_number,
    move.journal_id
FROM
    account_payment payment
    JOIN account_move move ON move.id = payment.move_id
    JOIN account_journal journal ON journal.id = move.journal_id,
    account_payment other_payment
    JOIN account_move other_move ON other_move.id = other_payment.move_id
WHERE
    payment.check_number::integer = other_payment.check_number::integer
    AND move.journal_id = other_move.journal_id
    AND payment.id != other_payment.id
    AND payment.id IN (1085159)
    AND move.state = 'posted'
    AND other_move.state = 'posted';
```

The output is:

    Planning Time: 3.354 ms
    Execution Time: 2514.660 ms

Discarding null values

```diff
    AND other_move.state = 'posted';
+    AND payment.check_number IS NOT NULL
+    AND other_payment.check_number IS NOT NULL
```

The output is

    Planning Time: 3.216 ms
    Execution Time: 0.140 ms

2. The constraint is computed even if the payment is not a check (check_number is empty)

Returning early save useless extra computating
It is not needed to compare falsy values for duplicated for whole table

3. The validation to check is it not a number is not optimal

It is transforming the string -> integer -> string to check if the string is not a number
but it is enough using only string -> integer not needed to transform to string again

    python3 -m timeit -u msec -s "check_numbers = [str(i) for i in range(1000000)]" "[str(int(i)) for i in check_numbers]"
        > 1 loop, best of 5: 323 msec per loop

    python3 -m timeit -u msec -s "check_numbers = [str(i) for i in range(1000000)]" "[int(i) for i in check_numbers]"
        > 2 loops, best of 5: 135 msec per loop

It is better but not enough, using `str.isdigit` method is 5x faster than original approach

    python3 -m timeit -u msec -s "check_numbers = [str(i) for i in range(1000000)]" "[i.isdecimal() for i in check_numbers]"
        > 5 loops, best of 5: 64 msec per loop

closes odoo/odoo#83851

X-original-commit: 31e0ed8c957e8a6af7f6bd5d449b450967206eab
Signed-off-by: Olivier Colson <oco@odoo.com>
2022-02-03 09:03:13 +00:00
Gorash e830953570 [IMP] IrQweb: refactoring and add technical documentation
Major changes:
- Remove some of the recursively when compiling
- Compile attributes became a directive
- Compile options became a directive
- `t-field` compilation now uses the same logic as `t-out`
- Simplification of ``t-if`` directive compilation
- Improved handling of errors wrapped by QWebException
- Constants defined outside the class

    Odoo
     ┗━► _render (returns MarkupSafe)
        ┗━► _compile (returns function)                                        ◄━━━━━━━━━━┓
           ┗━► _compile_node (returns code string array)                       ◄━━━━━━━━┓ ┃
              ┃  (skip the current node if found t-qweb-skip)                           ┃ ┃
              ┃  (add technical directives: t-tag-open, t-tag-close, t-inner-content)   ┃ ┃
              ┃                                                                         ┃ ┃
              ┣━► _directives_eval_order (defined directive order)                      ┃ ┃
              ┣━► _compile_directives (loop)    Consume all remaining directives ◄━━━┓  ┃ ┃
              ┃  ┃                              (e.g.: to change the indentation)    ┃  ┃ ┃
              ┃  ┣━► _compile_directive                                              ┃  ┃ ┃
              ┃  ┃    ┗━► t-if            ━━► _compile_directive_if                 ━┫  ┃ ┃
              ┃  ┃    ┗━► t-foreach       ━━► _compile_directive_foreach            ━┛  ┃ ┃
              ┃  ┃    ┗━► t-inner-content ━━► _compile_directive_inner_content ◄━━━━━┓ ━┛ ┃
              ┃  ┃    ┗━► t-options       ━━► _compile_directive_options             ┃    ┃
              ┃  ┃    ┗━► t-call          ━━► _compile_directive_call               ━┫ ━━━┛
              ┃  ┃    ┗━► t-att           ━━► _compile_directive_att                 ┃
              ┃  ┃    ┗━► t-tag-open      ━━► _compile_directive_open          ◄━━┓  ┃
              ┃  ┃    ┗━► t-tag-close     ━━► _compile_directive_close         ◄━━┫  ┃
              ┃  ┃    ┗━► t-out           ━━► _compile_directive_out             ━┛ ━┫ ◄━━┓
              ┃  ┃    ┗━► t-field         ━━► _compile_directive_field               ┃   ━┫
              ┃  ┃    ┗━► t-esc           ━━► _compile_directive_esc                 ┃   ━┛
              ┃  ┃    ┗━► t-*             ━━► ...                                    ┃
              ┃  ┃                                                                   ┃
              ┗━━┻━► _compile_static_node                                           ━┛

closes odoo/odoo#81024

Related: odoo/enterprise#22942
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2022-02-03 08:09:31 +00:00
Gorash 9ce5bc8881 [IMP] IrQweb: merge Qweb engine file qweb.py and ir_qweb.py
QWeb is the primary templating engine used by Odoo. It is an XML
templating engine and used mostly to generate XML, HTML fragments and
pages.

To create new XML template, please see :doc:`QWeb Templates documentation
<https://www.odoo.com/documentation/15.0/developer/reference/frontend/qweb.html>`

In **input** you have an XML template giving the corresponding input
etree. Each etree input nodes are used to generate a python function.
This fonction is called and will give the XML **output**.
The ``_compile`` method is responsible to generate the function from the
etree, that function is a python generator that yield one output line at a
time. This generator is consumed by ``_render``. The generated function is
orm cached.

In the graphic below you can see theresume of the call of the methods
performed in the IrQweb class.

    Odoo
     ┗━► _render (returns MarkupSafe)
        ┗━► _compile (returns function)                                        ◄━━━━━━━━━┓
           ┗━► _compile_node (returns code string array)                       ◄━━━━━━━┓ ┃
              ┃  (add technical directives: t-inner-content, t-tag)                    ┃ ┃
              ┣━► _directives_eval_order (defined directive order)                     ┃ ┃
              ┃                                                                        ┃ ┃
              ┣━► _compile_directives                              (recursive) ◄━━━━┓  ┃ ┃
              ┃  ┣━► _compile_directive                                             ┃  ┃ ┃
              ┃  ┃    ┗━► t-if            ━━► _compile_directive_if                ━┫  ┃ ┃
              ┃  ┃    ┗━► t-foreach       ━━► _compile_directive_foreach           ━┫  ┃ ┃
              ┃  ┃    ┗━► t-*             ━━► ...                                  ━┛  ┃ ┃
              ┃  ┃    ┗━► t-inner-content ━━► _compile_directive_inner_content ◄━━━━┓ ━┛ ┃
              ┃  ┃    ┗━► t-tag           ━━► _compile_directive_tag               ━┫    ┃
              ┃  ┃    ┗━► t-call          ━━► _compile_directive_call              ━┫ ━━━┛
              ┃  ┃    ┗━► t-out           ━━► _compile_directive_out           ◄━┓ ━┫
              ┃  ┃    ┗━► t-field         ━━► _compile_directive_field          ━┛  ┃
              ┃  ┃                                                                  ┃
              ┗━━┻━► _compile_static_node                                          ━┛

Part-of: odoo/odoo#81024
2022-02-03 08:09:31 +00:00
Gorash 39ce6f02a6 [IMP] Profiler: more QWeb directive informations in speedscope graph
Part-of: odoo/odoo#81024
2022-02-03 08:09:31 +00:00
Xavier BOL (xbo) 3d8d97e2bd [FIX] sale_timesheet: fix pricing_type search method
Before this commit, when a project has no SOL set and has an employee
mapping, then the domain builds in the search method of `pricing_type`
is the following:
`[
    ('sale_line_id', '!=', False),
    ('sale_line_employee_ids', '!=', False),
    ('allow_billable', '=', True),
]`
The problem is we don't need to have a SOL set into the project to
define the pricing_type as employee rate. We should find the project
with at least an employee mapping set in that project.
Moreover, this commit fixes the domain built in the
`_search_pricing_type` method.

Some unit tests are added to check the domain built in the
`_search_pricing_type` method.

The issue has been found during the development of task-2680425

closes odoo/odoo#83874

X-original-commit: 490747c85f2d2e390a44e8f375e24dc3a8425409
Related: odoo/enterprise#23951
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-02-02 21:49:05 +00:00
Antoine Vandevenne (anv) f4ca7290ac [IMP] payment(_*): search only once for the transaction
Before this commit, most acquirers needed to run several successive
searches for the transaction whose reference was received by a
controller in notification data. This is because the security checks
run on the notification data require access to the acquirer through the
transaction record which was immediately discarded.

Starting with this commit, all `*_feedback_data` method are no longer
decorated with `api.model` and can use the transaction record they're
called on if provided. They are also renamed to `*_notification_data`.

task-2737144

closes odoo/odoo#83850

Related: odoo/enterprise#23938
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-02-02 19:50:49 +00:00
Alexandre Kühn 0df4b0029b [IMP] mail, snailmail: convert legacy dialog with t-ref to model
In preparation to using Owl 2 in discuss code.

task-2738648

closes odoo/odoo#83598

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-02 19:50:45 +00:00
Thibault Delavallée ef9429231c [IMP] various: update query counters
Notably after odoo/odoo@f9442f47eb query counters are heavily impacted
and a lot of them has lessened.

closes odoo/odoo#83832

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-02-02 18:14:54 +00:00
Thibault Delavallée bc9943f188 [FIX] test_mail: re-add groups for notification, allowing bw tests
To ease comparisons for query counters let us try to keep the same test flow
through v15+. We therefore now also compute recipient groups for portal users
for some test models, like before odoo/odoo@faeb5e7fee .

Part-of: odoo/odoo#83832
2022-02-02 18:14:54 +00:00
Thibault Delavallée f9736c0238 [FIX] website_sale/forum: fixup renaming
Somehow a naming update was not correctly applied in all files.

Followup of odoo/odoo@faeb5e7fee

Part-of: odoo/odoo#83832
2022-02-02 18:14:54 +00:00
Arnold Moyaux ef7664bd8a [FIX] stock: b2b pack in reception
Usecase to reproduce:
- Create a planned receipt of 10 product A
- Set quantity done to 10
- Put in Pack

Actual result:
UerError "There is not move line to pack"

Expected result:
Pack them

It happens because since we are in a receipt without suggestion (by
default) then the fields `move_line_nosuggest_ids` is used.
But `_set_quantity_done` on `stock.move` will first try to fill
move line with reservation before creating new ones.
So the move_line_nosuggest_ids will not contain the quantity done
on planned quantity

closes odoo/odoo#83430

X-original-commit: 3c7453a61372d6ecdeae099d49cbc79844c144ae
Related: odoo/enterprise#23767
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-02-02 16:40:49 +00:00
Arnold Moyaux 9ec17ac219 [FIX] stock: Lazy column in multi company
Usecase:
- Install mrp with demo data
- Log in chicago company
- Go to manufacturing list view
-> Access error is raise due to multicompany rule

It happens because the state.res_ids contains all the mrp.production
even in SF company. So it try to read records in the wrong company
and raise the error.

Instead of doing a read, we change that and do a search_read like in the
classic process using the state.domain. So it filter the wrong records
before reading them

X-original-commit: 2077ee3b9312fc511d8fd5d328b5c4e329d9b784
Part-of: odoo/odoo#83430
2022-02-02 16:40:49 +00:00
Arnold Moyaux c75a1a8ac9 [FIX] purchase_stock: Wrong delivery date on purchase line
Usecase to reproduce:
- Create product 1 with supplier `Vendor` and a delay of 3 days
- Create product 2 with supplier `Vendor` and a delay of 4 days
- Create two procurements with a need for stock at 01-01-2022 (warehouse
1 step)
- Run procurement for product 1
- Run procurement for product 2

The PO contains the two product but the order date is for 3 days before
and not 4. Also the line for product 2 is planned for the 02-01-2022

It happens because the delivery date is computed base on the purchase
order date and the supplier but the procurement is totaly ignore

X-original-commit: aec7fcdb693729f432ae2341c00ef317b65fbcbc
Part-of: odoo/odoo#83430
2022-02-02 16:40:48 +00:00
Arnold Moyaux ea16215bb6 [FIX] stock: avoid to merge all moves
Some projects start to have real planning and in multiple
steps the `stock.move` that are not linked to a RFQ or a MO
are always merge together with the minimal date are result.

It's not flexible since you don't know the correct quantity
for a specific day. And once this quantity is received, you
don't know the next date.

We just add a system parameter for now and it will be modify
in master to be able to do this configuration for everyone.

X-original-commit: b9fffac7a8b6ccef2d957b5564ce615b2e1b0b36
Part-of: odoo/odoo#83430
2022-02-02 16:40:48 +00:00
Arnold Moyaux 476394c580 [FIX] purchase_stock: propagate supplier in multi steps
X-original-commit: 1e550be1cc968940dd5c263160b8cc38e9d4e72b
Part-of: odoo/odoo#83430
2022-02-02 16:40:48 +00:00
clesgow e90d32dc85 [IMP] stock_picking_batch: Add button to batch in picking view
While the batch is currently visible on the tree view, there was no
current link to a picking's batch while in the form view.

Task-2670580

closes odoo/odoo#81533

Related: odoo/upgrade#3205
Related: odoo/enterprise#23484
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-02-02 11:46:53 +00:00
clesgow 4160dde156 [IMP] stock_picking_batch: Switch default batch to 'new'
When adding a selection of pickings from the list, select the 'create a
new batch' over 'add to existing batch' as it better reflects user's
usual flow.

Task-2670580

Part-of: odoo/odoo#81533
2022-02-02 11:46:52 +00:00
clesgow 33427fd77f [ADD] delivery_stock_picking_batch: Add carrier & weight to autobatch
Improves the auto-batcher, allowing it to also group by :
 - Carrier
While adding a new restriction on the batch size as well :
 - Max weight per batch

Task-2670580

Part-of: odoo/odoo#81533
2022-02-02 11:46:52 +00:00
clesgow 7c0a7abf68 [IMP] stock_picking_batch: Add auto-batch
Allow confirmed pickings to be automatically put into batches that match the
group criterias defined in their picking_type.
The pickings can be grouped by :
 - Contact
 - Destination Country
 - Source location
 - Destination location

To avoid having batches too big then, some restrictions can be put over
the auto-batcher to restrict the size of a batch :
 - Max moves per batch
 - Max pickings per batch

Task-2670580

Part-of: odoo/odoo#81533
2022-02-02 11:46:52 +00:00
clesgow 6e042d0b6e [IMP] stock_picking_batch: Allow group_by batch
Allow the group by Batch on the Picking list.

Task-2670580

Part-of: odoo/odoo#81533
2022-02-02 11:46:52 +00:00
Aaron Bohy f16278cd29 [IMP] web: boot: do not wait 5s to log module info
Since [1], the test suite waits for 5s to start running. It's
really annoying when you run the suite in your browser, to debug
a single test or a sub suite. Waiting for 5s to determine whether
all modules can be loaded or not is not necessary anymore since
all assets coming from the same bundle are loaded in a single
file, even in debug=assets. This is true under the assumption that
there's no js module in assets_common requiring a module in another
assets bundle, which seems reasonnable.

[1] 468eb84fb4

closes odoo/odoo#83805

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-02-02 09:03:55 +00:00