https://github.com/odoo/odoo/pull/138042 reworked how we define quick create in
calendar views. Before we had to specify only a single attribute, but now they
were split into two (a boolean and a form view id). This commit fixes the
calendar view definition in the calendar module to add also the boolean
attribute.
task-3551177
closesodoo/odoo#138838
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Before this commit, the highlight added on a focus record, that styling
added was useful when we displayed only the first result in the search
to be able to build a tree but since now all the records found with
the search made by the user are shown without building a tree if it
is not possible then it is no longer needed to highlight the records
found.
This commit removes the highlight added on the focused record, the one
found by the search since it is not really needed.
task-3556262
closesodoo/odoo#138803
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Before this commit, the style added in `o_hierarchy_icon` class
was only on the button in view switcher.
This commit changes the selector to be sure to apply the same style
on any icon with `o_hierarchy_icon` class.
task-3556262
Part-of: odoo/odoo#138803
Before this commit, the hr presence status icon is displayed in kanban
view of `hr.employee.public` model but not in form view.
This commit adds the icon in the form view of `hr.employee.public`
at the same place than the icon in form view of `hr.employee` model.
task-3556262
Part-of: odoo/odoo#138803
Before this commit, when the employee is off (because he is on leave)
then the presence status icon displayed in org chart, kanban and form view
should be `fa-plan`. It is not the case because `fa-circle` is also added
by mistake.
This commit changes the patch made in `hr_holidays` module to correctly
replace the icon by the `fa-plane` when the employee is on leave.
task-3556262
Part-of: odoo/odoo#138803
Before this commit, in the form view of employee, the presence status
icon displayed in the top right of the avatar image is hidden if there
is no last activity or no user linked to the employee.
This commit changes the visibility condition to have the same
visibility condition defined in the kanban view for the same icon.
task-3556262
Part-of: odoo/odoo#138803
*point_of_sale, pos_self_order, pos_self_order_epson_printer
In this commit we introduce the functionality that allows
the pos_self_order module to generate receipts.
At the moment, this is possible by using Epson Printers via HTTP.
This is done through the use of the newly added bridge module
`pos_self_order_epson_printer`.
In order to generate the data required for the receipt we add more data
on the first load of the kiosk ( such as company information ) and
also in the `_export_for_self_order` method.
Printing is done through the `printer` service from POS.
closesodoo/odoo#137397
Task: 3487638
Related: odoo/enterprise#48304
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
pos*: l10n_co_pos, l10n_fr_pos_cert, l10n_gcc_pos,
l10n_in_pos, l10n_sa_pos, point_of_sale,
pos_epson_printer, pos_loyalty, pos_mercury,
pos_online_payment, pos_restaurant, pos_sale
There is a need to print pos receipts in new environments,
such as the kiosk. In this commit we simplify the steps to
generate the receipt data and introduce a portable mechanism
for printing.
Changes:
- removed the `getOrderReceiptEnv` method; this method
was returning a lot of data that the receipt was not
actually using; we now simply use the data from
`Order.export_for_printing`. This means that it will be much
easier to recreate this data in other environments, such
as in the kiosk.
- removed the error prone `generate_wrapped_product_name` method.
It's aim was to split the orderline name, but this task is much
better accomplished by declarative css.
- removed the `Orderline.export_for_printing` method; instead,
we simply use the existing `Orderline.getDisplayData`;
- removed the `AbstractReceiptScreen` component and replaced
it's functionality with the new `printer` service;
- using this service means that we were free to remove
the `pos-receipt-print` div from the root of the pos app;
- made the receipt be a standalone component. It thus benefits
from all the advantages of components, such as prop validation
and usage of slots;
- replaced the `OrderLinesReceipt` template with the generic
`OrderWidget` component'; this greatly simplifies the code;
- created the `renderer` service. It's goal is to do for components
what `renderToElement` does for templates; we use this service to
render the receipt component for printing;
- removed jquery from the EpsonPrinter class, such that it can be
imported into projects that do not rely on jquery;
- created the `ReceiptHeader` component. This unifies the header
between all the different receipts; ( before, each receipt was
implementing it's own header )
Task: 3547597
Part-of: odoo/odoo#137397
pos*: point_of_sale, pos_online_pay
In this pr we remove the custom generation of qr codes and
adapt the codebase to rely on the `/report/barcode` api.
Task: 3550015
Part-of: odoo/odoo#137397
The current Send and Print dialog doesn't let you
generate the XML without sending it.
An additional checkbox will be added to allow that.
It can be useful in all those cases in which the XML
is not yet 100% compliant or feature-covered to let
the Odoo customer download the XML,
modify it and send it manually through the Italian
Tax Agency web portal.
closesodoo/odoo#137034
Signed-off-by: Josse Colpaert <jco@odoo.com>
When the assets are still uncommitted (new PDF printing)
then there is a context key `commit_assetsbundle` that
commits the assets in the database before the template
that generated them actually uses it. Otherwise the
PDF will be rendered without the assets.
By putting `create` here we make the record non-virtual
and it won't be recomputed.
Part-of: odoo/odoo#137034
A previous commit(ea8acc17b4)
added a compute on invoice_user_id fields to
guess the Sale Person. The problem is that by adding the compute
on the field, the readonly default value changes for True.
It causes that user can't change the sale person anymore.
no task id
closesodoo/odoo#139035
X-original-commit: af5e3eedf90d64462afc625b30dec742361389f5
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Reproduction:
1. in Website, enter Editing mode, drag a block with a button, for
example, banner
2. click on the button then click on the text above the button
3. the selection should be around the text paragraph, but it's on the
button
Note the behavior is only for the first time of clicking on the element,
e.g. when dragging and dropping a new block
Fix: The selection restoration when destroying the link tools should be
done on the spot instead of binding to the destroy of linkToolsInfos.
Without this fix, the selection restore in link tool is done after the
full selection step for o_default_snippet_text element
task-3514638
closesodoo/odoo#139031
X-original-commit: 6dcc33c6c85b605f43e8f42a5d4013eca9e0ef7a
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Reproduction:
1. install website, drag a block with button
2. click at the beginning of the button text
3. type something, it will be outside of the button area
Reason:
The contenteditable is reset depending on the o_editable and
o_not_editable class in the _onPostSanitize function.
Fix: don’t do the resetting when we have the _fixLinkMutatedElements key
in OdooEditor as it indicates that the link isolation trick is executing
task-3514628
closesodoo/odoo#139030
X-original-commit: 1727317f258d184432b01b6295d01f688e298257
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Co-authored-by: Nicolas Bayet <nby@odoo.com>
Steps to reproduce:
1) Create loyalty program with default settings (10% discount on all
orders above $50)
2) Create quotation with amount >50, all products must be invoiceable on
delivered quantity, not ordered quantity
3) Add promotion with 'Promotions' button
4) Confirm order
5) Order has invoice status 'Nothing to invoice'
6) Add shipping
7) Order now has invoice status 'To invoice'
An order with shipping and no promo, or no promo with shipping, would in
both cases have nothing to invoice as long as the 'real' products are
not delivered. But when you have both a promo and delivery line, the
order is 'to invoice'.
The '_compute_invoice_status' methods of sale.order in the delivery and
sale_loyalty modules are not compatible, as the delivery compute filters
out delivery but not reward lines.
OPW-3357289
closesodoo/odoo#139014
X-original-commit: 201a4fc7144935947cd2909e4830a666bbdac02d
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
Steps to reproduce:
-------------------
- being in a multi-company environment;
- have one product made that is first in alphabetical
order of "Internal Reference" throughout the database (e.g. [AAA]);
- make this product specific to one of the companies
(set the "Company" field on the product template)
- go into a different company within the database
(not the one set on this product);
- create a new discount & loyalty record, and set
the "Program Type" to "Discount Code".
Issue:
------
An access rights error occurs.
Cause:
------
When creating a `promo_code` program, we use the first product
that can be sold in the default reward values.
Solution:
---------
Take into account the company in the domain that retrieves
the default product.
opw-3538516
closesodoo/odoo#139008
X-original-commit: d80c28c78bf3237e2526a6370f9c6c0b0f8dc232
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
Update the eas list in preparation for the Peppol PINT format
that will come to 17 in the near™ future
closesodoo/odoo#139005
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Issue:
Typing '@' in a chatter and waiting for the partner suggestions can
sometimes be really slow for some users, even freeze some users
browsers.
Analysis:
Since 12152279a5 the sorting on
partner suggestions has been generalized to take an arbitrary amount
of functions to apply sequential filtering. One particular of those
is `partnerCompareRegistry['discuss.recent-chats']` which makes a
call to `getRecentChatPartnerIds` which makes multiple checks for
each pair of partners in the thread to order them based on their
`lastInterestDateTime`. This property is actually quite heavy, as it
involves deserializing datetime objects and making calls to libs and
regex matches, creating a lot of garbage memory in the process.
The complexity of this machinery is atrocious:
- First `sortPartnerSuggestions` loops over all the current partners
we fetched from the backend, and in a `sort` callback we call
*each* filtering method (we shortcut on the first filtering that
succeed). So we call at worse each filter `O(n*log(n))` times.
- Since `partnerCompareRegistry['discuss.recent-chats']` is the
lowest sequence in the filtering array, we will *always* go
through it for those partners `O(n*log(n))` times, inherently calling
`getRecentChatPartnerIds`.
- This function in question gets it's list of partner from the
thread in the store, and sorts those partners with a callback
again. So again we have `O(m*log(m))` callbacks. This callback makes
8 calls to `lastInterestDateTime`, which as mentioned previously
is actually an expensive function if called frequently as it
generates a lot of garbage.
- All this garbage that is generated triggers multiple calls to the
browser GC, and it's being frequently called, either stalling the
browser for a few seconds, and for some users (as the problems
scales over quadratic for the number of partners in the
suggestions/thread) completely halting it.
Solution:
- Correct implementation of `getRecentChatPartnerIds` to not call
`lastInterestDateTime` so frequently, it was unnecessary.
- Dependency inject the call to `getRecentChatPartnerIds` outside of
the initial sorting callback, as it's independent of the sorting
parameter and can be hoisted outside of the routine and injected
into the filter.
Reference:
task-3556235
closesodoo/odoo#138988
X-original-commit: ba31d252c0738811cfe80a70bbbd7d489a45cf03
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Commit [1] changed a method to be asynchronous instead of synchronous
but did not care about where it was called or overridden. That code and
its surrounding needs to be refactored when fully switching to OWL.
Meanwhile this extracts the asynchronous part of the method to be done
once in all cases at initialization for now.
This is probably a cause of race condition or bugs but this was mainly
discovered during a master task development, preventing to code the new
feature properly.
[1]: https://github.com/odoo/odoo/commit/d7245d2abf528d093226c80e40975e63d61e8997closesodoo/odoo#138985
X-original-commit: e26c007dd14de9d0cbf76181e8054a3498e67bd9
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Since https://github.com/odoo/odoo/pull/104287 the GS1 separator defined
in the nomenclature is no more used in `BarcodeParser`
`gs1_decompose_extanded` but it is used in `barcodeService`
`cleanBarcode` instead. The issue with that is `cleanBarcode` is not
called in every case.
It will if the barcode is actually scanned but it won't if the barcode
is decoded from a picture (using the device's camera) or triggered
through an event directly (thanks to the debug console and the manual
entry available in the Barcode App.)
That means if we want to support custom separators, we have to clean the
barcode also in `parse_gs1_rule_pattern`.
How to reproduce:
- Activate `stock_barcode` and chose the GS1 nomenclature;
- Create a product and set a valid barcode (right checksum, eg.:
00000000012348);
- In the Barcode App, create a new receipt and scan a GS1 barcode for
this product containing also a quantity and using a custom separator
(`#` can be use aswell by default, eg.: 3008#0100000000012348 for 8x
this product) with using the device camera or by trigger the event
through the console:
odoo.__WOWL_DEBUG__.root.env.services.barcode.bus.trigger(
"barcode_scanned",
{ barcode: "3008#0100000000012348" },
);
-> Issue: the barcode is not recognized.
With this commit, the parser will get the nomenclature's separator and
will use it like before in `gs1_decompose_extanded`.
Also, this commit slightly changes the separator regex (from '\x1D?' to
'(?:\x1D+)?') in case multiple separators follow each other.
OPW-3439905
closesodoo/odoo#138420
X-original-commit: 39ecbf9d93d465533619aa32e127331a0307c3a9
Related: odoo/enterprise#48811
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
Signed-off-by: Steve Van Essche <svs@odoo.com>
Create a new model mixins that allow other model to
activate the history feature on html fields.
This history automatically track the changes
on the related html field and allow the user
to revert to a previous version at any time.
This also introduce a new component that can be used to :
* List the recent history
* See a previous version of the document
* Compare a previous version to the current one
* Revert the document to a previous version of it
task-3039787
closesodoo/odoo#112957
Related: odoo/enterprise#37211
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
In the context of branches, you need to be able to select taxes of
an ancestor company on an invoice/bill, even when you don't have access
to the ancestor company.
In order to do that, we relax the restriction when searching with a
`parent_of` or `child_of` on a related field, so that it also includes
ids of related field records you don't have access to. This should not
be a problem, since in the end the search will return records of a
model restricted by its own access rules.
task-3503204
closesodoo/odoo#138942
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Dylan Kiss (dyki) <dyki@odoo.com>
When a user only has access to a branch and not to the parent, he can
not create a new customer invoice or vendor bill, since we need to check
the lock date on all ancestor companies (where the user might not have
access to).
This fix allows the user to create a new customer invoice or vendor bill
again when only having access to a branch.
Furthermore, in the above case we are also unable to assign a partner on
the invoice/bill, since we are checking properties that might belong to
an ancestor company we don't have access to. We also fixed that here, so
a partner can be selected.
task-3503204
Part-of: odoo/odoo#138942
Once a branch company has some data associated with it, it can't be
deleted anymore. Since the branches could only be opened in a dialog,
it was also impossible to archive them.
In order to allow (un)archiving a branch, we added a stat button on the
company form to show the branches in a list view, where people can
(un)archive them.
task-3503204
Part-of: odoo/odoo#138942
Currently, when a user has access to a branch of a company, but not to
the company itself, the branch will not show up in the company switcher.
As a result, the user is not able to switch back to that branch when
logged in to another company.
To fix this, we now show the whole hierarchy of the branches you have
access to, disabling the companies/branches you don't have access to.
task-3503204
Part-of: odoo/odoo#138942
Change of domain applied when clicking on the "home buttons" button of
a self order, now showing buttons linked to its pos_config + those
linked to no pos_config.
Part-of: odoo/odoo#138897
Added the ability to group orders by point of sale in the order backend
view.
Added "point of sale" column to this same view.
Part-of: odoo/odoo#138897
If a pos_config has no category restrictions and receives a product with
no category, a default category named "uncategorised" will be created.
Technical change: previously, categories were grouped according to their
name, the problem being that if two categories had the same name, this
would cause problems; now they are grouped by their ID.
Part-of: odoo/odoo#138897
Before this commit, the table number was not displayed on the
confirmation page of the POS Self Order app. This is due to two PR being
merged at the same time, one that removed the field from the model and
the other using it. This is now fixed by using another field instead of
the removed one.
closesodoo/odoo#138895
Signed-off-by: David Monnom (moda) <moda@odoo.com>
Remove the seats_available_insufficient flow on the
event registration editor. As it's no longer possible to confirm
an SO and create draft registration.
Indeed the registration state is linked to the sale order state.
And a validation error is directly raised if there are not enough
seats to confirm the SO.
task-3555628
closesodoo/odoo#138743
Related: odoo/upgrade#5279
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
In this pr: https://github.com/odoo/enterprise/pull/30853 we've merged two
settings into one to make Tax calculation & display more coherent. In the case
of a "Tax per line" computation, the column "Tax Included" is optional=hide in
the backend, but we've elected to put it in the PDF all the time.
This task we will only change the pdf and portal (preview):
1. Remove the "Tax Incl" column on all relevant templates (pdf/portal).
2. Rename the "Tax Excl" column to "Amount".
task-3552656
closesodoo/odoo#138624
Related: odoo/enterprise#48923
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Before this commit, if a view contained a searchPanel the scrollbar went at the top automatically; now the behavior of the scrollbar with or without a searchPanel is the same.
closesodoo/odoo#138341
X-original-commit: b8f881de82ab931ed8bf45e67dd8b28f943e733f
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
*: pos_sale,purchase,sale
The '_get_query_currency_table' function of the res.currency
model (added in 'account' module) was refactored in this commit.
After this commit the functions parameters are effectively "decoupled"
from the 'account_reports' module.
Previously the the function took an 'options' parameter.
The 'options' was a dictionary that was formatted to be compatible with
the report options from the 'account_reports' module (enterprise).
Due to a change to these report options (see enterprise PR)
the function had to be changed in some ways.
It was chosen to "decouple" it from the report options for the following reasons:
1. The 'account' module does not (really) depend on 'account_reports'
or knows about it at all.
2. There was still a (soft) dependency on the 'account_reports' options though:
Changes to the report options had to be reflected here too.
3. Every function that calls this function previously had to create some pseudo
'account_reports' report options. This made it inconvenient to use the
function outside of a report.
task-3484368
closesodoo/odoo#136173
Related: odoo/enterprise#47735
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
In Spain, the modelo 390 is a mandatory annual tax report that compiles the modelo 303 informations, while adding extra informations.
task-2894615
Part-of: odoo/odoo#129886
Add a company_registry number to the demo company,
as it would be needed by l10n_se_sie_import
task-2826514
closesodoo/odoo#109171
Related: odoo/enterprise#34840
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Allow to perform maintenance operations on workcenters.
Block workorders during maintenance slots.
Workcenters now gather maintenance data.
Workorders gantt views adapted to show blocked slots and summed times.
Change recurrence scheme, move settings from equipment/workcenter
to maintenance request.
This allows multiple maintenances on same element (monthly, yearly, ...)
and removes the need of ir.cron
See odoo#94866
See odoo/enterprise#28964closesodoo/odoo#94866
Task: 2444754
Related: odoo/upgrade#4571
Signed-off-by: Steve Van Essche <svs@odoo.com>
Prior to this commit, the icon for the Boleto payment method was
missing.
This commit adds this missing icon.
task-3557094
closesodoo/odoo#138899
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Before this commit, adding more records to a many2many field than the
limit of the pager did not update the pager. This commit fixes this
issue by updating the limit of the pager.
closesodoo/odoo#138883
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Remove TIN from Billing Address view as it's
not supported.
task-3283179
closesodoo/odoo#138839
X-original-commit: 3f79cc23665f2bee762465734aa147309b5aaa3e
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: anko-odoo <anko@odoo.com>
Online payment method added to kiosk. This works in the same way as in
the mobile SelfOrder, except that the payment page does not open
automatically in the kiosk. A QR code appears and the user is asked to
scan it to make the payment on their phone.
Once the QR code has been scanned, the page on the kiosk updates to show
"payment in progress", and once the payment has been validated, the
validation page appears on the kiosk. These different statuses are sent
via websocket.
closesodoo/odoo#138825
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
The purpose of this commit is to delete the legacy/js/core/time.js file.
We have therefore replaced all calls to time.js with the l10N/date.js utilities.
Part of task 3439226
closesodoo/odoo#138609
Related: odoo/enterprise#48918
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>