-
-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] Big simplification, update and cleanup
This commit aims at removing the over-complexity of intrastat modules while increasing simplicity/usability for users. - Move default intrastat transaction from res.company to account.fiscal.position to add su pport for B2C (and not just B2B) - improve usability: auto-generate declaration lines and XML export when going from draft to done. Auto-delete declaration lines and XML export when going from done to draft (and add confirmation pop-up). - declaration lines are now readonly. Only computation lines can be created/edited manuall y - add field region_code on computation lines and declaration lines. Remove region_id on declaration lines. This change allows big simplification in some localization modules such as l10n_fr_intrastat_product. - simplify Brexit implementation. Northern Ireland is important, but we can't afford to have so many lines of code and add a field on product.template (origin_state_id) for a territory of 1.9 million inhabitants! This is too costly to maintain and too complex for users. - improve default visibility of fields when reporting_level = 'standard' - add support for weight calculation from uom categories other than units and weight, supposing that the 'weight' field on product.template is the weight per uom of the product - add EU companies from several different countries in demo data with valid VAT numbers
- Loading branch information
1 parent
6f5edb8
commit 766d016
Showing
21 changed files
with
506 additions
and
560 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Copyright 2022 Akretion France (http://www.akretion.com/) | ||
# @author: <alexis.delattre@akretion.com> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class AccountFiscalPosition(models.Model): | ||
_inherit = "account.fiscal.position" | ||
|
||
intrastat_out_invoice_transaction_id = fields.Many2one( | ||
comodel_name="intrastat.transaction", | ||
string="Default Intrastat Transaction For Customer Invoice", | ||
) | ||
intrastat_out_refund_transaction_id = fields.Many2one( | ||
comodel_name="intrastat.transaction", | ||
string="Default Intrastat Transaction for Customer Refunds", | ||
) | ||
intrastat_in_invoice_transaction_id = fields.Many2one( | ||
comodel_name="intrastat.transaction", | ||
string="Default Intrastat Transaction For Supplier Invoices", | ||
) | ||
intrastat_in_refund_transaction_id = fields.Many2one( | ||
comodel_name="intrastat.transaction", | ||
string="Default Intrastat Transaction For Supplier Refunds", | ||
) | ||
# field used to show/hide fields in country-specific modules | ||
company_country_code = fields.Char(related="company_id.country_id.code") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.