Main resource document to be found at https://www.economie.gouv.fr/files/files/directions_services/dgfip/controle_fiscal/actualites_reponses/logiciels_de_caisse.pdf
This document states that only business operations with partners not being subject to VAT should be inalterable and secure.
We adpat the module by differentiating between b2c and b2b journals and apply hashing on the former's moves
Protection against account_cancel is not necessary anymore
By default, this module considers a sales journal being a b2c, thus activating hashing on its move.
Since we can't afford to lose information, when a b2c journal contains hashed moves, its b2c characteristic cannot be changed
[ADD] l10n_fr_pos_cert: module to adapt the POS to the recent French regulation CGI art. 286, I. 3° bis.
The module adds following features:
- Inalterability: deactivation of all the ways to cancel or modify key data of POS orders, invoices and journal entries
- Security: chaining algorithm to verify the inalterability
- Access to download the mandatory Certificate of Conformity delivered by Odoo SA (only for Odoo Enterprise users)
[ADD] l10n_fr_sale_closing: module to store automatically the total of daily/monthly/annualy sales.
(both of the period and cumulative).
This fulfills another requirement brought by the recent French regulation CGI art. 286, I. 3° bis related to the storage of data
Was PR #20581. Was task 29922
The bug is also present in enterprise but the required style of
enterprise makes the bug invisible. The bug has also been naturally
fixed in 11.0 thanks to the views and design refactoring.
Thanks @auyeung112002 for the original fix.
When you have e.g. an SO with a product MTO generating a manufacturing
order, and you put the delivery order to done, before the MO is done,
you can not cancel the MO anymore, because the cancel method checks if
the move is not done (and raises an error).
As the user stays blocked in this case, it is better to just not try to
cancel the destination move by not propagating the cancel when the destination
move is done.
opw-786571
When you have e.g. an SO with a product MTO generating a manufacturing
order, and you put the delivery order to done, before the MO is done,
you can not cancel the MO anymore, because the cancel method checks if
the move is not done.
As the user stays blocked in this case, it is better to just not try to
cancel the destination move by not propagating the cancel when the
destination move is done.
opw-786571
In some cases the MRP scheduler can remain blocked on an infinite loop
consuming a lot of CPU. The reason comes from the loop 'Check done
procurements'
If a new procument is created from another process (such like MTO
orders) during this loop, the process never ends.
The only way to reproduce is in debug mode:
1. Put a breakpoint on line 'Check done procurements'
2. Launch the MRP scheduler manually and stay paused on the breakpoint
3. In parrallel, create and confirm a sale order with a MTO route, this
will trigger the creation of a new procurement order in state
'Running'
4. Continue debugging step by step the scheduler and you will notice
that the loop never ends.
Closes#21565
opw-787651
Have the following location structure: Loc A -> Loc B -> Loc C
The `complete_name` fields are:
- Loc A
- Loc A/Loc B
- Loc A/Loc B/Loc C
When changing Loc A to Loc D, the `complete_name` are:
- Loc D
- Loc D/Loc B
- Loc A/Loc B/Loc C
Compute `complete_name` of stock location using `complete_name` of
parent instead of parsing the full bunch of ancestors. This improves
the computation speed, and moreover solves the recursivity problem.
Closes#21585
We have problems when trying to validate our EU VAT report because some vat number are wrongly encoded in Odoo.
There are 2 problems:
1) We use vatnumber library to check the validity of the VAT number entered by the user on website.
That library removes the following characters '.' and '-' in order to perform the check and
thus can return True for a number like 123.123.123.13 or -123-3454-34
And those VAT number are then saved in our database but are rejected by the state
as VAT number should only contains alphanumeric character
-> Solution: prevent entering vat number with other characters than alphanumeric for users that are located in EUROPE!
2) Usually VAT is prefixed by country code, however some people in europe managed to bypass the system
by prefixing their VAT number with CC instead of their country code, CC is consider valid in odoo
(it means Country Code) but is not a valid European country code in general, which means that those
people that should have pay some tax have not. Which is a huge problem.
-> Solution: prevent the use of CC as country code by the user when entering a vatnumber only if the user country is in EUROPE!
source: https://en.wikipedia.org/wiki/VAT_identification_number
opw:785443
costs_hour field no longer exists
Some modules in a different repository (let say enterprise), may be still using
it but it is not its place here.
For stability reasons, we keep the computation if an external module adds the
missing field anyway
Fixes#16269Closes#20899
Improve performance (* 2.5) on _compute_reserved_availability
`mapped` makes use of orm prefetch, which is inefficient in this use
case when facing high volume.
Closes#21198
On MS Windows, the mimetypes module relies on the Windows Registry to
guess mimetypes. As a consequence, when generating assets bundle for
javascript files, the mime type of js files may be wrong. In that
particular case, the Odoo user is facing an empty web page.
This commit enforce 'application/javascript' for js assets when they are
saved as ir_attachment in the database.
This commit is a backport of 77ca51f
It was the purpose of this commit fea667a243
However it uses purchase uom in any cases and not
only vendor bill.
This commit correct it by using it only if a purchase
order is linked to the invoice.
As the field digit doesn't exist on currency, we use decimal_places
instead which is the field containing the number of digits of the
corresponding rounding field
As there's a check for unique supplier reference numbers, you can't duplicate them as the field is copied on the duplicated record. This patch removes the copy for emptying the error.
@Tecnativa
Before this commit, when a localization defined default payable or receivable
accounts on partners (like l10n_do does)
The reconciliation tests that involve an invoice on the one hand and a payment on the other hand
broke just because the accounts of the payment and the one of the invoice did not match
After this commit, we force the receivable or payable account to be the partner's (if available)
and the tests do not break
Before this commit, when printing all orders from the POS interface,
the ticket sometimes showed weird amounts (like 128.25000000001).
This was due to the usual problem of representing a float and has nothing to do with Odoo.
After this commit, the templates correctly display the amounts, rounded according to the currency
We do this by applying the relevant qweb widget (or calling the right format function in JS)
OPW 784626
Related fields that are not readonly are rewritten each time you save the
associated record, provoking performance problems.
Moreover, we don't want to allow an employee to change its department through
an attendance record.
Closes#21441
In Pick - Ship:
- validate a sale order which scheduled date is an hour in the future.
- validate the WH/PICK picking
Before this commit the WH/OUT picking 's scheduled date was set a day in the **past**
This was due to the implementation of datetime substraction and timedelta, which,
in case of a negative value, would take -1 day and some complementary values (hours, minutes etc...)
(the difference is complementary)
After this commit, the WH/OUT picking 's scheduled date stays what it was in that particular use case.
OPW 784452
Several issues arise with the virtual keyboard.
Issue 1
- Go in client list
- Go back to product list
The keyboard is still connected to the client search field.
Issue 2
- Go in client list
- Add a new client
- Click on any field
The keyboard is still connected to the client search field, it's
impossible to fill in any client data.
opw-784613
Before this commit, you could never get the user's facebook email. Since there
was no email field on facebook response, email would be then set to an auto
generated value like 'provider_2_user_0123456789123456' by odoo.
Now, we correctly request user's email to facebook.
opw-782771
3ad1867e could lead to wrong results in a multicompany setting because
the change got the company from the lead but it was intended to be
gotten from the user.
Since ('company_id', 'child_of', False) returned "root" companies, the
code still got a sales team but possibly one from another company if the
user was on another company that its sales team.
This would lead to an access issue that this commit solves.
opw-784455
closes#21428
When searching for a partner the ' ' (SPC) character can be used as a
field separator. You can search for e.g.:
'agr namur'
which will return the 'Agrolait, 69 rue de Namur,...' partner.
For some reason only the first space was considered a separator. So
e.g.:
'agr namur belgium'
wouldn't work.
This commit makes it so that every space character is considered a
separator.
Fixes#21357
When doing a group_by in a tree view, and then ordering by an
aggregated field which contains at least one capital letter in its name,
you will get an error and won't be able to ordery by this field.
Why? read_group is called when sorting a group by, which calls
_read_group_raw which then goes to call _read_group_prepare, which will
return order by terms in this manner ['id asc', 'x_Test desc']
the problem with this is that postgres automatically converts
non-quoted/non-qualified column name to lowercase, of course this means
that if we have a field "x_Test" but no field "x_test", it will try to
look up "x_test" instead of "x_Test" and since the column doesn't exist,
it will throw a ProgrammingError.
This commit changes this behavior by wrapping the order_by terms generated in
_read_group_prepare with double quotes, which postgres interprets
correctly.
Fixes#21348
Cherry-Pick of c338e24ee7 as previous
forward-port has been badly done...
When updating the quantity of an MO, the qty we are producing on a work
order should possibly be updated. When the finished product is tracked
by serial number it should be 1.0 when some quantity is still to be
treated. (and not 0 as before)
opw-785190
When doing a group_by in a tree view, and then ordering by an
aggregated field which contains at least one capital letter in its name,
you will get an error and won't be able to ordery by this field.
Why? read_group is called when sorting a group by, which calls
_read_group_raw which then goes to call _read_group_prepare, which will
return order by terms in this manner ['id asc', 'x_Test desc']
the problem with this is that postgres automatically converts
non-quoted/non-qualified column name to lowercase, of course this means
that if we have a field "x_Test" but no field "x_test", it will try to
look up "x_test" instead of "x_Test" and since the column doesn't exist,
it will throw a ProgrammingError.
This commit changes this behavior by wrapping the order_by terms generated in
_read_group_prepare with double quotes, which postgres interprets
correctly.
Fixes#21348
Before this commit, when a product category had a similar name than an other
e.g. ALL / Exp and ALL / Expenses
When entering the list view of its products, it displayed the product linked to the category with the similar name
e.g. When opening ALL/Exp products list, it displayed its products **plus** the products of ALL/Expenses
After this commit the list view just contains the active category's products
OPW 782905
Before this commit, the smart button on the form of product category
only displayed the number of product for the current category,
whereas the list view of products (when you clicked on the smart button)
displayed all sub-categories products.
After this commit, the behavior is harmonized: all sub-categories products
should be accounted for and displayed
OPW 782905