Commit Graph
144028 Commits
Author SHA1 Message Date
Odoo's Mergebot bbf8255bbb [MERGE] event_*: refactor and improve badge reporting
PURPOSE

Rework the existing badge report to ease its override and make it look better
and introduce a new ticket report that contains more detailed information.

SPECS

Improve the existing badge report
Change the event badge report to create a proper action report so that it
shows accordingly on form (and other) views.
Remove the duplicate template for event badges and unify into one template
The "event badges" report can be printed from 2 different sources, from the
event.event itself as a preview and from the event.registration as an actual
badge for a specific attendee.
Improve the general layout of the report and remove unnecessary fields.
Introduce a new badge report with the A4 format.

This report is meant to be printed for the attendee and contains more
detailed information that the existing "badge report", which is only meant to
be folded and used as a badge.

We also introduce a new field that allows easily customizing these reports by
adding "extra instructions".

See underlying commits for more details.

LINKS

ENT PR odoo/enterprise#19349
UPG PR odoo/upgrade#2599
Task-2120259

closes odoo/odoo#72935

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-30 14:50:25 +02:00
Benjamin Vray 81f0f0840c [IMP] website_sale, *: review prices to be more realistic
*: product, purchase, purchase_stock, sale, sale_stock, web

PR-69971

task-2501400

closes odoo/odoo#69971

Related: odoo/enterprise#19974
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-30 10:39:44 +00:00
Benjamin Vray 6aa85001cb [IMP] website_sale: add a website description for customizable desk
PR-69971

task-2501400
2021-07-30 10:39:44 +00:00
Benjamin Vray 6ba77a583f [IMP] website_sale: add options in the sort by in the shop page
PR-69971

task-2501400
2021-07-30 10:39:43 +00:00
Benjamin Vray 43738af29a [IMP] website_sale: add an image for warranty product
PR-69971

task-2501400
2021-07-30 10:39:43 +00:00
Jeremy Kersten efe897f6ab [FIX] website_sale: fix tour when redirect to backend is too slow
We increase the time (if we can call this a fix) while the switch from frontend
to backend become faster. It seems to be a problem of (useless?) regeneration of
assets + a slow refactoring of scss in backend which use extend that is slow...

closes odoo/odoo#74477

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-30 09:21:23 +00:00
Aurélien Warnon eb06e10f56 [IMP] event_sale: slightly improve event.registration form view
This commit simply makes the "Sale Order" stat button on the Event form only
visible when there is actually a sale order to access.

Task-26779
2021-07-30 09:02:55 +00:00
Aurélien Warnon 8bae36bc1a [FIX] event: fix savepoint issue with event mail scheduler
This commit removes a savepoint call when running the event mail scheduler.

Indeed, this save point registration was colliding with the fact that we commit
the assets bundle during the reporting process, see 'commit_assetsbundle'
context key.

Since the transaction was commit during the report generation, when reaching
the end of the savepoint block, the system was trying to release a savepoint
that was no longer existing.

Indeed, committing removes all savepoints, since (quoting the Postgres doc)
"Savepoints can only be established when inside a transaction block.", which
makes total sense.

This was leading to a:
bad query: RELEASE SAVEPOINT "669516d2915811eba8d2b4d5bde7cdcc"
Aborting the whole event mail scheduler process.

As it's rather unclear why this savepoint was introduced in the first place,
we attempt to remove it. This change is done in a singular commit to be easily
revertable if ever necessary.

Task-26779
2021-07-30 09:02:54 +00:00
Aurélien Warnon 44b55dc883 [IMP] [website_]event: add a new full page format badge report
This commit introduces a new badge report displayed on a full A4 page.

This report is meant to be printed for the attendee and contains more
detailed information that the existing "badge report", which is only meant to
be folded and used as a badge.

We use a lot of custom layout and classes to create a "ticket-feeling" to the
report and make it look good visually.

We also introduce a new field that allows easily customizing (outside of
studio) this report by adding "extra instructions" (how to use your ticket /
directions on how to get to the event / ...).

