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
closesodoo/odoo#72935
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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...
closesodoo/odoo#74477
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
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
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
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
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
closesodoo/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>
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.
closesodoo/odoo#73750
Related: odoo/enterprise#19970
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
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
closesodoo/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>
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
closesodoo/odoo#74423
X-original-commit: c664cf1a1fb4b6781fe2802e66c993cfa1a4a028
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This makes the debug menu more natural to use, and makes the difference
between the "in-dialog" and "out-of-dialog" debug contexts explicit.
closesodoo/odoo#74346
Related: odoo/enterprise#19967
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
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
closesodoo/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>
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.
closesodoo/odoo#74234
X-original-commit: d9ff2e8ec7200aa15830e92e5083251c4e81dd1c
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
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.
closesodoo/odoo#74222
X-original-commit: 73a33877384ac1b2b4b3d818b6a2d6840984f488
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Allow Cost of Revenue accounts to match the default expense account
closesodoo/odoo#74461
Ticket: 2458146
X-original-commit: f4235243700d4a52117ca6750c44afb10142bf42
Signed-off-by: William André (wan) <wan@odoo.com>
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
closesodoo/odoo#74441
X-original-commit: 41c7bd1461a5346a030ab194b5f7fafa87a4c45a
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
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
closesodoo/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>
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.
closesodoo/odoo#74426
X-original-commit: 5ab9a317b1e0b3c1d5a143d49efb04b2f96c6300
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
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
closesodoo/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>
/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.
closesodoo/odoo#74407
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
In the popover date and float are wrongly formatted. This PR format date and float according to the user language.
closesodoo/odoo#74032
X-original-commit: a46f8d66965cce5759ca4af17c71b0aa18eda9ec
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
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
closesodoo/odoo#72394
Related: odoo/enterprise#19122
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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
closesodoo/odoo#74408
X-original-commit: 067bb35a9aee5db750a6cc4e0d42022b6b7c3e02
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
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.
closesodoo/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>
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.
closesodoo/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>
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
closesodoo/odoo#74380
X-original-commit: 2b8d7d76adceeca16f97e394a6734bb5be633c3b
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
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
closesodoo/odoo#74383
X-original-commit: a46b9ac37a0121102ddab44eca5ba6d6be82cb80
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
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.
closesodoo/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>
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
closesodoo/odoo#73832
Signed-off-by: Kevin Baptiste <kba@odoo.com>
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
closesodoo/odoo#74334
X-original-commit: c29060c80e987edcfbeeaa7824540583de88f8ed
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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.
closesodoo/odoo#74266
X-original-commit: 1e2feaa2851fa07018b912e6536585998487b5ab
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
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.
closesodoo/odoo#67203
Task: 2453275
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
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.
closesodoo/odoo#74304
X-original-commit: 390dc53054ef9c5602826f4c591fd775fc1d54e4
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
- 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
closesodoo/odoo#74323
X-original-commit: c61349244ee09577c3e07e7b75da8a3c6134b0cf
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
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
closesodoo/odoo#74338
X-original-commit: 7504dd34557968b0ecfea0d5d2b0025516d1dda5
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
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
closesodoo/odoo#74310
X-original-commit: ce487c920c777735e5e7e46ee131cb18dfc5c9fc
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
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">