Skip to content

Commit

Permalink
Merge PR #3446 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by sergiocorato
  • Loading branch information
OCA-git-bot committed Jul 13, 2024
2 parents 340c540 + 71e60f7 commit 8ce6cd2
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 19 deletions.
16 changes: 4 additions & 12 deletions l10n_it_declaration_of_intent/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,18 +158,10 @@ def update_declarations(self, declarations_used_amounts, grouped_lines):
if is_sale_document:
cmt = self.narration or ""
msg = (
"Vostra dichiarazione d'intento nr "
"{partner_number} del {partner_date}, "
"nostro protocollo nr {number} del {date}, "
"protocollo telematico nr {protocol}.".format(
partner_number=declaration.partner_document_number,
partner_date=format_date(
self.env, declaration.partner_document_date
),
number=declaration.number,
date=format_date(self.env, declaration.date),
protocol=declaration.telematic_protocol,
)
f"Vostra dichiarazione d'intento del "
f"{format_date(self.env, declaration.date)}, "
f"protocollo telematico nr "
f"{declaration.telematic_protocol}."
)
# Avoid duplication
if msg not in cmt:
Expand Down
4 changes: 2 additions & 2 deletions l10n_it_declaration_of_intent/models/declaration.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ def _default_currency(self):
partner_id = fields.Many2one("res.partner", string="Partner", required=True)
telematic_protocol = fields.Char(required=True)
partner_document_number = fields.Char(
required=True, string="Document Number", help="Number of partner's document"
string="Document Number", help="Number of partner's document"
)
partner_document_date = fields.Date(
required=True, string="Document Date", help="Date of partner's document"
string="Document Date", help="Date of partner's document"
)
taxes_ids = fields.Many2many("account.tax", string="Taxes", required=True)
used_amount = fields.Monetary(compute="_compute_amounts", store=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ def _create_declaration(cls, partner, type_d):
return cls.env["l10n_it_declaration_of_intent.declaration"].create(
{
"partner_id": partner.id,
"partner_document_number": "PartnerTest%s" % partner.id,
"partner_document_date": cls.today_date,
"date": cls.today_date,
"date_start": cls.today_date,
"date_end": cls.today_date,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<Data>2016-06-15</Data>
<Numero>INV/2016/00001</Numero>
<ImportoTotaleDocumento>14.00</ImportoTotaleDocumento>
<Causale>Vostra dichiarazione d'intento nr DI/111 del 06/15/2016, nostro protocollo nr 1 del 06/15/2016, protocollo telematico nr 08060120341234567-000001.</Causale>
<Causale>Vostra dichiarazione d'intento del 06/15/2016, protocollo telematico nr 08060120341234567-000001.</Causale>
<Art73>SI</Art73>
</DatiGeneraliDocumento>
</DatiGenerali>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<Data>2016-06-15</Data>
<Numero>INV/2016/00001</Numero>
<ImportoTotaleDocumento>14.00</ImportoTotaleDocumento>
<Causale>Vostra dichiarazione d'intento nr DI/111 del 06/15/2016, nostro protocollo nr 1 del 06/15/2016, protocollo telematico nr 08060120341234567-000001.</Causale>
<Causale>Vostra dichiarazione d'intento del 06/15/2016, protocollo telematico nr 08060120341234567-000001.</Causale>
<Art73>SI</Art73>
</DatiGeneraliDocumento>
</DatiGenerali>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<Data>2016-06-15</Data>
<Numero>INV/2016/00001</Numero>
<ImportoTotaleDocumento>14.00</ImportoTotaleDocumento>
<Causale>Vostra dichiarazione d'intento nr DI/112 del 06/15/2016, nostro protocollo nr 1 del 06/15/2016, protocollo telematico nr 08060120341234567-000002.</Causale>
<Causale>Vostra dichiarazione d'intento del 06/15/2016, protocollo telematico nr 08060120341234567-000002.</Causale>
<Art73>SI</Art73>
</DatiGeneraliDocumento>
</DatiGenerali>
Expand Down

0 comments on commit 8ce6cd2

Please sign in to comment.