Side note: scss disclaimer

As the reporting engine does not allow complex class/rules building, we had to
implement this nice layout using very well placed background-image and
"pixel perfect" sized elements.

LINKS

ENT PR odoo/enterprise#19349
UPG PR odoo/upgrade#2599
Task-26779
2021-07-30 09:02:53 +00:00
Aurélien Warnon 1b66782dca [REF] event_*: refactor the event foldable registration badge
PURPOSE

The event foldable badge is currently not very user-friendly in terms of usage
and style.
This commit aims to re-work it visually as well as getting rid of multiple
technical flows (unnecessary fields / no studio anchors / ...).

SPECS

Preliminary cleaning : Unify both foldable badge templates into one.

The "event badges" report can be printed from 2 different sources, from the
event.event itself as a preview and from the event.registration as an actual
badge for a specific attendee.

The implementation was done using two different templates, leading to a lot of
duplicated code and potential issues when editing one template that would not
modify the other accordingly.

This commit unifies both templates into one.
When the report is printed from the event as a "preview", we simply check that
the attendee variable is missing and print placeholders instead.

Main changes : Rework the whole foldable badge template

1. Get rid of unnecessary fields

The foldable badge template used several fields on the event.event model itself
that would allow customizing the report per event.
However, there were actually no way for the user to access and edit those
fields, as they are not part of any views.

We therefore removed them (badge_front, badge_back, badge_innerleft,
badge_innerright, event_logo).

And instead offer a single new field (ticket_extra_instructions), available on
the form view of the event, that allows to easily customize the foldable badge
and adding instructions specific to this event (how to come / what to bring /
...).

2. Visual changes

The report was re-worked to make it look a bit more recent, as the previous
look was very basic and was not very attractive.

This was done using a specific scss file that allows defining rules without
bloating the template with long style attributes.

In addition, we added some pictures that help the attendee understanding how to
correctly fold the printed A4 sheet into a badge and slide it into the holder.

All the information that were previously on the report should still be there.

3. Relocate action from website_event to event

As a bonus, we moved the reporting action from website_event to event, in order
to have everything that is related to this foldable badge in the same module.

Side note: scss disclaimer

As the reporting engine does not allow complex class/rules building, we had to
implement this nice layout using very well placed background-image and
"pixel perfect" sized elements.

You will see a lot of hardcoded numbers, mainly on heights, but it can't be
helped.

LINKS

ENT PR odoo/enterprise#19349
UPG PR odoo/upgrade#2599
Task-26779
2021-07-30 09:02:52 +00:00
Guillaume (guva) 20a82cf35a [FIX] mrp : MO set to close before finished
Step to reproduce :

- Create a Manufacturing Order for several pieces of a product with a
work center routing
- Open the Work Order which has been created
- The Manufacturing Order is set to 'to close', instead of 'in progess'

Cause of the issue

The state of the MO was never computed based on WO status.

Solution

The state of a MO is set to 'to close' when a WO is set as 'done'
or 'cancel'

opw-2584446

closes odoo/odoo#74411

X-original-commit: c237c9c3214b58d303a8597df2c836872c5e522c
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: guva-odoo <guva-odoo@users.noreply.github.com>
2021-07-30 09:02:43 +00:00
Francois (fge) bfa2d9c205 [IMP] web: refactor Command palette
The purpose of this commit is to make the palette command customizable.

From now, it will be possible to add spaceNames to modify the commands
displayed in the command palette.
For example, if I add the spaceName '@' and associate a provide function
with it, then when I type "@" in the search bar of the command palette,
the commands generated by provide will be displayed.

const commandProviderRegistry = registry.category("command_provider");
commandProviderRegistry.add("example", {
	nameSpace: "@" ,
    provide: (env, options = {}) => {
        return [{name: "myCommand", action: () => ()}]
    },
});

It will be possible to define several provide functions for the same
namespace. This will make it easy to add new commands when installing
a new addon.

Now it is possible to define commands that modify the state of the
command palette. This allows a command to change the placeholder
and commands displayed in the command palette.

