While in practice you would never get this inverse
called with more than one record at a time, it is
still wrong to get the company of self in the loop.
Fixing it to keep good conscience :)
closesodoo/odoo#161979
X-original-commit: 56fe4f71f0cca2ca11624bd267e1dec4de2ac929
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Add support for the Malaysian Peppol PINT specialization,
allowing to generate the related XML file.
This also adds a few additional features that are in the
specifications:
- SST registration number, needed in the xml and on the
invoice.
- TTx registration number, needed on the invoice.
Both numbers are optional, but if the business is registered
in any of them they are required to display these on the
invoices and they are required to enforce some rules. (cannot
send taxes that are not 0% "Out of scope" if not registered with
SST, ..)
Task id # 3647922
closesodoo/odoo#159407
Signed-off-by: Julien Van Roy (juvr) <juvr@odoo.com>
At the moment, the partner being used to get the information
for the efaktur module is the partner set on the invoice.
This is wrong, since if the partner set on the invoice is a
child record of a company partner you cannot set most of these
fields.
To fix this issue, we will update in order to fetch the efaktur
related fields from the commercial partner instead. (vat, along
with all efaktur specific information used in the process)
closesodoo/odoo#160267
X-original-commit: 108a87407b7c46cc1682d93524398a968b025441
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
The account_qr_code_emv module has an issue at the
moment where it will only return errors in
_get_error_messages_for_qr for the country the qr
code is intended for.
This makes sense since you want to check all countries
in later versions where we have multiple of them.
But it causes an issue with the standard implementation
where if you are using a country that is not supported
by an EMV QR, _get_error_messages_for_qr will just
return None.
This means that:
- The default QR CODE selection on the invoice that
depends on that may select EMV QR for unrelated
countries.
- If it gets selected, this method will not check
that the currency is correct for said countries.
To fix this issue, we will simply return an error
message in the common module, which will serve as a
fallback once all the EMV QR methods have been checked.
Task id # 3758668
closesodoo/odoo#156847
X-original-commit: 5290fb7a2d400ce1c9732e8d835f6b7990c0d145
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
This tasks aims to improve the out-of-the-box configuration of the NZ
localization by updating some tax groups, taxes, accounts and default
COA settings.
Task ids 3647518 & 3647460
closesodoo/odoo#154541
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Starshipit is the leading provider of integrated
and automated fulfilment solutions for online businesses
integrating with the main carriers used in Australia and
New Zealand, such as Australia Post, DHL, Aramex, CouriersPlease and more
This PR will add support to integrate with starshipit directly in Odoo,
providing rates and shipping for users who need it.
Task ID # 3041982
closesodoo/odoo#135839
Related: odoo/enterprise#47569
Related: odoo/documentation#7798
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
As of the first of March 2024, the SST tax
will increase from 6% to 8%.
To that end, the current 6% tax will be set
to inactive by default, and we will add
a new 8% service tax to replace it.
Task id # 3748127
closesodoo/odoo#154966
X-original-commit: 772d16bc6da7a696681805be42ca48e8cfd13db2
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Adds the tax report, associated tax grids along with new taxes,
required in order to generate a tax report as well as a SLS/P report
Task id # 3211351 and 3468278
closesodoo/odoo#150619
Related: odoo/enterprise#54908
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Kode transaksi is a required field on account moves.
This field is either set on the move itself, or is
taken from the partner.
It NEEDS to be set when invoicing, but customers
cannot provide this values by themselves when
registering for example. This would cause issues
with automatic subscriptions amongst other systems.
In order to fix this issue, we will define the code 01
as default value.
closesodoo/odoo#151265
X-original-commit: 846f7cc9a7dbec4f9c6631ae2ccd484f9af47dd8
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
The computation of such taxes were wrong, thus we
update the tax template to correct the computation
and the tax tags.
Task id # 3645628closesodoo/odoo#149978
X-original-commit: 4fb468be5b40a4eb426dee293526ef48eb826e15
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Recently, the vat validation was changed to
support 16 digits vat introduced in Indonesia
in January 2024.
This change replaced the stdnum validation,
but did not handle vat numbers written using
the standard presentation format.
This is fixed here, where we will remove the
characters used in this format and strip the
vat before doing the validation on the digit
amount.
closesodoo/odoo#148386
X-original-commit: 4c8629228f7842501d5a067451abca24d1089bf9
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Fix a small issue with the trusted account lock system, where we would raise an error
when you change the partner or account number on a record at the same time as you untrust it.
Before this fix it would be blocked, and you would need to untrust, save, and then redo the
change in a second edition for it to work.
At the same time, we will allow the process to untrust an account and change values at the
same time.
Task id #3647635closesodoo/odoo#147089
X-original-commit: 3815ccea98c95130a770772aa29c87112e695914
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
In an effort to make the module more accessible
in its target country, add translations to the
module. This mostly concerns error messages.
Task id # 3570055
closesodoo/odoo#145116
X-original-commit: 8b504af3226ed1e2581e19736a7f7675aa7a30ee
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Improve the uninstallation of payment providers by allowing to
uninstall payment providers which have a payment method line on
a journal but no payment yet.
Task id #3595006closesodoo/odoo#142112
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Update the japanese tax group template names to
better fit the needs.
Task id #3315696closesodoo/odoo#143091
X-original-commit: 580495a53cf61bd57c609856b48772c6b5c9fe25
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Adds the SST-02 tax report to the Malaysian
localisation
Task id # 2868179
closesodoo/odoo#140030
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
In AU, it is customary to name proof of payments document
with different headers if the partner is a customer or a
supplier.
If the partner is a customer, the current "Payment Receipt"
is expected.
If the partner is a supplier, "Remittance Advice" is expected.
This change will bring this to the payment receipt report
if:
- the australian localisation is installed
- either the company or the partner are from Australia
Task id # 3465257
closesodoo/odoo#139543
Signed-off-by: Laurent Smet (las) <las@odoo.com>
At the moment, the efaktur system will consume a number even
for invoices not using any taxes.
This change will try to avoid that by not consuming numbers
for invoices when no lines has a tax_ids set.
task id #3130665closesodoo/odoo#139757
X-original-commit: 59c434773c17f81d3a1c160407e8b4533f48e911
Signed-off-by: William André (wan) <wan@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>
The commit https://github.com/odoo/odoo/pull/128376 fixed an issue related to rtl languages,
but at the cost of the pencil position.
By making the span containing the value a display: block the pencil could no longer be placed
on the side of the value and was instead pushed on top.
This small fix will just place the pencil inside the span, in order to get it back aside the amount.
Task id # 3548687
closesodoo/odoo#138408
X-original-commit: 718fe9396aebec1c0a15c5064202f6350cdf346a
Signed-off-by: William André (wan) <wan@odoo.com>
The efaktur export has rounding issues due to the fact that
we need to display both the amount_untaxed and amount_tax rounded to 0 decimals
as well as the detail of each line.
As the rounding of the sum will most of the time be different to the sum of rounded
lines, the government website refuse the resulting file.
This fix will try to improve things a bit by:
- Avoiding to round the values while we are still manipulating them.
- Round the values once when the initial computation is done for the lines.
Once all lines have been computed, we will:
- Find the difference, if any, between the rounded amount_untaxed and amount_tax
and the line totals and round that too.
- Update the first line with enough value in the result with that value in order to correct the total
- Finally, round the values for representation to two decimals.
If we cannot correct it in a single line, the correction is split in multiple lines.
Hopefully, these steps will help ensure that the sum of the lines will be equal to the
rounded values of the amount_untaxed and amount_tax and thus be correct.
Task id # 3420220
closesodoo/odoo#136996
X-original-commit: 65e7446ffad5c87ec44f1012e709606b44f3af39
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
The demo company vat number would fail the check in base_vat
and thus always cause the demo company to not be added when
installing l10n_sg.
So we replace it with a number that passes the check to ease
testing and avoid throwing errors in the face of our users if
they want to try that localisation.
Task id #3366323closesodoo/odoo#124948
X-original-commit: c5bc8673b661e3ab6c17d6988e56a014a5b915cf
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Improve some aspects of the recent res partner bank improvement:
- the url toward the docs open in a new tab
- fix the account creation by disabling the readonly when trusted
while the record isn't existing in the database yet
- improve the visual of the setting by putting it in the accounting
section
closesodoo/odoo#120423
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Fixes an issue with the tax total computation that would happen
if the tax of type group has the same tax_group_id as one of the
children taxes.
This would lead to a tax total computation where the other child
of the tax will be summed into the child sharing the same tax
group.
As it is no longer possible to set a tax group id on a tax of
type group, we do not need to take it into account when computing
the tax total anymore.
To reproduce before the fix:
- Make a bill with the Australian tax au_tax_purchase_10_service_tpar_no_abn.
- Save.
- You will notice that the amount in the tax total widget for the tax
"GST 10%" is wrong as it takes into account the amount of the other
tax.
After the fix, the amount will not be wrongly grouped anymore. And the
tax total will correctly represent what is in the line_ids.
Task id # 3252271
closesodoo/odoo#117093
X-original-commit: aa736d7d0189784e6ff81b7acfcd0ac0e1cbe6b7
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
You cannot validate and expense report having expense_line_ids of
different payment mode.
But so far, it was possible to select these lines, and it would
be blocked upon saving.
We will improve this behavior by extending the domain on the
expense_line_ids field and disallowing to add lines that would lead to
an error later in the process.
It will also correctly handle the creation of new line via the expense
report form view, and add the paid by field as optional hidden in the
view in order to allow to find more easily the expense line that are
causing issues.
task id # 3221780
closesodoo/odoo#116077
X-original-commit: ec18bd414c831a9af67802dcd5d7181ef8d43049
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
There is an issue with the search panel categories that has a limit=20;
It means it will only display the categories matching the expense
reports in the view if they are in the 20 first records fetched.
As this search field isn't really useful, it was decided to remove
it completely.
Task id # 3224719
closesodoo/odoo#116074
X-original-commit: 376e6aac2854f291c0b919451c34595b2c2d3060
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
So fat, the default sale and purchase taxes were so on the
account.accounts depending on the user type id.
These taxes were meant to be used as default taxes on products
and not accounts, so this is not right.
It also is an issue since the default tax isn't visible
on the COA list until the user add it from the optional fields.
Task id # 3223731
closesodoo/odoo#116111
X-original-commit: f1a9414f3cbe83bfde7e401e90b641668bd0ca14
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Fix the populate script of account bank statements that
would try to create statement lines with an amount set to 0.
This is wrong, and also causes the populate to fail because
of a constrains
closesodoo/odoo#115597
X-original-commit: 273b99adc34d478d62d107040eae1db3ca883f6e
Signed-off-by: William André (wan) <wan@odoo.com>
In order to ease the process of setting vats for some users, it was
decided to allow to use a vat number of a single character ('/' for
example) without checking it. This allows to differentiate between
partners for which we did not set VAT yet, and partners exempted from
VAT/without a number.
The VAT check was recently adapted to handle this use case, but the
"same vat" warning was forgotten in the process.
This additional change will disable the "same vat" warning that appears
when two partners share the same VAT number if that vat number is
only a single character, aligning the behavior of the warning to the
changes done in the vat check itself.
closesodoo/odoo#114640
X-original-commit: 4d80d30d0db6993a2fbbab59b935abe07080074b
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Odoo does not have much in terms of payment protection; you can create
payments to any account you want without many checks.
This changes it by requiring users with the right groups to trust an
account before allowing it to be used for payment methods requiring.
Also adds some warnings on the bank account view, and checks at the time
of creating a payment.
Task id # 3210415
closesodoo/odoo#114278
Related: odoo/enterprise#37789
Related: odoo/documentation#3737
Related: odoo/upgrade#4397
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
The placeholder on the partner name was working for a partner that is
an individual but not company. This will fix that.
Task id #3138441closesodoo/odoo#111324
X-original-commit: 00256249f880b1b6de3fc768beb0a2bc56191ada
Related: odoo/enterprise#36452
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Improve the partner view by reorganising the city/state/zip row, making
the order of the fields dependant of the country address_format.
This is done to ease the use of these view for our users by displaying
a format they are already used to.
Task id #3138441
X-original-commit: c646f7bb80cb7f9af689082752608b554f1a648b
Part-of: odoo/odoo#111324
The accounting date was only visible in list view for misc entries.
For fiduciaries, we would like to have it also visible in these views.
As there is no simple way to only have the column visible when quick
edit mode is enabled, we compromise by having it always available, but
with optional=hide
Task id #3138441
X-original-commit: c208a91e926ec2a98bfbaee068284222fbc0ff05
Part-of: odoo/odoo#111324
A common use case for fiduciary is to use the available tax edition tool
on the tax total of an invoice to round the total of an invoice.
This is not supported by ubl, which will re-compute the taxes upon import
and thus lose that manual rounding.
This change aims to correct that, by post-processing the invoice after
creation in order to correct the tax amount to the one in the XML if the
different isn't superior to 0.05.
Task id #3138441
X-original-commit: 5bc87804bf5bba49ffd939c844439b87e08b499e
Part-of: odoo/odoo#111324
This was until now blocked by the_unlink_forbid_parts_of_chain ondelete.
It was still possible to do it manually by removing the
sequence name before deleting the invoice, and will now
be possible without that extra step.
Task id #3138441
X-original-commit: 6112f4f59aeb5dc5a3b698edd861b19f25da7017
Part-of: odoo/odoo#111324
To that end, we will now do the VIES and regular VAT
check separately.
The VAT check stays as a constrains, while the VIES
check will now be done in an onchange and simply
display a warning if it fails.
We will also now allow VAT with a single character to
ignore the checks. This will allow users to better
distinguish partners for which they didn't enter VAT
against partners which are not subject to VAT by setting
the later's VAT to '/' or any other characters.
Task id #3138441
X-original-commit: eff3b140cc88dd48b77948a577f195f2e1910fd8
Part-of: odoo/odoo#111324
There is a lot of use case where reports are exclusively in the company
currency, or have columns only in this currency. In these case, showing
the currency symbol is redundant, takes space and makes the reading
slower.
With this change, we will avoid displaying the symbol in a variety of
use case where it is not needed.
Task id #2868674closesodoo/odoo#109666
Related: odoo/enterprise#35671
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Fix an issue in the form view of the ir ui view where,
in the edit view dialog, the right group labels would be
all squished up if the xml_id of the view is long.
E.g. the bank reconciliation view.
This is fixed by adding the text-break class to the field.
Task id # 3133662
closesodoo/odoo#110039
X-original-commit: cd1a75f6e9349d8a9ff59c4e65e1d52403e531e9
Signed-off-by: Julien Castiaux <juc@odoo.com>
Improve the bank statement report by reducing the amount of
blank lines in it, as well as adding more information about
the partner and bank account when we have it.
Task id #2860753closesodoo/odoo#93162
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
A move in draft created with an account that is later deprecated can
still be posted, while it shouldn't be allowed.
Thus, we add a new error blocking this wrong behaviour.
Task id #3087763closesodoo/odoo#107354
X-original-commit: d8c2ad469299349e5184bc8986183cb205beb16a
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
The tour is failing undeterministically, seemingly because a step is
done too soon after the previous one without giving the time for the
website to reload everything as expected.
By reordering the steps a bit, this issue can be avoided and fix the
test issue.
closesodoo/odoo#105891
X-original-commit: ff91efcda8cb80da4c376e74714f4c0dedad63c1
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Add a setUpClass with a dummy payment provider to ensure that at
least one is always available when the tour is running, and set
the company country_id to None before starting the tour to avoid
any country dependant fields to block the tour during the checkout
process.
closesodoo/odoo#105700
X-original-commit: 779965fbf0471f2b003692f1afa541864a396651
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Some tests are running tours, which have triggers on the amount.
The issue is that if the test is running on a company with another
currency than usd, and these tours ends up using a pricelist in USD for
example, then the prices in the website will be adapted and no longer
match the trigger in the tours.
This change aims to correct that by ensuring that only one pricelist
can be used when these tours are running, and that this pricelist
currency matches the one from the company. As such, the prices will be
as expected and the tours will run properly.
closesodoo/odoo#105523
X-original-commit: 9a81cf604bbbc626a0fa68219a4fe017cd781bc7
Related: odoo/enterprise#33836
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Because it causes them to be inconsistent with their images,
and causes issues with some website tours depending on them.
X-original-commit: cfbe95ae05fd0c87e24668fc8550da9fdd7ee70d
Part-of: odoo/odoo#105523
The tour snippet_cache_across_websites is at some point switching
between websites. The selector would be taking the second option in the
website list, which may not be correct if a module is adding a website
in its demo data.
This change aim to always switch from website 1 to website 2, without
caring about any other potentially existing website.
closesodoo/odoo#104596
X-original-commit: 7f756cfd5abc740e1a93a3225481c36279f094ed
Related: odoo/enterprise#33444
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
There is a check done during the receipt generation in the pos that
checks the country code of the company, assuming it is set. But it
is possible to have a company without a country set so we need to handle
this use case.
X-original-commit: 19849c61f0f8b1cb3ddc588885953158482a079f
Part-of: odoo/odoo#104389
Improve the NZ localization by enabling the anglo saxon accounting by
default, and adding a new default stock output account.
task id #2993527closesodoo/odoo#104081
X-original-commit: b1f4b19fa1fd27892430ede363358cf0f17fc796
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
The label for due date was targeting invoice_payment_term_id
instead of due date, thus not profiting from the readonly rules
and being muted when it should not.
closesodoo/odoo#103344
X-original-commit: 9da25683e918838609ffdac87c979f883d11d027
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
You cannot set a receivable or payable account as a bank account of
a bank journal directly, but it is very possible to just set an
account of another type, then change the type of this account to
receivable.
This new constrains will make sure that you cannot change the type of
an account.account set as bank account on a bank journal to any of those
two types.
closesodoo/odoo#102790
X-original-commit: f9500ca4c898cd86681cc2e48ec2c66cf5670917
Related: odoo/enterprise#32579
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
The resequence form view css has been broken, this aims to restore
it as it was in previous versions
X-original-commit: aa1fc47cc52b7ae51fb66ba077eb8b2691d0dbff
Part-of: odoo/odoo#102790
The fiscal country field could be used to create a new res country or
open the form view and allow to change things such as the country code.
This is obviously an issue and shouldn't be allowed.
closesodoo/odoo#102708
X-original-commit: 0881199fba43e01d6d7613eff00549eac5827480
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
The tax group model doesn't have a form view leading to a left side
bigger than the right side and some fields showing that we don't
want to see.
Thus, we add a form view and hide the field country_code, that is
not needed here since we already see the country_id.
closesodoo/odoo#101519
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
In order to better display the functionalities, we will change how
the demo data for bank statement are created. There will now be one
bank statement and multiple bank transactions not linked to a statement.
Also rewords one error to be clearer.
closesodoo/odoo#101466
X-original-commit: 5e14b28905fc00bad2c2ccd40328c676d049917d
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
Opening the account move line form view from here is not useful,
as most would do it only to access the move behind it.
In order to display more relevant information, the move line
on the analytic line form view will instead directly open the
account move of the move line.
closesodoo/odoo#101491
X-original-commit: 1a861bd5d9f9a01e815e53f147c950f1535789c5
Signed-off-by: William André (wan) <wan@odoo.com>
Move the analytic items menu under the management section of
the Accounting menu.
closesodoo/odoo#101109
X-original-commit: 79e3f311ed9129fadc484446efd320fa58c7b5bd
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
Improve both tree and form views for the account.analytic.distribution.model
closesodoo/odoo#101001
X-original-commit: bb2820ad585ceed0f0562de3cd5f9ef8f1fac7d1
Signed-off-by: Ayob Habib (ayh) <ayh@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
The move line list js has a set thread method that tries to
get the move_id from the list view.
But in the list view, the move id was now missing so it
couldn't find it when a filter on journal entry was set.
This adds it again so that the code can get the information
again.
closesodoo/odoo#100974
X-original-commit: 8857d31bfa6f2e330d296ab6f3ed9223e228f54e
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
The domain was looking for a company with the name 'company_id' instead
of a company with the id in the field company_id.
closesodoo/odoo#100939
X-original-commit: b2d69fbdc48abde082bf7685b112796933921eb2
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
Following reportalypse, reorder the menu items in order to bring
some consistency to the report menu.
Also clean the menu items by removing all the menu items no longer
used since most reports are now selectable by going on the generic
reports and then switching to localized ones.
Task id #2965755closesodoo/odoo#99210
Related: odoo/enterprise#30854
Related: odoo/upgrade#3831
Signed-off-by: William André (wan) <wan@odoo.com>
Some countries, such as mexico, require a seller to be able to
generate an invoices from a ticket from a sale done in a shop,
even after a few days.
This change aims to allow this, by allowing to create an invoice at
a later date after the POS has been closed.
This is done by partially reversing the POS closing entry, and then
generating an invoice the same way it would be done at the POS closing.
The customer can scan a QR code if enabled in order to request the
invoice by himself, requiring him to fill a for to give the customer
information required for the invoicing.
Allows to fill additional fields dependent on the localization that are
required to be set on the partner or the invoice.
Task id #2946604closesodoo/odoo#97675
Related: odoo/enterprise#30599
Signed-off-by: Laurent Smet <las@odoo.com>
When using CABA and reversing a move, we expect the CABA move to
be the one impacting the tax grids, and not the reversed move.
Thus, we now avoid setting the tax grids for CABA taxes on
move lines created when making a reverse move.
Task id # 2895267
closesodoo/odoo#98789
X-original-commit: 5dd50ac1433be262ddd49d8b165e240afd16e675
Signed-off-by: Laurent Smet <las@odoo.com>
Fix the accounting date in a few scenarios, such as exchange difference
or CABA moves reversal.
Also avoid updating the currency rate when reversing exchange difference
moves.
closesodoo/odoo#98543
X-original-commit: 2b8df0c111a785a9e51dc2f528ac5b00cb0eadb9
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
Improve the demo data for bank statement in account by formatting the
payment_ref amounts using the company currency, and fixing the due
amount in one payment_ref to match the statement line amount.
Task id #2855485closesodoo/odoo#98510
X-original-commit: 4b23d11184be9bac5ef9790cc7f38bc4d637b47a
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
Add a new module that makes three new fields available on the invoices.
These fields are required when using facturx to send invoices to
public services through Chorus PRO.
The original template is updated to make it easier when integrating
the ubl refactoring coming soon, and avoid template issues that would
happen with an inherit if the inheriting module isn't updated after the
refactoring deployment.
opw-2714544
closesodoo/odoo#93877
X-original-commit: 4978d90cda34fd6c0b21bacb8462e1b9d4fb1241
Signed-off-by: Laurent Smet <las@odoo.com>
Improve the tax report section of the journal audit by adding a
background color to it, as well as reducing the width of the tables.
Ease the navigation from the journal audit report by adding three
new actions:
- Taxes in the tax applied section can be clicked to audit them
- The tax applied and the impacted tax grid sections now have an
audit button to open a group-by view of journal items grouped
appropriately according to the information we need.
closesodoo/odoo#92846
Related: odoo/enterprise#28025
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Improvement in two ways:
- Implement a new, accounting report version of the existing journals audit
pdf report, and remove the old journal audit report (PDF only).
- Remove the menu items in "accounting" that opens the group by view of journal
items with different filters. Now, these will be linked to actions on lines in
the different reports available to the user.
Also render the "journal items" menu visible without debug mode.
Task id #2838182closesodoo/odoo#92438
Related: odoo/upgrade#3560
Related: odoo/enterprise#27840
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
This feature isn't available as of now, and users that wants to do
this would have to use the similar report in Sale as a workaround.
As this is not always possible nor great, introduce this new measure
to display the line total tax included.
task id #2831312closesodoo/odoo#89654
Signed-off-by: Florian Gilbert <flg@odoo.com>
https://github.com/odoo/odoo/pull/85150 introduced the method
_render_qweb_pdf_prepare_streams called from _render_qweb_pdf
giving it its res_ids.
Two places in this method are assuming res_ids will be a list, but
it is not always the case. Plenty of call to _render_qweb_pdf is
giving it a single id as a parameter.
This will ensure that res_ids is a list by creating one for single ids
too before proceeding with the logic of the pdf rendering.
closesodoo/odoo#91631
Signed-off-by: Laurent Smet <las@odoo.com>
The _get_unece_code method does not work in case where a specific uom
has multiple xml_ids.
Change it to handle such case and try to match every xml ids with a
unece code if possible.
closesodoo/odoo#91076
X-original-commit: d488b3cde3701b5eb69ac36cb6bbcc913956a0d4
Signed-off-by: Florian Gilbert <flg@odoo.com>
The xml we generate for factur-x is no longer compliant with all
the latest standards. With these changes, we are providing the tools
to make it work once again and make sure it is validated by the
factur-x and zugferd validators in all aspect (PDFA/3, XMP, XML)
It should also be valid to be sent to Chorus pro if applicable.
This adds a mapping to the UNECE unit of measure codes for uom, that
are required for factur-x.
It will also calculate a category for each taxes as such:
- If the tax is an export from EU to outside EU, G.
- If the supplier and customer are both in EU but different country,
K
- If both are in EU, in the same country but the tax amount is 0, E
- Otherwise, it will be S.
See https://unece.org/fileadmin/DAM/trade/untdid/d16b/tred/tred5305.htm
opw-2714544
closesodoo/odoo#90105
X-original-commit: e1bfb363bccd7b84f660d1e6c5b1e4d4fe02d398
Signed-off-by: Laurent Smet <las@odoo.com>
Add a check in 'AccountTestInvoicingCommon' to ensure that all
tests using it are run in post_install.
These tests cannot be run at install, thus they would be ignored
and wouldn't run on the Runbot.
X-original-commit: 659ee179e1beed962026e3abac1bda322c2ac964
[FIX] account,*: Ensure tests using TestInvoicingCommon runs
Add a check in 'AccountTestInvoicingCommon' to ensure that all
tests using it are run in post_install.
These tests cannot be run at install, thus they would be ignored
and wouldn't run on the Runbot.
closesodoo/odoo#90242
X-original-commit: ec36b403edda3fbe3b5bd5f30f31ef6bad680967
Related: odoo/enterprise#26791
Signed-off-by: Florian Gilbert <flg@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
There is an issue where we redirect to a list view/form view of
res.partner but with id's from res.partner.bank, thus redirecting to
the wrong views.
closesodoo/odoo#88865
X-original-commit: a1cce790fcd2d1823fb9e3d5c3c3e916d34568e5
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
Fix two issues linked to payment methods and their journal link.
SEPA Credit Transfer was marked as only available on EUR journals, but
from what we have been told, and we have seen, it should also be made
available for other currencies (CHF/SEK).
So we are changing the rule used to determine if SEPA Credit Transfer
is available on a journal to allow to use it on journals using CHF or
SEK as a currency.
There is another issue, where the filtering is done differently at the
journal creation and when the user add the payment method manually in
the lists.
The filter rules were not respected at the journal creation, which
would lead to incorrect default inbound and outbound payment method list.
For example, a new journal would have the company currency (let's say,
USD) but still have SEPA Credit Transfer (EUR,CHF,SEK) added on it by
default while it should not be available there.
opw-2777522
X-original-commit: 0ad8faf3bfc7b28e5668c3445fcc06c24ad98354
[FIX] account_*: payment method journal filter
Fix two issues linked to payment methods and their journal link.
SEPA Credit Transfer was marked as only available on EUR journals, but
from what we have been told, and we have seen, it should also be made
available for other currencies (CHF/SEK).
So we are changing the rule used to determine if SEPA Credit Transfer
is available on a journal to allow to use it on journals using CHF or
SEK as a currency.
There is another issue, where the filtering is done differently at the
journal creation and when the user add the payment method manually in
the lists.
The filter rules were not respected at the journal creation, which
would lead to incorrect default inbound and outbound payment method list.
For example, a new journal would have the company currency (let's say,
USD) but still have SEPA Credit Transfer (EUR,CHF,SEK) added on it by
default while it should not be available there.
opw-2777522
closesodoo/odoo#88677
X-original-commit: e2cd91ad8339f73b2547bc839e675443528f3adf
Related: odoo/enterprise#26172
Signed-off-by: Florian Gilbert <flg@odoo.com>
Improve a few things in accounts modules:
- Users wants to be able to change the account in the general ledger
list view
- Do not group by date by default when auditing a tax line.
- Make the currency fields only show in debug mode for accounts and assets
- Disallow to delete taxes linked to a tax repartition line, and
clarify the error message when trying to delete one linked to a
fiscal position's account mapping
Task id # 2810379
[IMP] account_*: some Back2Basics improvements
Improve a few things in accounts modules:
- Users wants to be able to change the account in the general ledger
list view
- Do not group by date by default when auditing a tax line.
- Disallow to delete taxes linked to a tax repartition line, and
clarify the error message when trying to delete one linked to a
fiscal position's account mapping
Task id # 2810379
closesodoo/odoo#87659
Related: odoo/enterprise#25770
Signed-off-by: Laurent Smet <las@odoo.com>
Not all company needs a French TVA number but still needs to provide
FEC file.
Improve that by making the TVA number optional, allowing to export the
FEC file without it. The only difference is that in such case, the vat
number won't be appended to the file name.
Task id #2801629closesodoo/odoo#87620
X-original-commit: 59937bbea86a9d01bb7038f7e307fd88fbb82976
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
The journal in a cut-off has to be of type general. But there is an
issue at the moment where a default_journal_id would be provided in
the context (coming from the dashboard for example) and thus, fill
the journal in the cut-off wizard with a wrong value (vendor bill for
example).
This change make sure no default values are provided to the wizard.
closesodoo/odoo#87179
X-original-commit: 5b099bf6135b2ff517078d1839b513da7830f718
Signed-off-by: Florian Gilbert <flg@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
Since https://github.com/odoo/odoo/commit/cb6c6224be4eaa80091f51f957059de889332e68
we are now raising possible errors when uploading an invoice.
In 14.0+ we are allowing via a redirect warning to change the status of
the currency without changing the page but the upload only starts when
you change the uploaded file.
So the following flow does not work:
- Try to upload a bill with MXN currency
- With MXN being inactive, it raises an error. Using the redirect warning action
we activate the currency, clos the modale window and try to upload
again.
- The upload won't work until we refresh the page, because the value
of the input file does not change (or we need to select another
one, then the first one again)
This change reset the file input if there is an error raised during the
upload allowing to select the same file more than once without reloading.
closesodoo/odoo#86539
X-original-commit: 4bfc75075217adc32de8df008128bbaa8c6c158d
Signed-off-by: William André (wan) <wan@odoo.com>
see https://github.com/odoo/odoo/pull/77771https://github.com/odoo/enterprise/pull/23738
These PR are updating a template and adding a new dependency in
account_report. This has the side effect of making account report
raise a traceback when invoicing has not been updated prior to that.
With this change, we will bump the version of account and use it to
make sure that it has been updated as we would expect prior to updating
account_reports. If not, we will raise a user error with an explicit
message asking the user to update invoicing.
closesodoo/odoo#86217
X-original-commit: 0ec9e16cae0cdaa99cfb181b40658e15e34e0b14
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Christophe Simonis <chs@odoo.com>
Journal groups name are used as an identifier in reports,
namely on financial reports when a company has different reporting requirements
- on company level
- on consolidated level
- according to IFRS standards
This will add a constraints to ensure that groups name are unique.
Task id #2759252closesodoo/odoo#85958
Signed-off-by: Laurent Smet <las@odoo.com>
Retroactive fix for an issue in 15.0+
In 15.0+, importing an invoice with an inactive currency will raise
a traceback. Before this it was handled by not setting the correct
currency on the invoice if not active.
With this change, we'll raise an error instead of creating an invoice
with the wrong currency.
closesodoo/odoo#85678
X-original-commit: 14c61c2563efeed1ca14294da32e2eb6d1855c5b
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
The accounting date and the related warnings were in some cases not
being set properly. This change aims to improve that by displaying
warnings in the view and updating the date on post instead of raising
user errors.
This will mostly affect sell documents.
Task id #2778958closesodoo/odoo#85744
X-original-commit: 51ddb870d346ff61a6ae36c8c3b545eaca9736cb
Signed-off-by: William André (wan) <wan@odoo.com>
As of now, the discount field is either only shown in
debug mode or if the sale module is installed and a
setting is set in sale.
This field should be shown in the view, and not depend
on a setting from another app.
This is especially true as it could be filled by the ocr
or when uploading from an edi, and it would be inconsistent
if the user couldn't display it.
Task id #2758965closesodoo/odoo#85737
X-original-commit: eb1a77753debdb034ad00ce10d908f4b9ee264ad
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
The demo data created by account did not call _onchange_price_subtotal
on the created account_lines, making the total debit
and credit not matching the state of the lines.
closesodoo/odoo#85188
X-original-commit: 403939ea7b460b95cc31993613f5cba5f5fefcfa
Related: odoo/enterprise#24651
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
Improve the journal audit report by adding information about impacted
tax grid for each computed journal.
Task id #2658937
X-original-commit: 09848ba2ae5bd0f25c20a20e73089a5a0f1c8f74
Part-of: odoo/odoo#85188
There is an issue with the Italian carryover, line vp14b.
Use case:
- Month 1, have a value of 25 in this line => will trigger a carryover to line vp7
- Month 2, add more value to vp14b so that it goes above 25.82.
This will set the bound as None, and thus this will not impact the carryover.
This is wrong, because then the next month we will see a value of 25 in vp7
while it should be 0.
closesodoo/odoo#84938
X-original-commit: ffbc7af321a36d4fd0aebb94d7a636cb1fc34b88
Related: odoo/enterprise#24555
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
When combining the context for an RPC, the
additional context is being added before the raw
context.
Because of this, a use case such as:
- A o2m field with a context {'field': 'a'}
with a tree editable view below it
- That view defines controls to create lines,
which would change the context key 'field' to
another value.
=> The field context key would take precedence on
the creates key, making it impossible to override
that key in specific circumstances.
closesodoo/odoo#83996
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
When creating a new invoice by giving it an invoice_line_ids list for
which the last line is a note, the tax line may be created wrongfully
without partner_id, which is totally wrong.
To reproduce :
Create a SO
Set a customer
Insert a product with tax
Insert a note
Deliver the product
Invoice the SO and confirm the invoice
The partner_id is not set on the created tax line
While the issue only arises in 15.0, it brings to light that the partner
is not in the grouping keys while it should, so it will be changed in 13.0+
opw-2750851
closesodoo/odoo#83999
X-original-commit: 2ce994d279126aa0356b86d3fa38b699e9035e54
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
When trying to set up a new bank account using the bank account wizard,
there is an issue with the check company on the linked_journal_id field.
The check will make sure that the company on that field is either false
or the same as the company on the record. But with a recent change in
68f4534aa5 the bank account company_id will be the one from the linked partner.
As the partners for companies have an empty company_id, this check does
not make a lot of sense anymore, as it would be wrong in most cases.
(We expect a journal with the currently selected company, but the bank
account will in most cases have an empty company_id)
closesodoo/odoo#83852
Signed-off-by: Josse Colpaert <jco@odoo.com>
In master, the tax template consistency test
is broken since 8fb53c53c3
Fix this to make sure we add an exception for
that new computed field as it should not be in
the template.
closesodoo/odoo#83724
Signed-off-by: Florian Gilbert <flg@odoo.com>
While updating financial reports to help avoid misconfiguration,
slightly update the coa to fix some wrong account types or name.
Tax id #2585627closesodoo/odoo#83268
Related: odoo/enterprise#19835
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Change the type of the account 5585 to be current
liabilities instead of non-current as it makes more sense.
Task id #2585627closesodoo/odoo#83266
Related: odoo/enterprise#19833
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
The current behavior is that we are exporting the line subtotal as
chargeAmount of the line.
This is an issue as this field is expecting the unit price instead.
A bugfix was done for importing extern invoices properly that broke
importing factur-x files from Odoo as it doesn't support that custom
behavior anymore.
Thus, this will correct the export to properly store the unit price
in the GrossPriceProductTradePrice ChargeAmount.
At the same time, add the NetPriceProductTradePrice ChargeAmount,
which is required and should contain the unit price with discount
applied.
closesodoo/odoo#83647
X-original-commit: c93f7dba0720e5e4f7d0a26ce05a854094e6a279
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Florian Gilbert <flg@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
Set a default tag on the bank suspense account, outstanding accounts
and transfer accounts so that they are found and used by the trial
balance and COA reports.
TAsk id #2612900closesodoo/odoo#82532
Related: odoo/enterprise#23383
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Some use cases require the use of the same account number on multiple
partners. This will relax the constraints to allows such use cases, and
adapt to avoid setting the partner or bank when we cannot be sure of the
one we should take (on bank statement line, and during reconciliation)
Task id #2692025closesodoo/odoo#81362
Related: odoo/enterprise#22881
Signed-off-by: Laurent Smet <las@odoo.com>