The aim of this commit is to allow user to install `account_peppol`
without facing a traceback.
Context:
The commit cffd0e9dd91376dd7fe4613f4fd94e659daaeef0 introduced a check
based on a field introduced in the view by another module it depends on.
The problem is that ticking the peppol checkbox install the `account_peppol`
module but doesn't trigger an update of the `account_edi_ubl_cii`
module.
Before the commit:
Impossible to installing `account_peppol`.
After the commit:
Installing `account_peppol` will update the view
`account_edi_ubl_cii.account_move_send_form` if the field added by
commit cffd0e9dd91376dd7fe4613f4fd94e659daaeef0 can't be found.
opw-3874304
closesodoo/odoo#162677
X-original-commit: 465491d017ecf1c6efb26d3252471f17f4e9d856
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
The aim of this commit is to make the duplicate bill warning works in
edit mode.
This is a backport of some fixes that were done in the following
commit: cb694599583f5df1667984fee01bbcc4c8b2d409
Before the commit:
The warning couldn't be triggered in edit mode.
After the commit:
The warning is triggered as soon as the field is unfocused.
closesodoo/odoo#151451
Task-id: None
X-original-commit: 57c51b9c7b70cbc19071a8dfb67713a674caa0a0
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Co-authored-by: moerradi <moer@odoo.com>
The aim of this commit is to fix the computation behavior of the downpayment
line of the sale order.
Context:
Create a sale order and invoice a down payment.
Make a credit note for the downpayment invoice for a part of the
invoice's amount.
Before the commit:
The downpayment line on the sale order gets its price_unit updated to
the amount of the last credit note.
After the commit:
The downpayment line on the sale order gets its price_unit updated to
the sum of the amount of all linked invoice.
closesodoo/odoo#150274
Task-id: 3634439
X-original-commit: 48995672ed58c99b1d8b143225a6535104d3bf8d
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
The aim of this commit is to prevent the tax tag to be renamed when the
engine and the formula are changed at the same time.
Context:
For the french report, we had to introduce new expressions and change
the existing ones.
The nex expression would have the same formula than the previous one and
the old one would change their engine and formula.
Before this commit:
The tags are renamed to match the new formula.
This would be useless as the new engine won't use those tax
After this commit:
The tags aren't renamed.
closesodoo/odoo#147392
Task-id: 3607253
X-original-commit: 659f20add8b7c9c1a342a021bfc3c80316816c22
Related: odoo/enterprise#53341
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
The aim of this commit is to correct the date of the payment.
Context:
When creating a PoS session and a PoS order on date X
The customer gets its invoice on date Y
the payment date is printed on the invoice
Before this commit:
The payment date will always be the date of the invoice
After this commit:
The payment date will always be the date of the order, the date at which
is was really paid.
Corner case not taken care of in this commit:
Claiming the invoice after the `fiscalyear_lock_date`.
In such a case, the payment date will be set to today (the invoice_date)
again.
This should be really rare as setting that lock date in short time frame
is quite unusual.
closesodoo/odoo#146259
Task-id: 3629054
X-original-commit: 732e43d8a6d4012eafb434952ccb6609f9be8066
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
The aim of this commit is to fix runbot build error.
Before the commit:
The test could fail if the EUR currency was inactive
After the commit:
The test activate the currency first
closesodoo/odoo#145817
Runbot-error-build: 51509
X-original-commit: 09808f2c91985263090cb9bd38b34d3443a2d7d7
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
The aim of this commit is to leverage the power of the tax prediction
when possible to improve the quality of the tax retrieval of the edi
import.
Context:
The tax prediction happens when the invoice is given manually or with
the OCR but doesn't happen when it's imported by EDI because the tax is
already set by the edi.
Before this commit:
During EDI import, the tax retrieved could always be the same even if
the user make some modification to the previous bill.
After this commit:
The tax retrieved leverage the previous data to get better quality
result regarding tax retrieval.
closesodoo/odoo#145572
Task-id: 3626501
Ticket-id: 3531473
X-original-commit: 62bd397490cfcb21c2c92d67d761f68850054039
Related: odoo/enterprise#52430
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
The aim of this commit is to make the OSS feature instanciate the taxes
on the the root company .
Context: currently, when a company has a branch, the OSS feature tries
to instanciate the taxes on both the root company and the branch
company.
This was brought up by a constrains that prevents you from instanciating
2 tax with the same name on the same company.
Before the commit:
The feature tries to instanciate the OSS taxes on both the root and
branch company.
After the commit:
The taxes are only instanciated on the root company.
closesodoo/odoo#141347
Task-id: 3573252
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
The aim of this commit is to allow having several taxes with the same
name if those taxes are from different countries.
Context:
With the new taxonomy, it was much more likely for 2 taxes to have the
same name and that was the case for several taxes.
Before this commit:
It was impossible to instantiate some foreign tax because of the unicity
on tax name constrains.
After this commit:
- Foreign tax with same name than national tax can be created again
- UX is improved by appending the country code to the tax name for
display purpose.
closesodoo/odoo#137921
Task-id: None
X-original-commit: 502ec287590b95fdae581cc048ca25eb6699e16d
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
The aim of this commit is to allow import of OIOUBL einvoice.
Documentation source: https://oioubl.info/classes/en/index.html
The test xml files are those provided in the OIOUBL documentation.
The testing xml files are those provided by the Danish administration
with the documentation.
You can download the documentation here: https://oioubl.info/documents/en/allpdf.zip
The xml are in the folder "Eksempelfiler".
closesodoo/odoo#137758
Task-id: 3420748
X-original-commit: b6a060b60e6755af4e6029eb7b23d417a3c4a774
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
I introduced a wrong variable name in commit 70f252ed99c6c9596cd909bede8ef21cdd0df718
I believed `get_resource_path` was wrongly named and retrieved a file
but `etree.parse` is actually retrieving the file by itself.
Task-id: 3420748
X-original-commit: 3954a517eab1cef6154414fa40f8c730071b987a
Part-of: odoo/odoo#137758
During the work done on OIOUBL einvoice import, we saw that the
`Percent` node is always located below a `TaxCategory` node in UBL 2.0.
Task-id: 3420748
X-original-commit: 71d8bf93be472bdcf232e25e42f818e2df89cf8b
Part-of: odoo/odoo#137758
The aim of this commit is mainly to add optional standard node directly
on UBL 2.0.
This will allow national customization of ubl to be easier to implement.
List of modification:
- Add the following nodes:
- AddressFormatCode
- BuildingNumber
- PlotIdentification
- CitySubdivisionName
- Name under TaxScheme
- DocumentTypeCode
- reduce zatca customization
- add attrs to several place to ease customization of attributes
- add a hook from which customization can override all decimal places to
enforce a maximum
- add a hook to ease the modification of the `legal_monetary_total_vals`
sub dict
- add method to allow customization to provide attributes for
DocumentTypeCode node.
Notes:
Regarding PlotIdentification and CitySubdivisionName, I decided to not
populate some of those field for now because I didn't think of a
reliable way to get their value while zatca benefits from fields created
in l10n_sa_edi.
Task-id: 3326977
Part-of: odoo/odoo#136072
The stupid aim of this commit is to remove one line.
The smarter goal of this commit is to add a "/" for the root node and
improve the code readability.
Context:
I made an initial modification to this function and created an `AccountTools`
class. Then Laurent was bothered and changed some stuff thus the initial
commit isn't required anymore.
As he isn't bothered anymore and has too much peace of mind at the moment, I
have the responsability to entertain him to keep his brain at its full
capacity for the sake of Odoo's future.
Before the commit:
The code is complicated and LAS is in peace.
After the commit:
The code is sexier and Laurent keeps his brain sharped and entertained.
Task-id: 3326977
Part-of: odoo/odoo#136072
The aim of this commit is to make method `_check_required_fields`:
- works with dict
- make the docstring more explicit
Context:
Docstring states that it works with dict and record
Before the commit:
The method was crashing when used with dict if the key wasn't in the dict
After the commit:
The method works with dict without crashing
Task-id: 3326977
Part-of: odoo/odoo#136072
The aim of this commit is to:
1) ensure the expected file exist or make the test fail if it doesn't
2) file and file_path: switch variables names
3) allows using that method from other module
Context:
1) When the expected_file_path doesn't point to any existing file
2) There is an ambiguity with those variable names
3) run the method from a test in another module
Before this commit:
1) The test fail with an obscure error `can't convert Boolean`.
2) `expected_file` is a path and `expected_file_path` is the file.
3) The method was always looking in `l10n_account_edi_ubl_cii_tests` to
get its files.
After this commit:
1) The failing test clearly states the file doesn't exist.
2) `expected_file` is the file and `expected_file_path` is the file path.
3) The test method is now looking in the module from which it gets run
to get its test files.
Task-id: 3326977
Part-of: odoo/odoo#130617
1) The aim of this commit is to make the tax template more consistent with
the instanciated tax.
Indeed a tax wouldn't pass the constrains if it hadn't all its
repartition line.
2) Make the refund consistent with the rest of the taxes.
closesodoo/odoo#133055
Task-id: None
X-original-commit: 2c5506a60d4245a7bf84a073d887c2f1bcd7111c
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
The aim of this commit is to correct the tax data
Context:
The constrains linked to tax repartition line aren't triggered.
This resulted in some invalid data to be merged.
Before the commit:
l10n_gr contains invalid tax data
After the commit:
l10n_gr tax data are valid
closesodoo/odoo#130426
Task-id: None
X-original-commit: 671d8fc49e3386ab7117b46f03a6fd4118ac22b9
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
The aim of this commit is to:
- ease the company configuration in DK
- make the feature work when the country_code prefix isn't present
Context:
The DK company registry is the CVR. The CVR is quite the same than the
VAT number.
Re-applied logic used in `l10n_be` to ease the configuration.
Before the commit:
The company registry has to be inputed.
After the commit:
The company registry don't need to inputed while a DK VAT is setup for a
DK company.
closesodoo/odoo#125058
Task-id: 3334595
Related: odoo/enterprise#42561
Signed-off-by: Josse Colpaert <jco@odoo.com>
The aim of this commit is:
- to bring back a feature that was wiped out during the refactoring of the chart
of account instantiation in commit 5125748616
- add a test that will solidify the feature
- Improve the instantiation by installing the required l10n module
directly instead of asking the user to install it manually
Previous to this commit:
The button instantiating the foreign taxes leads to a traceback.
After this commit:
The button instantiate the foreign taxes correctly
Note: To prevent xml_id collision on account, we prefix the xml_ids with their
module's name
closesodoo/odoo#118056closesodoo/odoo#125950
Community-pr: https://github.com/odoo/odoo/pull/118056/
Task-id: 3196556
X-original-commit: b66ebb78ec750a4657a6de6726deb9eea7e0c7d1
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
This commit aims to improve consistency.
Context:
- functionally:
`account.tax.group` is company dependent and thus, it's weird to be able
to access to other company tax group when those companies aren't
selected.
- technically:
In accounting apps, devs also expect company dependent field to not be
retrieved by the `search` method and not having that ir.rule could cause
bugs.
X-original-commit: 56f039f82afcf6c262bc5711cd28ae691cdf00e2
Part-of: odoo/odoo#125950
The aim of this commit is to make `TestAccountComposerPerformance` more robust.
Context:
In `TestAccountComposerPerformance` (account module), we are writing
on the field `checkbox_ubl_cii_xml`.
This field is instantiate by the `account_edi_ubl_cii` module which
might not be present.
This module get installed when `account` and `base_vat` are installed but
`base_vat` is conditionally installed.
(see `account/__init__.py` for the details)
We used this opportunity to also remove the call to `Form` as it wasn't
usefull.
Before the commit:
`TestAccountComposerPerformance` could fail in "weird" circumstance.
After the commit:
`TestAccountComposerPerformance` is safer
closesodoo/odoo#123218
Task-id: None
Signed-off-by: Laurent Smet <las@odoo.com>
This commit is adding the activity views and columns to a lot of the basic
accounting views.
closesodoo/odoo#120140
Task-id: none
Related: odoo/enterprise#40554
Signed-off-by: William André (wan) <wan@odoo.com>
The aimf of this commit is to make the query of a specific tag with a
specific sign easier by avoiding all the filtering in
`expression._get_tax_tags().filtered(lambda t: t.tax_negate)`
With this commit, we just leverage the existing filtering on domain to
only get the desired tag.
no-task
closesodoo/odoo#117167
X-original-commit: 6eb53a3802d24e283b8334b6f245ffe87dddcbe8
Related: odoo/enterprise#39044
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
The aim of this commit is to allow any tax tag to be set on a journal
item and to allow the user to put tax tag from foreign countries in
which they have a VAT number on any tax.
The end goal is to allow the user to impact tax reports from several
country with the same journal item, avoiding the creation of a whole
journal entry and setting the path for some more automation.
Context:
Our user has a company based in Belgium but has a warehouse in
Netherland. Thus, when the company sells anything from that warehouse, it
needs to fill the Dutch tax report directly.
Moreover, the company needs to fill a grid on the Belgian VAT tax report.
That means that the user would need to gather some journal items on both
the Belgian tax report and the Dutch tax report.
Before this commit:
The user can't set tax tag from another country on its tax nor in the same move.
After this commit:
The user can set tax tags from any country for which its company has a
foreign vat number on any tax and in a move
Task-id: 3196547
opw-2810712
closesodoo/odoo#113027
Related: odoo/enterprise#37247
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
The aim of this commit is to get rid of a traceback preventing the user
to switch tabs in Invoice and Bill
Context:
AccountMoveFormCompiler is a hack that allows to save the record
automatically when the user switch between tabs.
With commit 264f313012aa99449d1576ae1110252c13755142 the way to call the
compiler changed a bit but the hack wasn't.
Before the commit:
The `this` was leading nowhere in the compiler frame leading to a
traceback in OWL.
After the commit:
`this` is defined and the traceback is gone
closesodoo/odoo#110635
Community-pr: https://github.com/odoo/odoo/pull/110506
Task-id: no task
X-original-commit: a926071fc6944d5cd720a8849b2f31a5dd8ff4dc
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
The aim of this commit is to prevent the user to save unbalanced misc entry
that wouldn't be created by adding a tax.
Context:
Since commit d8d47f9 we allow user to create unbalanced entries by
automatically balancing them on a suspense account. This isn't an issue but we
also allow to post those entries.
As the flow is smooth and fast, a quick user could just post this entries which
could be problematic.
Resetting to draft could be an option but that wouldn't be convenient if some
lines would have been reconciled. (which could have side effects in case
of there would be a cash basis tax on the line)
It's also impossible in case of a journal that would be hashed.
It also means that the problem would be delayed until the end of year
accounting processes, when accountants are tied to dead-lines.
Before this commit:
An unbalanced misc entry created manually would automatically be balanced with
a suspense account.
After this commit:
- Unbalanced misc entry can't be saved if there isn't any tax on it
- Unbalanced misc entry with a tax are balanced automatically.
- Unbalanced misc entry with a tax we are about to remove are balanced
automatically
closesodoo/odoo#110063
Community-pr: https://github.com/odoo/odoo/pull/109878
Task-id: 3129172
X-original-commit: c86786676b86381fbeeac9897508d3fe0ce77151
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
1) forward-port of this PR: https://github.com/odoo/odoo/pull/97000
commit: c9209664ce3a4b10142bba4da6afb912afc983c2
2) use btree_not_null instead of simple btree for space optimisation
closesodoo/odoo#106484
X-original-commit: b743e736f764fd7d6e232d2c8eaf6b2e314c5f31
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
The aim of this commit is to improve the test skipping code of the oss modules
by avoiding to hardcode the chart_template_ref (xml_id) directly in the error
message.
Before this commit:
The TestOSSSpain test class was failing when the l10n_es module wasn't
installed instead of being skipped.
After this commit:
The TestOSSSpain test class is correctly skipped instead of failing.
closesodoo/odoo#102770
X-original-commit: c8018174c483183f95cda2bd805eb003e2ab90f5
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Brice Bartoletti <bib@odoo.com>
The aim of this commit is to:
- allow OSS to use tax that aren't declare by TaxReportLine
- have the oss tax automatically populated with the correct tags for spanish
tax report
- Add taxes specific to the spanish OSS : No sujeto y acogidas a la OSS (Servicios) and No sujeto y acogidas a la OSS (Bienes)
using the official modulo 124 tag
closesodoo/odoo#101121
Community-pr: https://github.com/odoo/odoo/pull/99273
Task: 2930758
X-original-commit: 2a21e4c084ba952eba1b4a7bb6f6ee31875d70ea
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Camille Spiritus (casp) <casp@odoo.com>
Co-authored-by: Camille Casp Spiritus <casp@odoo.com>
1) conversion to owl
2) very small improvement:
- make the validation icon appears when starting edition
closesodoo/odoo#100435
Task-id: 2857743
Signed-off-by: William André (wan) <wan@odoo.com>
While refactoring the move_line_list_views.js in owl, we provided the
account.move id and model + "generate" a thread in the front-end for
account.move.line instead of only providing account.move.line model and id.
This allows us to get rid of this hacky special case
Task-id: 2857743
Part-of: odoo/odoo#96672
The aim of this commit is to improve UX by helping the user to find duplicate
bills in a more convenient way.
With this commit, when a user create a bill or credit note on bill that might
be a duplicate, a warning banner is displayed on the Form view of the
account.move.
On this banner there is a button that leads to the list of the duplicate
bill/credit note.
The previous warning message on post is also replaced by a RedirectWarning
Context:
Previously, the warning for duplicated bills was thrown when the bill was
saved. This was changed with https://github.com/odoo/odoo/pull/81748
It made the blocking warning being delayed until the bill is posted.
Previous to this commit:
A duplicate bill can only be detected automatically when posting the bill with
a non convenient blocking warning preventing the user to post his bill(s).
After this commit:
- A warning banner is displayed on the bill form during the bill creation.
- The banner contains a button leading to the list of duplicates.
- The blocking warning is improved by providing redirections to the duplicate
move.
closesodoo/odoo#81765
Community-pr: https://github.com/odoo/odoo/pull/81765
Task: #2612299
Signed-off-by: William André (wan) <wan@odoo.com>
The aim of this commit is to make `get_lines_in_hierarchy` yielding the lines
in the same order even if 2 sequences are the same.
The additionnal diff correct the iteration to get it in the same order in copy
than in `get_lines_in_hierarchy`.
closesodoo/odoo#93156
Task: None
Pr-community: https://github.com/odoo/odoo/pull/93061
X-original-commit: decc29d59baee1398a4497097055a2332e2305d7
Signed-off-by: William André (wan) <wan@odoo.com>
On huge DB, unlinking an account_move can take a lot of time.
Most of this time is wasted checking for foreign key constraint.
closesodoo/odoo#84817
Signed-off-by: William André (wan) <wan@odoo.com>
Goal:
Fix the tax details results when interacting with misc entry containing 2
opposite lines with the same tax.
The bug:
Wrong mapping in tax details query results in wrong amount in the global tax
report.
reproduction step pre-requisite:
- a simple sale tax A
- miscellaneous contains 2 lines,
- amount X debit with sale tax A
- amount Y credit with purchase tax A
- 2 tax lines gets automatically created
Before this commit:
The global tax report will display a base amount of 2*(X-Y)
which is wrong.
After this commit:
The global tax report will display a base amount of (X-Y)
which is correct.
Context:
When the tax details was made, it wasn't taken into account that there
could be 2 tax line (account_move_line) for the same tax in the same
account_move if the move is a miscellaneous entry (move_type = 'entry').
As a misc can contain both refund and invoice line at the same time (Due to a
PoS order for example), there could be tax_line created by the
invoice_repartition_line and another one created by the refund_repartition_line.
This results in a mapping in which there are some wrong results that should have
been filtered out.
The wrong results are the following match:
invoice_base_line -> refund_tax_line
refund_base_line -> invoice_tax_line
Solution:
1) To avoid the confusion we just need to filter out the wrong results.
2) In a misc entry, what makes a tax considering the base line as an invoice or
a refund is its balance.
3) In a misc entry, the sign of the tax line balance is the result of a
transformation of the base line sign.
This transformation is just a multiplication by the sign of the tax rate and
the sign of the factor_percent of the tax line repartition line.
This means that we can re apply this transformation to the base_line or the
inverse of it to the tax_line and check if it matches.
If it doesn't, we can confidently discard the match because the tax_line balance
can't be the result of a transformation applied to this base_line balance.
This is only valid for misc entry. In misc entry, negative base_line and
positive base_line are segragated for their tax line creation.
Additional notes:
A test is added to the enterprise repository to check the global tax report
result.
closesodoo/odoo#90563
Ticket: 2832745
Community-pr: https://github.com/odoo/odoo/pull/90399
Enterprise-pr: https://github.com/odoo/enterprise/pull/26827
X-original-commit: 690ef4e526b26911678ca872e7eb481215017f1c
Related: odoo/enterprise#26961
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Brice Bartoletti <bib@odoo.com>
This commit aims to allow assigning tags to the taxes
created by the OSS feature by providing the xml_id of their
report.line in the eu_tag_map.py file.
Before this commit:
In l10n_be, the taxes created by OSS (l10n_eu_services) didn't set
the tag +47 on invoice_repartition_lines nor +49 on
refund_repartition_lines.
This make the VAT report for Belgium wrong.
After this commit:
Taxes created by OSS for a company using the belgian CoA will get
their tags set properly and thus will the taxes impact the
belgian tax report correctly.
task: 2770182
ticket: 2768622
Community-PR: https://github.com/odoo/odoo/pull/85607
Design choices:
This fix is currently solving the issue for l10n_be but we have
no doubt that it will be raised for other EU countries too.
In order to provide the tags, we decided to be consistent with
what as been done regarding the tax mapping. Thus we decided to
create and maintain a simple mapping file and to test it.
several other methods were explored:
- create a global variable and update it from all localization
modules. This method would work but is ugly and error prone.
- create a templating method and override it from localization
modules.
The problem is where to set the root of the template method?
The naïve solution would be to create a bridge module between
l10n_eu_services and l10n_be but that would lead to an explosion
in the number of bridge modules which we don't want.
In order to keep things simple and generic, we could put the
template method directly into the account module. But it is kind
of ugly because account shouldn't know anything about the oss
feature and it would encourage such a leaky design to happen
again in the future.
closesodoo/odoo#86314
X-original-commit: 7dcc2ae4665d2d7b577ed10160691775b86a848f
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Brice Bartoletti <bib@odoo.com>
The aim of this commit is to correct the compute_all calculation
when it is dealing with an article with 0.00 price and having a fixed
tax included in it.
In this situation, this means the tax is directly taken as an expense
by the company that offers it to its client.
This also solves the situation in which we have a 100% discount because
discount is applied before calling `compute_all` by changing the
unit_price.
Before this commit:
Creating an invoice with a line having a price at 0 or a 100% discount
and a fixed tax price_include resulted in a really weird behavior: the
company had to reimburse the customer for the amount of the tax.
(what a lucky customer :D )
After this commit:
Customer is sad, he only gets the product for free.
The base is calculated as negative, resulting in a debit amount on the base
income line.
The tax is then counterbalance by it.
The form is displaying a negative untaxed amount, a positive tax and the
total is 0.
closesodoo/odoo#86223
Ticket: 2660808, 2637512
Community-pr: https://github.com/odoo/odoo/pull/85747
X-original-commit: 727d19cb4e012e9a24d94640987ac5ea6f452a2e
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Brice Bartoletti <bib@odoo.com>
Every tax should have a tax repartition line even 0% tax
closesodoo/odoo#85990
X-original-commit: 17e3bd58e519bd40fdc0c7fd431cd1a8f90cf33e
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Brice Bartoletti <bib@odoo.com>
revert commit https://github.com/odoo/odoo/commit/5f25be8eef9a9efc18a995f2c6405d08a657ac96
Goal:
- Gives the expected tag to the account move line created by the PoS.
- Add tests to the PoS regarding the created account move line
Before this commit:
If the configuration was set to round_globally, a pos.order.line was processed
as a refund only if all order.lines were a refund.
This leads to unexpected results in the tax report. Indeed,
since commit https://github.com/odoo/enterprise/commit/46769076526701d96ee4f2653e44b57604cc0b7a
"Negative" line in PoS (debit) are processed as positive to give a
correct results.
This means that if a line is set as debit and is suppose to lower a
line, it makes it bigger.
Example:
aml from PoS: debit: 10 tags: +03
---> report.line [03] is suppose to make a -10 but will do a +10.
As a result, report line [03] is false.
After this commit:
PoS never use "invoice_repartition_line" to create a refund line.
closesodoo/odoo#85461
Ticket: 2718998, 2714310, 2746890
Community-pr: https://github.com/odoo/odoo/pull/85149
X-original-commit: e4dedaf08b41cf3d80bfb01e70de714c9a84167d
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Brice Bartoletti <bib@odoo.com>
This commit gives the possibility to create pos_order_line with discount
This is needed in order to reproduce real usecase.
X-original-commit: 49bfb576a76e2ad4449326c4b12ebf57bece7069
Part-of: odoo/odoo#85461
The aim of this commit is to set partner on anglosaxon
aml in order to help our client in their stock
reconciliation process in case it hasn't been done automatically.
Before this commit:
anglosaxon line were created without partner
After this commit:
A partner is set when anglosaxon line are created
closesodoo/odoo#84547
Ticket: 2692308
Community-pr: https://github.com/odoo/odoo/pull/84468
X-original-commit: abfe37fcea5b20f77799d9331d4d011530880669
Signed-off-by: William André (wan) <wan@odoo.com>
The aim of this commit is to:
- correct the implementation of the restaurationMoms
- add a price_include version of restauraionMoms
- make a better implementation of the energy tax
before this commit:
The implementation of the restaurationMoms is completly false.
The implementation of tax energy is quite complicated and makes
the UI display a "0 tax value".
after this commit:
2 restaurationMoms version and both are correct.
Tax energy implementation is more user-friendly and more correct
regarding information displayed by the UI.
closes odoo/odoo#84004
Task: #2748309
Pr: https://github.com/odoo/odoo/pull/83666
X-original-commit: 7d4dcf7944cf776d74d31c80f2df15c8d44e3c5c
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Brice Bartoletti <bib@odoo.com>
This commit is a forward port of the 2 following commits:
[IMP]l10n_dk: Add support for danish tax reporting
commit: d48433589a403754e9853b5242ec42abfafbfdea
This commit creates the basis for the danish tax report.
It creates the report and link the tags to the related taxes.
[IMP]l10n_dk: tax report and taxes impl. rework
commit: 7e4017c43a72314a5ba6da40903896f2dce4e2d5
This commit aims to:
- implements formula in the tax report
- shorten tag names and add context comments to the tax report
- correct the tax implementation
- add some fiscal position for some taxes and reorder them
- delete a tax that doesn't make any sense
closesodoo/odoo#83376
Community-pr: https://github.com/odoo/odoo/pull/80823
Task: #2666277
X-original-commit: f8c1015841020244bae16715b0112f41b91ec72b
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Brice Bartoletti <bib@odoo.com>
The aim of this commit is to allow user to post a reversed entry even
when the date for the reversed has been set in the future.
before this commit:
if the move is generated using the reverse entry button and a date in
the future, the reverse entry is created with auto_post True and is
readonly in the view resulting in the user being unable to post the
move himself.
after this commit:
auto_post can be manually set to false and the user can post the move
himself.
closes odoo/odoo#83029
Task: #2522640
X-original-commit: 40b7976de1fe1cae71eb1063188eacb9a8a8fb70
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Brice Bartoletti <bib@odoo.com>
The aim of this commit is to allow EDIs to create and save account move
even if a supplier reference is duplicated.
This is achieved by delaying the moment to which the constrains is
triggered.
Before this commit:
A user can only upload a bill once. (xml ubl format for instance)
If he needs to upload it a second time, he will be forced to find a
workaround.
After this commit:
User will be able to upload as many bill as he wants but will receive a
ValidationError when trying to post the invoice if the reference is
duplicated.
The user will be able to post the bill very easily by changing the
reference a bit if he wants to pursue.
closesodoo/odoo#82303
Community-pr: https://github.com/odoo/odoo/pull/81748
Enterprise-pr: https://github.com/odoo/enterprise/pull/23255
Task: 2612299
X-original-commit: 200614876e62192e1a5ce2f30ec7aa8a1de77672
Related: odoo/enterprise#23281
Signed-off-by: William André (wan) <wan@odoo.com>
The aim of this commit is to make the cogs generation multi-company
safe.
2 bugs are fixed in this forwardport commit:
- The product.valuation on the line wasn't evaluated in a company safe
way.
- cogs method weren't company safe either
Before this commit:
- When posting an invoice from company B with both company A and B
selected and A being selected as "main", the cost from company A could
be selected instead of cost from company A to create the anglosaxon
lines.
- If company B's product isn't in real time valuation, cogs aren't even
created.
After this commit:
Whatever the selected companies are, the cost selected will always be from
the company that created the invoice.
closes odoo/odoo#81492
Task: #2686104 and #2713607
X-original-commit: e34caf0ec33a3001bb6343e02d34a6edb5a9f609
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Brice Bartoletti <bib@odoo.com>
Aim of this commit:
- Hide the disabled radio button on reversal wizard when it's disabled.
(invoice residual_amount is 0)
before this commit:
- The radio buttons in the reversal wizard are visible even when it's
disabled.
after this commit:
- Radio buttons are hidden when it's disabled.
task/ticket:#2603144
closesodoo/odoo#81089
X-original-commit: e860a346ba6d7831674685817eed006dac86b264
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Brice Bartoletti <bib@odoo.com>
This commit aims to make the "due and deduced" taxes more consistent by
assigning the "VAT due" tags to the "VAT due" repartition line.
This way the tag representing the due VAT will be set on the account
move line that represents the due VAT instead of the account move line
that represents the deductible VAT.
Behavior before commit:
Due VAT tags is assigned on VAT to deduce account_move_line.
Behavior after commit:
Due VAT tags is assigned to the due VAT account_move_line.
closesodoo/odoo#77891
X-original-commit: 59961cc68ef001dade87bd5ab77809efaab31a17
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: Brice Bartoletti <Levizar@users.noreply.github.com>
In l10n_latam, creating a debit note with stock_account installed ends
up in stock account checking for a property in a dictionnary that may
not exist.
Using the get property will solves this issue by providing a value.
closesodoo/odoo#73221
Ticket: opw-2580992
Bug-fix: opw-2588504
X-original-commit: 423d2d4ec62312da96c66d000eaabeac4920f68f
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Brice Bartoletti <Levizar@users.noreply.github.com>