closes odoo/odoo#73750

Related: odoo/enterprise#19970
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-07-30 08:26:09 +00:00
Francois (fge) 235fc69280 [IMP] web: replace fuzzy lib 2021-07-30 07:27:02 +00:00
Jeremy KerstenandOkan SUMER be43710ab8 [IMP] tools: xpath - support mode inner for position replace
This commit adds a new attribute mode for position 'replace' to the xpath feature.

This mode can take 2 values:

- 'outer' (default mode if not provided) that will replace the sibling target
- 'inner' that will preserve the sibling target

If base arch is:
```html
<p>
   <field name='x'>yyy</field>
</p>
```

`<field name='x' position="replace" (mode="outer")>zzz</field>`
```html
<p>
   zzz
</p>
```

`<field name='x' position="replace" mode="inner">zzz</field>`
```html
<p>
   <field name='x'>
      zzz
   </field>
</p>
```

Mode inner is useful for theme or render flat content, but not recommanded to
be used in page editable since we ignore the inherit-branding part until now.

task-2172208

closes odoo/odoo#48679

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Co-authored-by: Okan SUMER (osu) <osu@odoo.com>
Co-authored-by: Jérémy Kersten <jke@odoo.com>
2021-07-29 07:04:55 +00:00
Gorash 73a821abf6 [FIX] website: avoid traceback when going to options of some themes
Issue: traceback when website editor is entered and theme options are
clicked on themes using an unknown-to-the-editor font family (see for
the theme repo fix for such an example).

opw-2559735

closes odoo/odoo#74423

X-original-commit: c664cf1a1fb4b6781fe2802e66c993cfa1a4a028
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-07-29 11:34:01 +00:00
Samuel Degueldre 4c7ef96974 [REF] web: refactor debug menu to use context in env instead of service
This makes the debug menu more natural to use, and makes the difference
between the "in-dialog" and "out-of-dialog" debug contexts explicit.

closes odoo/odoo#74346

Related: odoo/enterprise#19967
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-07-30 06:01:42 +00:00
Andrea Grazioso (agr-odoo) 2c19d865f9 [FIX] web: fix property assignment in pivot view
Sales > Reporting > Sales
Select the measure "Customer (count)"

TypeError: Cannot add property group_operator, object is not extensible

As the object is immutable we need to workaround the assignment.
The previous fix 35967fabd54f596fa75fb2db7fbb1cfc5d7c8da9
will be moved in the `documents_spreadsheet` code

opw-2606424

closes odoo/odoo#74328

X-original-commit: 865d0f5c4e9e14cbd5ed494f8c9dc75b6a82a78f
Related: odoo/enterprise#19910
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-07-27 15:52:03 +00:00
Swapnesh Shah 97521cc0b2 [FIX] purchase: fallabck to default currency
Steps to Reproduce Bug:

- Create PO
- Remove default Currency
- Add a Line

Bug:
```ValueError: Expected singleton: res.currency()```

With this Commit, we are using default currency to round amount.

closes odoo/odoo#74234

X-original-commit: d9ff2e8ec7200aa15830e92e5083251c4e81dd1c
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-07-26 11:55:12 +00:00
Tom De Caluwé b9d157e7c6 [FIX] website_sale: Make coupons in the cart deletable again
The onClickDeleteProduct handler in the cart widget triggers a value
change in the input field containing the quantity of the sale order
line. This only works if there is such an input field, however these
were removed for non sellable lines (including reward lines) in commit
ae7e1f64f8. Simply restoring the input
field (even if it stays hidden) resolves the problem.

closes odoo/odoo#74222

X-original-commit: 73a33877384ac1b2b4b3d818b6a2d6840984f488
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-26 10:46:07 +00:00
Luigys [Vauxoo] e8662f95c8 [CLA] Add desdelinux as new contributor in vauxoo
Incorporate Luigys TOro (desdelinux) as Vauxoo's contributor

closes odoo/odoo#74466

