-
-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[14.0][IMP] add ability to set intrastat only for in_ or out_ invoices in l10n_it_intrastat #4256
base: 14.0
Are you sure you want to change the base?
[14.0][IMP] add ability to set intrastat only for in_ or out_ invoices in l10n_it_intrastat #4256
Conversation
f3b5e08
to
6380399
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test funzionale: OK
027bfe1
to
fe86928
Compare
Grazie, ho fatto delle ulteriori modifiche per un discorso funzionale: ho rimosso il campo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conferma alle modifiche: OK
fe86928
to
53b8fd7
Compare
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grazie della PR!
Ho fatto revisione del codice e provato la migrazione, che però è da modificare perché la versione 14.0.1.4.3
è stata assegnata nel frattempo; quindi
/ocabot rebase
l10n_it_intrastat/models/account.py
Outdated
self.move_type.startswith("out_") | ||
and self.fiscal_position_id.intrastat_sale | ||
or self.move_type.startswith("in_") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Penso sia meglio usare is_purchase_document
e is_sale_document
, che ne dici?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Giusto
l10n_it_intrastat/models/account.py
Outdated
.browse(val["fiscal_position_id"]) | ||
.intrastat | ||
if "fiscal_position_id" in val: | ||
fiscal_position_id = self.env["account.fiscal.position"].browse( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potrebbe essere utile
fiscal_position_id = self.env["account.fiscal.position"].browse( | |
fiscal_position = self.env["account.fiscal.position"].browse( |
Per distinguere che le variabili con _id
sono degli interi, cosa ne pensi?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vero
l10n_it_intrastat/models/account.py
Outdated
if val.get("move_type").startswith("out_"): | ||
intrastat = fiscal_position_id.intrastat_sale | ||
elif val.get("move_type").startswith("in_"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Analogamente a quanto suggerito sopra, si potrebbero usare get_sale_types
e get_purchase_types
, che ne dici?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meglio
<field name="intrastat" /> | ||
<field name="intrastat_purchase" /> | ||
<field name="intrastat_sale" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il campo rimosso era citato nella documentazione, potresti aggiornarla?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fatto
@@ -65,11 +65,12 @@ def test_invoice_totals(self): | |||
) | |||
self.assertEqual(total_intrastat_amount, invoice.amount_untaxed) | |||
|
|||
def test_invoice_fiscal_postion(self): | |||
def test_invoice_fiscal_position(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Questo ora è diventato il test per verificare che funzioni intrastat_sale
, penso che andrebbe modificata la firma; faresti il test analogo per verificare intrastat_purchase
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fatto
("account_fiscal_position", "intrastat_sale"), | ||
("account_fiscal_position", "intrastat_purchase"), | ||
]: | ||
if not openupgrade.column_exists(env.cr, table, column): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
column_exists
esiste solo per retrocompatibilità, si potrebbe usare invece il metodo omonimo di openupgrade_tools
?
Vedi https://github.com/OCA/openupgradelib/blob/8d04b103b70d6927f805b94ef26ecf53b26e51ed/openupgradelib/openupgrade.py#L411
P.S.: esiste anche odoo.tools.sql.column_exists
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok grazie
@SirAionTech The rebase process failed, because command
|
1 similar comment
@SirAionTech The rebase process failed, because command
|
b7dd497
to
2a0a5fd
Compare
f5e4add
to
1694d65
Compare
…es in l10n_it_intrastat
1694d65
to
c5950a2
Compare
No description provided.