The method action_validate_invoice_payment() has been removed from the base
model but is still overriden in the payment module.
This commit will remove the override.
Task id #2285897closesodoo/odoo#56278
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
The only reason the customer facing display was a field was that the
customers were able to modify it. As this feature is has been removed,
we can turn it into a Qweb template.
We also remove customer_facing_display.scss as it wasn't used anymore
Before this commit, when being in a form view without active field
(the field is defined on the model, but not present in the view),
the action "Unarchive" was available in the Actions menu, even
though the record was actually active.
The issue has been introduced by [1]. This commit restores the
previous behavior: when the active field isn't in the view, the
Archive/Unarchive action isn't available in the Actions menu.
[1] 220eb4db39closesodoo/odoo#57041
X-original-commit: 97b70aab69b491443d862847fbff69c4e29274af
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
The return value of `send_printing_job` was not correcty formated for
the ePOS printers so the POS showed an error even though the receipt
was correctly printed.
closesodoo/odoo#57051
X-original-commit: 827c8d0b257d027504df1acf469d6c4761603550
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
It was only possible to print the tip receipts through an IoT Box.
If no IoT Box is configured, we now show the browser's dialog.
X-original-commit: 4b48109bb414b4768712d0e5d8706fd0088bef4b
Python 3.8 changed the equality rules for bound methods to be based on
the *identity* of the receiver (`__self__`) rather than its *equality*.
This means that in 3.7, methods from different instances will compare
(and hash) equal, thereby landing in the same map "slot", but that isn't
the case in 3.8.
While it's usually not relevant, it's an issue for `GroupCalls` which is
indexed by a function: in 3.7, that being a method from recordsets
comparing equal will deduplicate them, but not anymore in 3.8, leading
to duplicated callbacks (exactly the thing GroupCalls aims to avoid).
Also, the API of `GroupCalls` turned out to be unusual and weird. The
bug above is fixed by using a plain list for callbacks, thereby avoiding
comparisons between registered functions. The API is now:
callbacks.add(func) # add func to callbacks
callbacks.run() # run all callbacks in addition order
callbacks.clear() # remove all callbacks
In order to handle aggregated data, the `callbacks` object provides a
dictionary `callbacks.data` that any callback function can freely use.
For the sake of consistency, the `callbacks.data` dict is automatically
cleared upon execution of callbacks.
Discovered by @william-andre
Related to odoo#56583
References:
* https://bugs.python.org/issue1617161
* python/cpython#7848
* https://docs.python.org/3/whatsnew/changelog.html#python-3-8-0-alpha-1
(no direct link because individual entries are not linkable, look for
bpo-1617161)
X-original-commit: d4b2e9224839aed8fc160ebe5a89e0f7d4c6a5bb
When we make a request to /hw_proxy/sanner there are a timeout of 7,5 sec
After this timeout we wait for 5 sec before send another request.
And we clean the queue of barcode in IoT Box after 5 sec.
So if a cashier scan a product between this "gap" the product is not added to the POS
With this commit we remove the delay before send another request.
closesodoo/odoo#57019
X-original-commit: 13367ebd673c6941c8e06d99f2b66ca535ab4b3b
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
The document layout preview is a complete defferent simplified template
with its own css that replicates at best the different styles.
It does not have the external layout features and lack of fidelity.
The new preview actually use the real documents templates and put the
result in an iframe. It now has a high fidelity, though not perfect.
The goal is for a better onboarding, where clients see easely how
documents will look if they had an app to generate them. Of course, the
data on the document is a false invoice.
Refactor all this from base to web.
Task ID 2304177
closesodoo/odoo#56995
X-original-commit: c121a246f16899735306266a3a12b526e08e7620
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
When we are creating invoices from a pos order, we should be able to
extend the values used to create the invoices, when you have custom
fields or module extention.
This was possible in versio 13.0 and accidentally removed in the
following commit.
closesodoo/odoo#57023
X-original-commit: 352ee90eb2a26aff8454846f6db719fbaae0ebd7
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
The helper message has been changed in the following menus:
-My reports
-Expense Reports To Approve
-All Expense Reports
-Expenses Analysis
Task-2320205
closesodoo/odoo#56989
Related: odoo/enterprise#12913
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
PURPOSE
Clean view definitions and coherency
SPECIFICATIONS
Remove dead code and files.
Remove duplicate fields in tree views
Remove duplicate field in kanban views, especially when dealing with
preface / templates sections.
Enforce currency presence for monetary widgets and fields.
Use existing state values for state-based conditions in views
More details in sub commits. Heuristics used to detect those issues will land
in master as this merge targets a stable version.
LINKS
Task ID-2329114
PR odoo/odoo#56946
PR odoo/enterprise#12893closesodoo/odoo#56996
Forward-port-of: odoo/odoo#56946
Related: odoo/enterprise#12917
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Various attributes use state field to control display of nodes: like the
'states' (visibility), statusbar_visible (available status in status bar).
In this commit we fix various incorrect state values as those are either
typos, either references to dead or removed status.
An heuristic to detect invalid state for conditions will land soon in master.
As this commit targets a stable version only view fixes are provided.
Task ID-2329114
PR odoo/odoo#56946
X-original-commit: b4e1e9f3ae86e6b5e7015c0241791f733ee942f4
When a field is specified as widget="monetary" it makes sense to have the
currency actually shows. It won't happen if currency field is not present
within the view.
An heuristic to detect missing currency field presence when using monetary
fields or monetary widget tag will land soon in master. As this commit targets
a stable version only view fixes are provided.
Task ID-2329114
PR #56946
X-original-commit: 9c1c848ad1e8fef11320e2a162b008de7e304bcb
Remove duplicate fields in tree views / kanban (outside of templates).
A field should not be present twice in a kanban view. If one of the nodes
has custom attributes behavior of other nodes is somehow unpredicatable.
Having field present only once gives a more coherent behavior. Xpaths
could also lead to weird results if fields are present several times.
Notably adding a field in the view preface instead of inside the view
template itself (see b63043e for example of fix).
An heuristic to detect duplicate fields will land soon in master. As this
commit targets a stable version only view fixes are provided.
Task ID-2329114
PR odoo/odoo#56946
X-original-commit: 90f8e9255fa46c408763346ed135d9e561ae7fd5
Remove duplicate fields in tree views / kanban (outside of templates).
A field should not be present twice in a tree view. If one of the nodes has
custom attributes then behavior of other nodes is somehow unpredictable.
Having field present only once gives a more coherent behavior. Xpaths
could also lead to weird results if fields are present several times as
developers generally do not expect fields to be present several times in a
view.
An heuristic to detect duplicate fields will land soon in master. As this
commit targets a stable version only view fixes are provided.
Task ID-2329114
PR odoo/odoo#56946
X-original-commit: 977c2b9d12419fba3bada1ebefcca15f051ca565
Before this commit, the end users were unable to click on the
kanban image to see document's preview.
To fix this we removed lines from a previous fix which is no
longer useful in 13.0 because we now use kanban views for
many2X fields instead of list views.
See original commit:
https://github.com/odoo/odoo/commit/26c62cbb4401bffb72ce77fee481ca84b77a8143
So for mobile phones it's working fine.
For iPads, this rule is no longuer necessary since iPadOS.
See "Accelerated Scrolling on iOS and iPadOS":
https://webkit.org/blog/9674/new-webkit-features-in-safari-13/
For previous versions it still works because the DOM has changed.
Steps to reproduce:
- Go to Document
- Click on "o_kanban_image"
=> Your're stuck on a grayed page.
opw-2260101
closesodoo/odoo#56977
X-original-commit: 0d41d0daa7220a791bc4df85cca4100e3634e432
Related: odoo/enterprise#12907
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit fixes the reminder button classes to enable/disable the right ones
as it's being clicked.
(We also fix a css rule for event colors).
Task ID 2325327
X-Original-commit 58917df45d93cd9787036582e6f745901996166c
closesodoo/odoo#56988
X-original-commit: 0c78735ba82553da2633feb48901ed8d0043c049
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
- Go to Contacts > Configuration > Country Group
- Open Europe
United Kingdom is still in the group, but should not.
opw-2328125
closesodoo/odoo#56987
X-original-commit: e43c35d3c95c58d6d6af424d4eebf8244c83f332
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
Currently, 200+ country flags are stored in ALL db's as ir_attachment's (thus in the filestore), and also duplicated at each backup, ...
To reduce the footprint of Odoo databases (and their backups), the country flags are now considered as static images and accessed as such, without storing their references in database.
##### New widget for static image URL's
A new `image_url` widget is added (frontend & backend), to allow specification of a static URL in Char fields, enabling the access and display of `res.country` flags through their static urls : `/base/static/img/country_flags/<country_code>.png`.
##### Restriction of countries creation & deletion
To ensure no inconsistency can be introduced because the flags are now static, we now restrict the creation and deletion of countries.
Countries are nearly static data, they shouldn't ever be deleted... This prevents common database inconsistencies, bugs and feature disabling.
Manually created countries can easily be wrongly configured, won't behave as expected and/or will crash with Odoo integration (delivery carriers, taxes, VAT validation/formatting).
Therefore, creation/deletion of countries is limited to admins, supposed to know what they are doing...
Will probably be backported in V14
LINKS
Task ID-2325371
COM PR odoo/odoo#52774
UPG PR odoo/upgrade#1338
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
The modification of countries data should be restricted to knowledgeable users.
Indeed, by modifying, deleting and/or creating res.country records, the resulting
behavior generally won't be what you expect, breaking existing flows (delivery, taxes, VAT validation, ...)
in an open OR hidden way...
By restricting those modifications, we reduce the risks of users breaking their database through
'minor' changes unexpectingly triggering 'heavy' problems.
1) Avoid the storage of all country flags as ir_attachment (230+
ir_attachment in a new db) to reduce the filestore of databases.
The country flags are nearly static and not expected to be modified on
Odoo instances.
This change is based on the new "image_url" widget logic (see previous commits).
2) Extend the flag coverage for countries
Add the missing country flags & specify a mapping to provide flags
for overseas administrated countries/territories.
The new "image_url" widget logic provides the ability to provide static image
links in Char fields instead of duplicating the image file in database (+ filestore)
through an Image field (& ir_attachment).
This commits implements the frontend qweb logic for this widget, following the logic
of the existing "image" qweb widget.
This new widget allows definition of Images through static urls stored in a Char field.
It was implemented to provide a way to reduce databases footprint by using
static files instead of duplicating them in the databases (& their backups).
Storing attachment in database (when not specified as an url attachment) copies
the given file in the filestore. When not necessary, this should be avoided to reduce
the databases footprint (and their backups).
On a given instance, the gain is minor, but on servers with hundreds of databases and/or
backups, the impact is noticeable, leading to an economy of scale.
Install "account_check_printing" module
Open "Accounting" icon from the main menu
It opens the journal dashboard by default
It runs the following search domain in account.payment model:
domain = [
...
('payment_method_id.code', '=', 'check_printing'),
...
]
It runs the following query:
SELECT "account_payment".id
FROM "account_payment"
WHERE ...
AND ("account_payment"."payment_method_id" in ($2)))
...
The average duration of this query is 37ms
It query is ran for each journal created
If you have created 600 journals (real case) so it will run 600 times
It will spend more than 22 seconds opening this dashboard
After that, you are available to create accounting actions since that
the menu is not available before of this dashboard
So, it is important to open it faster
Creating the following index:
- account_payment(payment_method_id)
The average duration of the last query is reduced to 0.935ms instead.
It means, it will spend 0.5s opening this important dashboard with 600 journals
44x faster
closesodoo/odoo#56831
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Tours with `step_delay` potentially hide errors because of missing tour steps.
This is mainly caused by unfinished renders within the `step_delay` between
two steps. It is possible that the render after the 1st trigger is not yet
finished but the 2nd step trigger already existed in the screen. Because the
render result of 1st step is late and the 2nd step is already triggered, the
3rd step will fail. Note that the 3rd step will occassionally fail because
render of the 1st step is most of the time faster than step_delay but
there is no guarantee that the render is always faster because of occassional
cpu slow downs.
Runbot will eventually catch these tour errors which it did with the ticket
screen tour.
In this commit, we removed the `step_delay` in the pos tours. We also
supplemented the missing step in the ticket screen tour which was the cause
of random runbot error when there was `step_delay`.
We also figured that value property of input element is not observed by the
tour service's mutation observer, which result to an indeterministic error
in a step in tip screen. To fix this, we introduce an attribute to the input
element which is used in the step trigger.
closesodoo/odoo#56961
X-original-commit: 2ef73bb64cd0730d1e078a47f2ea9e1290b0df6c
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Joseph Caburnay (jcb) <caburj@users.noreply.github.com>
Have a payment method [PAYMENT] on POS with split transactions enabled.
Make a POS sale to a specific customer, pay with [PAYMENT].
Close and validate the session.
While the accounting entry for the POS sale will have the partner set,
this is not the case for the entries related to the payment.
opw-2307973
closesodoo/odoo#56142
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Steps to reproduce the bug:
- Let's consider a rental product RP with variants
- Configure product configurator
- Create a rental order
- Select RP and set a quantity in the product configurator
- Click on Add
Bug:
When the rental.wizard was opened, the quantity was not taken into account and was reset
to 1.
opw:2321357
closesodoo/odoo#56913
X-original-commit: afe0f0d5566df9bccc28535e85dec98d3c7587b4
Related: odoo/enterprise#12871
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
HTTPS had been disabled on SaaS to allow the use of the IoT Box that
had no valid SSL certificate. As of V13.0, IoT Boxes connected to
Enterprise DBs have a valid certificate. POS can then use HTTPS.
Nginx is configured to redirect all requests to `/pos/web` to HTTP,
so we change the POS URL to `/pos/ui`, except when using a Six
payment terminal as it only works in HTTP.
closesodoo/odoo#56933
Taskid: 2191878
X-original-commit: 8aee4992778fee5e2f146c4cff8b35e83c7f56b3
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
Its most glaring issues have been fixed.
task-2291904
closesodoo/odoo#56921
X-original-commit: b1efd7965a3b185b95bd30beca3d1b7f08165c8a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
PURPOSE
When typing the /help command in discuss, a helper message that is mentioning
the shortcut for canned responses is displayed. The issue is that canned
responses are available to the users after 'im_livechat' module installation.
SPECIFICATION
Display the "Type :shortcut to insert canned responses in your message." part in
the helper when livechat is installed.
LINKS
Task-2264981
PR https://github.com/odoo/odoo/pull/52600closesodoo/odoo#52600
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
The tax_base_amount field on account.move.line is expressed using the company currency but the current code is storing an amount expressed using the move currency.
closesodoo/odoo#56905
X-original-commit: 09c59012bf80d2ccbafe21c39e604d6cfda72924
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
- Before this commit, deleting slide category from frontend was not possible
- After this commit, there is a 'trash' icon on the category while hovering
on it (just like slides), clicking which will delete that category and
reload the page to re-arragne the content. If there are slides under the
category being deleted, they will be uncategorized and move to the top.
Task: 2093671
Closes#49646
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>