X-original-commit: f9682ecac4b7b34950ba70a78a550f0c050d0ce7
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-07-29 17:36:21 +00:00
Hubert (huvw) 4fa534abaf [FIX] l10n_nl: set 'Cost of Revenue' in allowed account types for Vendor Bills journal created for a l10n_nl chart of account
Allow Cost of Revenue accounts to match the default expense account

closes odoo/odoo#74461

Ticket: 2458146
X-original-commit: f4235243700d4a52117ca6750c44afb10142bf42
Signed-off-by: William André (wan) <wan@odoo.com>
2021-07-29 16:52:52 +00:00
Nicolas Lempereur 16f5de3ca5 [FIX] mrp_subcontracting: no operation if subcontracting
When setting a Bill or Material to subcontracting, the "Operations" tab
is hidden. But it still effect eg. BoM Structure & Cost report.

With this changeset, we get an error when we save a subcontracting BoM
that has operations.

opw-2513637

closes odoo/odoo#74441

X-original-commit: 41c7bd1461a5346a030ab194b5f7fafa87a4c45a
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-07-29 14:28:12 +00:00
Touati Djamel (otd) 8f6e85f752 [FIX] account, hr_expense: fix reconciliation function
Steps to reproduce the bug:
- Install Accounting and Expense app
- Go to accounting settings > enable cash basis option
- Go to accounting > configuration > accounting > taxes
- Create a new tax or choose an existing one e.g “Tax abc”:
Tax Computation = `”Percentage of Price”`
Tax Type = `”Purchases”`
Choose any value for amount
Select "Based on Payment" in tax due
choose an account with the "Allow Reconciliation" option activated in the Cash Basis Transition Account field
Save

- Go to expenses > Expense Reports > All reports > Create a new one :
	- Add 2 expense and for both set up the taxes to "Tax abc" and unit price > 0
- Submit to manager
- Approve
- Post journal entries
- Register a payment

Problem:
A user error with the following message is triggered: “You are trying to reconcile some entries that are already reconciled”

In the use case we have two expenses and for each, an `" account.partial.reconcile "` will be created,
so we will loop twice and therefore add twice all the `”account.move.line”` linked to the taxes
in the dict `" to_reconcile_after "`: https://github.com/odoo/odoo/blob/beccf82e09d536255d9d9cb9bfe58ebae2559843/addons/account/models/account_partial_reconcile.py#L585

Then we loop to reconcile all the `" account.move.line "` which are in the dict `" to_reconcile_after "`,
but since we added them all twice, at each turn of the loop we give them all as a parameter
of the “reconcile” function without checking whether they are already reconciled or not.

opw-2565934

closes odoo/odoo#74432

X-original-commit: fb2b1482f5d3dec924b08e08dc915d6608c7d6b3
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
2021-07-29 16:04:32 +00:00
Sylvain Francis 2c4bcceb22 [FIX] point_of_sale: Don't fail when manually running scheduler
When running the scheduler manually with a user who has no read access on pos.session (and point_of_sale is installed),
the run fails silently for the user, and shows an error in the logs.
"_alert_old_session" runs with the user's rights, who might have POS access.

This commits runs the problematic search with sudo to work around this
issue.

closes odoo/odoo#74426

X-original-commit: 5ab9a317b1e0b3c1d5a143d49efb04b2f96c6300
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-07-29 11:54:27 +00:00
Younn Olivier 7ec2077e22 [FIX] web_editor: start snippet widgets after creating its options
ISSUE
Since 14.4, dropping the image gallery to a website was causing a
traceback.

CAUSE
The bug appeared when new options were added to i.fa elements (such as
Alignment, Shape, Padding). It was an issue for the image gallery as in
the start method of the snippet widget, o_indicators_left and
o_indicators_right elements are removed if not necessary. They are
removed and not only hidden in order to keep the snippet responsive.

In that situation, there was a concurrency issue, as an editor of a
child snippet removed from the DOM (here in the chevrons, removed in the
start method of the parent snippet) was created and initializing options
for an element that was not there anymore.

