-
-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] l10n_it_fatturapa_in: intermediary contact creation depending b…
…y vat
- Loading branch information
Showing
7 changed files
with
118 additions
and
3 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 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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
from . import wizard_import_fatturapa | ||
from . import wizard_check_intermediary_vat | ||
from . import link_to_existing_invoice |
21 changes: 21 additions & 0 deletions
21
l10n_it_fatturapa_in/wizard/wizard_check_intermediary_vat.py
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,21 @@ | ||
from odoo import fields, models | ||
|
||
|
||
class WizardCheckIntermediaryVat(models.TransientModel): | ||
_name = "wizard.check.intermediary" | ||
_description = "Controllo sull'intermediario" | ||
|
||
message = fields.Text(string="message", readonly=True) | ||
intermediary_id = fields.Integer(string="Intermediario", readonly=True) | ||
invoice_id = fields.Many2one("account.move", string="Fattura", readonly=True) | ||
|
||
def action_confirm(self): | ||
if self._context.get("intermediary_id"): | ||
self.env["account.move"].browse(self._context.get("invoice_id")).write( | ||
{"intermediary": self._context.get("intermediary_id")} | ||
) | ||
|
||
return {"type": "ir.actions.act_window_close"} | ||
|
||
def action_cancel(self): | ||
return {"type": "ir.actions.act_window_close"} |
30 changes: 30 additions & 0 deletions
30
l10n_it_fatturapa_in/wizard/wizard_check_intermediary_vat.xml
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,30 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> | ||
<record id="view_check_intermediary_vat" model="ir.ui.view"> | ||
<field name="name">check.intermediary.vat.form</field> | ||
<field name="model">wizard.check.intermediary</field> | ||
<field name="arch" type="xml"> | ||
<form string="Verifica intermediario"> | ||
<sheet> | ||
<group> | ||
<field name="message" nolabel="1" /> | ||
</group> | ||
<footer> | ||
<button | ||
string="Sì" | ||
type="object" | ||
name="action_confirm" | ||
class="btn-primary" | ||
/> | ||
<button | ||
string="No" | ||
type="object" | ||
name="action_cancel" | ||
class="btn-secondary" | ||
/> | ||
</footer> | ||
</sheet> | ||
</form> | ||
</field> | ||
</record> | ||
</odoo> |
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