-
-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
96 additions
and
40 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
|
||
from . import attachment | ||
from . import account | ||
from . import partner |
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,22 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2019 Roberto Fichera <roberto.fichera@levelprime.com> | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). | ||
|
||
from odoo import fields, models, api, _ | ||
from odoo.exceptions import ValidationError | ||
|
||
|
||
class ResPartner(models.Model): | ||
_inherit = "res.partner" | ||
|
||
max_invoice_in_xml = fields.Integer( | ||
string='Max Num. Invoice in XML', | ||
default=0, | ||
help="Maximum number of invoices to group in a single XML file. " | ||
"Default=0 unlimited") | ||
|
||
@api.constrains('max_invoice_in_xml') | ||
def _validate_max_invoice_in_xml(self): | ||
if self.max_invoice_in_xml < 0: | ||
raise ValidationError( | ||
_("The max number of invoice to group can't be negative")) |
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,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
|
||
<record model="ir.ui.view" id="view_partner_form_fatturapa"> | ||
<field name="name">partner.form.fatturapa</field> | ||
<field name="model">res.partner</field> | ||
<field name="inherit_id" ref="l10n_it_fatturapa.view_partner_form_fatturapa"/> | ||
<field name="arch" type="xml"> | ||
<field name="ipa_code" position="before"> | ||
<field name="max_invoice_in_xml"/> | ||
</field> | ||
</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