SOLUTION
When a snippet is dropped on a page, we wait for its options to be
created before starting its widgets.

task-2604383

closes odoo/odoo#74422

X-original-commit: 60d7bf6d7daea83db9332b4fc47a4ac6892d21d7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-29 11:18:06 +00:00
Jeremy Kersten 71659c44ab [FIX] website_sale: markupSafe (list_)price from autocomplete search
/shop/products/autocomplete return price already rendered with monetary
widget, so it is plain html like:
    "$ <span class=\"oe_currency_value\">12.00</span>"

It need to be marked MarkupSafe to avoid the escaping.

closes odoo/odoo#74407

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-29 09:35:02 +00:00
Sergey Shebanin 3a98a7ebc7 [IMP] hotkey_service prefer physical keys for non-latin keyboard layout
closes odoo/odoo#74212

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-07-26 10:43:15 +00:00
Florent de Labarre e0f02cf438 [FIX] stock: date and float are not correctly show
In the popover date and float are wrongly formatted. This PR format date and float according to the user language.

closes odoo/odoo#74032

X-original-commit: a46f8d66965cce5759ca4af17c71b0aa18eda9ec
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-07-28 16:12:49 +00:00
Anjali 7c5bfb42d4 [IMP] various: add list views for some important reporting models
Currently, there are many useful pivot views on reporting models but most
of them lacks the dedicated list view. Dedicated list views will allow users
to see useful information when one directly drill down to the records from
the pivot table in odoo spreadsheet [1].

With this commit

  1. we remove 'disabled_linking' attribute from the very important pivot
     and graph views (see the full list on task pad);
  2. we added dedicated list views for the following reporting models

    - account.invoice.report
    - fleet.vehicle.cost.report
    - hr.timesheet.attendance.report
    - purchase.report
    - project.profitability.report
    - report.membership
    - report.pos.order
    - report.project.task.user
    - sale.report

Task-2547881

[1] See task-2506116

closes odoo/odoo#72394

Related: odoo/enterprise#19122
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-29 09:33:56 +00:00
Wolfgang Taferner 2cb678d4a1 [FIX] delivery: only update not yet processed pickings based on the n…
…ew carrier

closes odoo/odoo#74419

X-original-commit: 3dce2fdea0060b1bc13bb35610b7fe01c71ef054
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Wolfgang Taferner <wtaferner@users.noreply.github.com>
2021-07-29 10:48:22 +00:00
Mohammed Shekha c157fb7474 [FIX] purchase: grouped kanban view displayed after dashboard value div
before this commit: when purchase order kanban view grouped then it is not displayed
below dashboard value div, it is displayed besides it so grouped kanban view is not
displayed and screen has horizontal scroller, to view kanban view user have to
scroll screen.

after this commit: purchase order grouped kanban view will be displayed below
dashboard value div.

task-2366797

closes odoo/odoo#74408

X-original-commit: 067bb35a9aee5db750a6cc4e0d42022b6b7c3e02
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2021-07-29 09:04:24 +00:00
Laurent Smet bd7ed78902 [FIX] account: Allow editing bank statement balances in 'processing' state
When using the online synchronization, you could have a wrong balance in 'processing' state.
In that case, don't force the user to reset the whole statement to 'open' and allow him to edit balances directly.

closes odoo/odoo#74387

Task: 2606857
X-original-commit: 03f83eb87da00938b9d2df78651c1e06cf8a6d58
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-28 17:45:26 +00:00
Laurent Smet c171f9d2aa [FIX] account: Fix tag_ids when refunding an invoice with tax affecting base
A tax line affecting the base of subsequent taxes is a line having some values in 'tax_ids' & 'tag_ids'.
When creating a refund, tags was wrongly computed in this case.

closes odoo/odoo#74307

Issue: 2596368
X-original-commit: 49d1dbbb74ea97e4337fe1af3b8074dc9146143c
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-29 07:26:02 +00:00
Hubert (huvw) 81519aa84b [FIX] stock,purchase_stock: multi-company issue on routes with a single company
Step to follow

