Current behavior:
When the currency in the PoS is not the same currency as the one of the
company, and uses a big rates there are sometimes rounding issues. These
rounding issues can lead to a difference at closing that prevent you
from closing the PoS session.
Steps to reproduce:
- Make sure atleast 2 currencies are activated. (USD and EUR)
- Modify the USD rounding factor to 0.000001
- Modify the rate for the EUR to 2100 Unit/USD
- Now go in the PoS settings and go in the Default Journals Order and
set the currency to EUR
- Change the pricelist currency to EUR
- Change the cash payment method journal currency to EUR and remove
other payment methods
- Open a PoS session and create a new order with 3 products with a
price that has decimals
- Pay the order with cash
- Close the session, you will get an error
The error was happening because the rounding was done on each line and
therefore we were losing precision.
opw-3258806
closesodoo/odoo#129241
X-original-commit: 112e224ace6e658c563d6041532e133ddcc1c8a7
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
Since the dependency to account_edi has been removed from l10n_mx_edi
and knowing we plan to remove completely the account_edi module and
since it's the single localization needing an EDI on payments, all this
code can be removed.
Task: 3069324
Part-of: odoo/odoo#128395
The logic of the send & print wizard is to generate all EDI documents and PDF at the same time
to ensure the consistency between all business documents.
In some localizations, we need custom references to the generated EDI documents inside the PDF.
The problem is the current PDF engine is not designed to easily extend such PDF template and provide
custom values to render it. Also, you absolutely need an ir.actions.report to use the PDF rendering.
To make such customizations less paintful, this commit adds a hook on the send & print wizard allowing
to provide a custom template inheriting the standard one and custom values for the rendering.
Task: 3069324
Part-of: odoo/odoo#128395
Allow localizations having an EDI to prevent resetting to draft an invoice already
sent to a government. By law, in some countries, if you want to cancel an invoice,
you need to ask an authorization from the government.
Task: 3069324
Part-of: odoo/odoo#128395
Currently, when a user requests a migration key, we set them as 'canceled' and show the migration key.
That means, they won't receive new invoices/invoice status updates.
However, the idea of the migration is that a user should be reachable at all times
and we should receive documents for them up until they are fully migrated to another service.
The solution is to keep `account_peppol_proxy_state` as `active` when they request a migration and display the migration key.
On the IAP side we will check with a cron whether they have migrated or not.
A migrated user is then archived on the IAP side.
That means that whenever we run a cron on the client side, the edi user would not be found,
so the edi user will be archived in `_make_request`.
We can then safely change the `account_peppol_proxy_state` to `not_registered`.
closesodoo/odoo#129166
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Before this commit
==================
Marking an operation as done rather than start and done, the status of
subsequent immediate next linked work orders is not updated properly inside
WO list view.
Steps to Reproduce
==================
- Create a bom product having more than one operations.
- Create a MO and confirm it.
- Inside WO list view select a single first operation of the recently created
MO, and click on done, you will find that the status of subsequent operation
(immediate next) is not updated properly.
This happens because of the reservation state of the MO which has initial
state as false and thus the status of work-order changes to 'waiting'.
With this commit
================
Marking operation as done the status of subsequent linked work order gets
updated properly.
closesodoo/odoo#128881
Task: 3358125
X-original-commit: 0533577264413934179cc32e0cfe26cb324dd58a
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
This commit completes the addition of t-field with a few changes in its
behaviour in the editor:
- t-field nodes, like t-esc or t-out, are considered as unbreakable
- similarly, they are defined as 'demo data' which cannot be edited
closesodoo/odoo#128228
Related: odoo/enterprise#43978
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Have the wysiwyg take an editable from an iframe. At the unmounting of the wysiwyg, save it.
Before this commit, the editable and dirty nodes were not correctly resolved as the JQuery instance
would be the one of the main document.
After this commit, we build a custom jquery function to make sure to search in the relevant document, and
be able to locate nodes even if the iframe's document is not bound to a browsing context.
Part-of: odoo/odoo#128228
Before this commit, when displaying the available conditional branches
on a node, the QWebPlugin's select element only had the name of the attribute.
This commit adds to this name, the actual condition present inside the attribute.
Part-of: odoo/odoo#128228
Before this commit, the option getContextFromParentRect was not used to compute
the position of the branching in the QwebPlugin.
Also, the Wysiwyg forced that callback in the options.
This commit fixes those two issues
Part-of: odoo/odoo#128228
Before this commit it was not possible to print a report without
bypassing the retrieval of a previous attachment, or to print
a report without creating one.
After this commit it is possible with the context key "report_pdf_no_attachment"
Part-of: odoo/odoo#128228
Before this commit, when typing "/" inside a node that had a t-field attrbute
the OdooEditor displayed its hint in order to spawn the Powerbox.
This is not ideal as the content of a t-field is rather irrelevant.
After tis commit, a t-field node behaves like a t-out: there is no hinting inside them
Part-of: odoo/odoo#128228
Before this commit, planning option is view in project
setting.
This commit planning option is move from project to planning setting
with named 'Project Planning'
task-3251687
closesodoo/odoo#125341
Related: odoo/enterprise#42675
Related: odoo/upgrade#4940
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Description of the problem:
When an item in an invoice is not 16% standard VAT rated, the KRA
expects an "Item Code". These "Item Code"s were formerly referred to as
HS Codes, however this was never an accurate description of what they
were, since they never shared in the nomenclature of the Harmonised
System and they refer to services (as opposed to just goods).
Examples of KRA Item Codes:
- 0001.12.00 The exportation of goods (0%)
- 0010.21.00 Tea and coffee brokerage services (exempted)
- 0001.13.14 Natural gas in gaseous state (8%)
The KRA's item code system consists of several components:
- A code, of the format 'XXXX.XX.XX' (where X is a digit [0-9])
- A description explaining the use case of the code
- The tax rate specific to code, this can be interpreted as "using this
code justifies using the tax rate that you have on the invoice line"
There are few conceptual problems with the application of these codes,
since they don't exactly match the way things are approached in Odoo. I
took care in the examples to include the "Exportation of goods" code.
Which should be used to justify all zero-rated taxes on exports. I also
included an example where, for instance, natural gas is rated at 8%.
From the two examples above, it is clear that the code does not relate
directly to the product, which is where the fields are currently
represented. Instead, the relationship is more accurately between the
code and the line that it describes.
However, to avoid putting the code on the line and complicating the
'account.move.line' model further, we can the relationship between the
code and the tax.
This means that for each code the user finds themselves using, there
will have to be a specific tax, for example (with respect to the
examples above):
- "Zero Rated Exports (0%)"
- "Tea/Coffee Brokerage (0%)"
- "Natural gas (8%)"
In this commit:
A new model representing the KRA item codes is added in l10n_ke, along
with a many2one relation to it on the account.tax.template/account.tax
models. Accompanying views for the new l10n.ke.item.code model and the
many2one field on the tax are added.
In l10n_ke/data the item codes themselves are added in csv format.
L10n_ke/security is added, and ir.model.access.csv to describe access
rights for the new l10n.ke.item.code model.
The account tax template is updated to add a default export tax with the
appropriate export item code applied to it.
In l10n_ke_edi_tremol, the move validation and serialisation (in which
invoice data is serialised for sending to the device) is updated to
handle the new schema.
The inheritance of product and the additional item-code related fields
is removed from l10n_ke_edi_tremol as they are no longer required, the
same is true of the associated views.
closesodoo/odoo#112013
Related: odoo/upgrade#4528
Signed-off-by: Josse Colpaert <jco@odoo.com>
Main changes include :
- Separate Repair and Sales/Invoicing functionalities
- Possible binding between a Sale Order and many Repair Orders
- Specific 'repair.line' model is now replaced by a 'stock.move' inheritance
- Added a new 'Repairs' Operation Type to warehouse(s)
Task : 3046560
Enterprise : odoo/enterprise#36088
Upgrade : odoo/upgrade#4391closesodoo/odoo#106911
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
A typo in forum templates leads to a 404 page instead of redirecting to
the page allowing to delete a closed post.
Follow-up of #123709
task-3316555
closesodoo/odoo#129161
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Steps to reproduce:
-Create a product in kg as storable.
-Add it into the BOM of another as grams.
-Create an MO with the BOM with more than 1 quantity to be produced.
-Set the quantity to be produced to 1, validate and create backorder.
Bug:
Error message: "It is not possible to reserve more products of test kg
than you have in stock."
Fix:
correct conversion of units during backorder reservation of component
closesodoo/odoo#129152
X-original-commit: 8f26839998f21e521ecaeba38a2bcc6c72894f41
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
This fix removes the hardcoded pricelist ID and uses the one used in the
PoS config instead.
closesodoo/odoo#129136
X-original-commit: f5d3e985ad41af29fc6cbcfc2417e475443cd00d
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
Since the refactoring of chart templates, the wrong account is used for the purchase tax (`Tax Received` instead of `Tax Paid`) in the generic COA taxes.
closesodoo/odoo#129130
X-original-commit: 25eff4142b7a8b57fc5e9b73ac92c4c54e29085b
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Before this commit, avatars images were not aligned correctly
NB: The bug is only present in Firefox and pre v15.4 Safari because
these browsers don't support `:has` CSS selector. This selector is used
to set a `display: flex` on `.o_field_many2many_avatar_user` if it has
no `.o_tags_input` child in `many2many_avatar_user_field.scss`
task-3422356
part of task-3326263
closesodoo/odoo#129129
X-original-commit: fedf405aa821cf57b566c7992b0b14ad331bf80f
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
This commit sets the bottom margin of `.o_x2m_control_panel` at the
positive amount of the negative top margin of `.o_list_renderer` so
that the `.o_cp_pager` buttons are not cropped
task-3422214
part of task-3326263
closesodoo/odoo#129128
X-original-commit: 0e40d65382c37ad594aae351435f5bea14903cd6
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Fixed a typo in forum templates that prevents users from atlerning
between ascending and descending order when sorting forum posts.
follow-up of #123709
task-3316555
closesodoo/odoo#129116
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
A clear_cache was added in _update_xmlids in pr 119813.
If it was needed in case of update, it is not useful when creating an
xmlid or when the value is unchanged.
The initial idea was to detect if an update or an insert was done, maybe
using create_date and write_date. Unfortunately the create_date is the
same as the write_date in the same transaction. This is unlikely but in
this case, we could update the cache in place.
The final behavior is to update the cache in all case, and notify other
workers only if a model was updated.
This will help to avoid invalidating the cache too mush during module
loading. Even if the impact on time is small, the increase in queries
was visible.
This solution would even be a slight improvement on previous query count
closesodoo/odoo#129029
Related: odoo/enterprise#44349
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
The _xmlid_lookup cache contains the id of the ir.model.data with is
unused, making cache pupulation and usage more complex than needed.
Removing this id in prevision of the next commit
Part-of: odoo/odoo#129029
*: pos_self_order
Adds online payment support for self-order flow in the Point of Sale app.
- Adds a configurable online payment method specific to the self-order flow, which is optional in "Pay after meal" mode, required in "Pay after each" mode.
The POS config of a restaurant can use 2 different online payment methods, one for the frontend cashier flow, and another for the self-order flow, or can use the same for both.
By default, if an online payment method is configured for the self-order flow, any new order paid online will be paid with that payment method.
But if the cashier requests an online payment with a different online payment method, that payment method will be used for that order during the time the cashier keeps his online payment popup open (without cancelling the online payment) (after cancelling the online payment, the order could potentially still be paid online, and if so it will use the online payment method of the self-order if one is configured, otherwise the online payment method of the cashier flow).
- Allows the customer to open the online payment page of an order from the self-order UI.
In "Pay after meal" mode, if an online payment method is configured, the "Pay" button is displayed when the customer order is saved on the server, otherwise the "Order" button is displayed (even when the order has been sent to the server and then modified without sending it again).
Otherwise, if no online payment method is configured, the "Pay at cashier" unclickable button is displayed.
In "Pay after each" mode, the "Pay" button is displayed everytime.
- Replaces the self_order_after_each_cart_tour test.
closesodoo/odoo#127869
Task-id: 3171698
Related: odoo/enterprise#44055
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
This commit fixes `.o_view_nocontent`'s mobile layout. Prior this
commit, it's content was overflowing on top of the page.
task-3418657
part of task-3015891
closesodoo/odoo#129115
X-original-commit: a51310a53ac3abf7435223e2d2a3215a3e60df50
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
Steps to reproduce:
- Go to Sales > Products > Discount & loyalty
- Create a new record
- Click on existing reward
- Click discard button
Error due to missing field in kanban view.
Fixes#124785
X-original-commit: db6ee7113cd6c3a830d2d401e92de98787323d43
Part-of: odoo/odoo#129115
This commit fixes a few remaining bugs in loyalty:
- misplaced use of ewallet and gift view for discount program types;
- wrong context when creating a gift card (got discount and coupon);
- wrong options to program type when creating a loyalty card;
- product tag was mandatory in reward eventhough a reward product is
assigned.
task-3015891
X-original-commit: 440a853b01dbcc67ad926487764682a5c68c2c8b
Part-of: odoo/odoo#129115
Only two thread actions are allowed for the embed livechat
for now: closing the chat window and folding it. Until now,
the actions were not loaded but this is dependent of the
imported files which is not ideal.
This PR makes allowed thread actions explicit in order to
ensure only the right thread actions are available.
closesodoo/odoo#129090
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Since odoo/odoo@3c62ca1eb, `display_name` is not stored anymore; we
should use the `complete_name` field instead, that serve the same
purpose (and is not context-dependant).
closesodoo/odoo#128891
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
_*: hr_timesheet,sale_project,sale_timesheet
Generally, you don't want subtasks to be displayed at the same level
as their parent tasks. You want to consider the subtasks as part of
their parent's project, but don't want to see them directly in this
project. Rather, you want them to be accessible only via their parent.
(There are exceptions to that and we want to stay flexible.)
First solution that comes to mind is to have `project_id` set to False
for the latter tasks, but then how to get the value of the fields that
are related to the project?
So, second solution would be to have a field `project_root_id`,
which would be the project of the parent, or the grand-parent, etc.
The issue now is that we have to fields "project", and it isn't obvious
when to use one or the other.
The most simple way to answer this need is to keep one field "project",
that will always be set for (non-private) tasks,
and create a boolean field : `display_in_project`.
But we want it to be technical (no checkbox in the view).
So, when the user unsets the project on a subtask, the view will act
as if the project was unset, but in the back-end,
we'll set `display_in_project` to False and set `project_id` back.
The fact that all tasks have a project allows us to know if action x
can be perform on this task t, dependind on t.project_id.allow_x.
task-3367246
closesodoo/odoo#128281
Related: odoo/enterprise#43996
Related: odoo/upgrade#4930
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
The purpose of this commit is to change the evaluation of
date_deadline based on month for 'Quote for 12 Tables' demo data.
As calculating expected revenue for next month give different amount
from expected. This is because previously 4 weeks gives 28 days
and now 1 month will set same date of next month.
Task-3414271
closesodoo/odoo#129103
X-original-commit: c08d69a00e2ab5fa72934bddee804aa17642466d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
To comply with the requirements asked by the Belgian government for
the PoS certification, some changes had to be made to the reports.
As we have to show the turnover of the session on the session report,
we decided to show this for everyone, as this is a useful information
for every user.
closesodoo/odoo#128879
X-original-commit: fbd2116db6c5208d06877831751cd7736f8d37b7
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
The `mrp.production` method `_pre_button_mark_done` will now be public
so it can be called since the web client.
This change is done in order to know if trying to mark as done a
production will return a wizard or not, which is needed in the new MRP
Display view since there is a delay before a MO is actually marked as
done and we don't want to see the wizard poping up after this delay but
before !
The method `_set_qty_producing` public is also public now because it's
called in `_onchange_producing` but saddly, the onchanges don't happen
in the MES view, so this way we can manually call it when needed.
task-3231200
Part-of: odoo/odoo#127250
In `mrp_workorder` (enterprise), we're adding a new view to process
manufacture orders and workorders: MES.
These changes are more or less related to MES. See following for the
main changes.
== Be able to mass produce an ongoing production order ==
Currently once the mo is in progress it's not possible to use
the mass produce feature anymore. Even in basic cases where the
componenets are not tracked. It's also not possible to mark
all the productions directly as done. It's needed in the
mrp display action, so we enable it everywhere
== Manage different flows with tracking ==
Currently there is 2 different flows:
- No tracking -> All the quantities easy
- Lot -> All the quantities + display button to create lot number
- Serial with component not tracked or only one: Mass produce
- Serial that require a match between components SN/Lot and finished
product serial number -> Only display it as one unit with an automatic
backorder/
task-3231200
Part-of: odoo/odoo#127250
Co-authored-by: R1D1CUL0US <clpi@odoo.com>
Co-authored-by: svs-odoo <svs@odoo.com>
- Add table's leg in stock;
- Don't confirm `mrp_production_3`;
- Decrease qty to produce for `mrp_production_1` and confirm it.
task-3231200
Part-of: odoo/odoo#127250
This commit enables the JS tooling for the sign_itsme module, as well as it
removes a rule in the eslintignore file that is not valid anymore since the
static/src/js folder does not exist anymore in sign.
task-3286974
closesodoo/odoo#126296
Related: odoo/enterprise#43103
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>