Do not activate multiple companies, keep it standard to 1
Enable multi-locations and routes
Create a second location for raw materials and a new Receipt operation type with the new location as destination location
Go to routes -> edit the buy route -> add a second rule with "Buy" and save.

Cause of the issue

When a stock rule is created from a stock route, the default company
cannot be found as there is none assigned to the stock route.

Solution

Override the default_get method for stock rules in order to use the
current company

opw-2578984

closes odoo/odoo#74380

X-original-commit: 2b8d7d76adceeca16f97e394a6734bb5be633c3b
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-07-28 16:30:39 +00:00
Mohammed Shekha 9aab080c1c [IMP] web: remove click event from attachment_image
With this commit: we remove click event from attachment_image widget, this is
specifically done so that when user clicks on kanban cover image kanban record
is opened, actually kanban record global click check if any of the child has
click event then it does not open on click.

task-2524022

closes odoo/odoo#74383

X-original-commit: a46b9ac37a0121102ddab44eca5ba6d6be82cb80
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2021-07-28 16:57:42 +00:00
Florent de Labarre a097d3530e [FIX] stock: bypass optionnal delay description
Fine tuning of https://github.com/odoo/odoo/commit/c7b32e0795bc1573d81563f31a75fa44c64b39c2

closes odoo/odoo#74361

X-original-commit: 59ac8d891de6e20604494d6cfc6fc357a88d226c
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-07-28 12:13:12 +00:00
wan 5bc37418bf [IMP] account: warn when the sequence format changed
Explain the situation when a manual change has been done to the sequence
of `account.move`. This was needed because some user didn't realize that
they changed the sequence, and when they realized it, it had polluted
multiple numbers after that.

closes odoo/odoo#74326

X-original-commit: 56f7afb253da6560cddae121f5b6cdab3e3b1c6e
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-07-28 10:25:04 +00:00
Hardik Prajapati f8137cf900 [IMP] hr_contract: prevent dialog opening on contract history
clicking on the row of contract history opens the formViewDialog

so this commit fixes the issue by adding the readonly attributes
on the field so that clicking on the row of the contract history
doesn't open the formViewDialog

TaskID-2578874

closes odoo/odoo#73832

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-07-19 07:23:41 +00:00
Gorash 7d0d090ea5 [FIX] web: avoid a scrollbar when a carousel is added in pages
On Chrome, the browser displayed an horizontal scrollbar because the
sr-only item inside the 'next' arrow was positioned absolutely, outside
of the arrow, and thus outside of the window. This happened for the
website carousel snippet when added in pages for instance.

opw-2585526

closes odoo/odoo#74334

X-original-commit: c29060c80e987edcfbeeaa7824540583de88f8ed
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-07-27 16:44:45 +00:00
JordiMForgeFlow a8a58b2033 [FIX] sale_mrp: filter cancelled moves when getting the related BoM
The current behaviour does not filter the cancelled moves when getting
the related BoM. This implies that, if a new BoM is created for the
same product but with some changes, and the original delivery is cancelled,
the sale order line will still consider the previous BoM.

This causes that the relevant_bom ends up having more than one BoM, which
should not be the expected result.

After the fix, the cancelled moves will not be considered, as this is what
should be expected from cancelled operations.

closes odoo/odoo#74266

X-original-commit: 1e2feaa2851fa07018b912e6536585998487b5ab
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-07-26 16:18:52 +00:00
JF Aubert a467a3ec83 [IMP] purchase: agreements and dropshipping
Consider products with both 'dropship' route and 'propose a call for tenders' procurement attributes.

Purchase orders created from purchase agreements are not correctly linked with shipping address and originating sale order.

closes odoo/odoo#67203

Task: 2453275
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-05-21 12:46:54 +00:00
Xavier-Do 4e3817c0dc [REM] codeowner: remove github codeowner
Github codeowner is replaced with a runbot version of codeowners for
multiple reason:

- github codeowners is difficult to maintain, the precedence rule will
sometimes remove teams from some file because of a more specific rule
added by another team.

- github codeowner does not support version specific rules, especially
the "all except master" rule. For this use case teams needs to adapt
the new codeowner when freezing a new version.

- github will trigger codeowner on failed rebase, and add almost all
teams as reviewer. Runbot has specific commit and file limit to avoid
this problem.

- runbot codeowner is centralised and does not need to be managed cross
repo/version

- runbot codeowner works for enterprise

Any mofification on codeowner should be requested to runbot team.

closes odoo/odoo#74304

X-original-commit: 390dc53054ef9c5602826f4c591fd775fc1d54e4
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-07-28 06:46:40 +00:00
Anh Thao Pham (pta) b2ddb3e917 [FIX] website_sale: fix disabled confirmation button for free order
- Go to website shop
- Add free product or discount to cart to make sure that total amount is 0
- Try to confirm order
It will not be possible because the "Confirm Order" button is disabled by
default and there is no way to enable it.

opw-2577089

closes odoo/odoo#74323

X-original-commit: c61349244ee09577c3e07e7b75da8a3c6134b0cf
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2021-07-27 14:51:34 +00:00
Pierre Masereel 5a620eded9 [FIX] pos_restaurant: don't mark order as printed
When the final receipt of an order is printed, the order is marked as
printed, as it can be then removed, and nothing can be added to it
anymore.

When the Bill is printed, we should not mark it as printed, as there
can be some modifications made after the bill is printed.

So as the bill receipt is an inherited object from the final receipt, we
have to change the behavior for the bill receipt to not mark the order
as printed.

OPW-2555272

closes odoo/odoo#74338

X-original-commit: 7504dd34557968b0ecfea0d5d2b0025516d1dda5
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-07-27 17:26:31 +00:00
Nicolas Bayet 3b6088dede [FIX] website: properly autocomplete url from LinkDialog
task-2586134

closes odoo/odoo#74327

X-original-commit: a6cc59d4efb7d63cdfe08d7bec496d048f1ae43d
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2021-07-27 15:45:12 +00:00
Ivan Yelizariev 2da2f5d5dc [FIX] product: speed up _get_possible_combinations
Excluding non-active records decreases number of combinations generated in
_cartesian_product. The excluded combinations have to be rejected anyway [1], so
don't waste time on it.

STEPS:
* activate "Product Configurator"
* create a product with many attributes
* make some `product.template.attribute.value` inactive (ptav_active = False):

  ** create a sale order with that value (e.g. color "Black" in "Customizable Desk (CONFIG)")
  ** delete that value in `product.template` form (tab "Variants")

* add the product to a sale order
* RESULT: `_cartesian_product` doesn't generates combination with archived attribute

[1]

https://github.com/odoo/odoo/blob/f9d26509a714ecd290c42e1d58e416bb01268447/addons/product/models/product_template.py#L839-L841

---

opw-2540675

closes odoo/odoo#74310

X-original-commit: ce487c920c777735e5e7e46ee131cb18dfc5c9fc
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2021-07-27 11:05:17 +00:00
Odoo's Mergebot 375a515815 [IMP] web: redify branch with wrong xpath qwebjs
In case of wrong xpath in qweb js and that xpath applied during test, now branch is red

closes odoo/odoo#74292

Related: odoo/upgrade#2674
Related: odoo/enterprise#19887
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-27 18:22:29 +02:00
Jeremy Kersten 040b49bef9 [FIX] account: remove dead css
This class has been removed in commit d201a39357
2021-07-27 07:54:42 +00:00
Jeremy Kersten 7c4a57edf3 [FIX] website_sale_management: remove useless module
This module only exists to xpath a view.
Xpath is broken since 2017 and content already present into website_sale
with the <t t-extend="website.dashboard_header">
2021-07-27 07:54:42 +00:00
Jeremy Kersten 1e325c6970 [IMP] web: redify runbot in case of wrong xpath qweb2 2021-07-27 07:45:57 +00:00