Skip to content

[16.0][IMP]l10n_it_riba: Forward port of #3437#4655

Open
matteotognini wants to merge 2 commits into
OCA:16.0from
odooNextev:16.0-imp-l10n_italy_riba
Open

[16.0][IMP]l10n_it_riba: Forward port of #3437#4655
matteotognini wants to merge 2 commits into
OCA:16.0from
odooNextev:16.0-imp-l10n_italy_riba

Conversation

@matteotognini

@matteotognini matteotognini commented Mar 18, 2025

Copy link
Copy Markdown

Solves #2118 #4637

@francesco-ooops

Copy link
Copy Markdown
Contributor

@CiroBoxHub puoi fare review?

@CiroBoxHub

Copy link
Copy Markdown
Contributor

Buongiorno a tutti. Questa PR è mergiabile?

@andreampiovesana andreampiovesana left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@odooNextev odooNextev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@CiroBoxHub

Copy link
Copy Markdown
Contributor

Buongiorno, ci sono problemi con il merge di questo fix?

@francesco-ooops

Copy link
Copy Markdown
Contributor

/ocabot rebase

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, PR rebased to 16.0.

@OCA-git-bot OCA-git-bot force-pushed the 16.0-imp-l10n_italy_riba branch from 38707ea to 75db01b Compare June 11, 2025 13:43
@francesco-ooops

Copy link
Copy Markdown
Contributor

@OCA/local-italy-maintainers buona?

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@monen17 monen17 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grazie della PR!

@OCA/local-italy-maintainers buona?

Per me no perché i commit non seguono https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#71commit-message.
Ad esempio, il primo punto è:

Commit messages are in English

mentre al momento i commit sono in italiano:
image

@matteotognini

Copy link
Copy Markdown
Author

@monen17 Grazie della review, va bene andare a modificare il messaggio di commit anche se non sono io l'autore? Se si li traduco

@monen17

monen17 commented Jun 27, 2025

Copy link
Copy Markdown
Contributor

@monen17 Grazie della review, va bene andare a modificare il messaggio di commit anche se non sono io l'autore? Se si li traduco

I messaggi dei commit sono già diversi da quelli di #3437 che sono
image
Anche nel contenuto qualcosa è cambiato, credo per adattarlo a 16.0.
Quindi perché porsi ora il problema? 🤔

Secondo me in generale se l'autore (in questo caso @alessandrocamilli) è d'accordo o le modifiche sono minime puoi farle e lasciare l'autore originale, altrimenti ti metti come co-autore e fai le modifiche che devi.
Includerei la traduzione tra le modifiche minime visto che non cambia il significato del messaggio, e in più va fatta per seguire le linee guida.

TL;DR: Per me sì

@matteotognini matteotognini force-pushed the 16.0-imp-l10n_italy_riba branch from 75db01b to 369419b Compare June 27, 2025 12:08
@matteotognini

Copy link
Copy Markdown
Author

Grazie della spiegazione. Ho modificato i commit messages.

@CiroBoxHub

Copy link
Copy Markdown
Contributor

Buongiorno, ci sono novità? Ci sono azioni da fare?

@monen17

monen17 commented Jul 18, 2025

Copy link
Copy Markdown
Contributor

Buongiorno, ci sono novità? Ci sono azioni da fare?

Solo quello che vedi qui nella PR.

La prossima cosa da fare è per l'autore @matteonext: quando devo aggiornare la revisione segnalo qui in github
image
Fino ad allora per me ci stai ancora lavorando.

@monen17 monen17 self-requested a review July 18, 2025 14:43
@CiroBoxHub

Copy link
Copy Markdown
Contributor

Buon pomeriggio, abbiamo estrapolato la PR per poterla mettere su un nostro cliente e abbiamo fatto dei test.
A parte l'aggiunta dei dati nle partner, il comportamento è il medesimo.
Abbiamo due fatture con scadenza ottobre e una con tre scadenze (gennaio, febbraio, marzo)
Se confermo quella di ottobre mi crea correttamente la riga d'incasso. Quando poi confermo quella con tre scadenze non crea righe con spese d'incasso.
Stessa cosa se confermo prima quella con 3 date crea correttamente le righe, quando poi confermo la fattura con scadenza ottobre non aggiunge nulla

@CiroBoxHub

Copy link
Copy Markdown
Contributor

Aggiungo anche che se la modalità è una spesa ogni scadenza vengono addirittura doppiate le righe per quante sono le scadenze
image

@monen17 monen17 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grazie della PR!

@OCA/local-italy-maintainers buona?

Per me no perché i commit non seguono https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#71commit-message. Ad esempio, il primo punto è:

Commit messages are in English

mentre al momento i commit sono in italiano: image

Grazie di aver tradotto i commit in inglese 🇬🇧
Ora i commit sono
image

e ancora non seguono https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#71commit-message, puoi verificare?

Ho dato solo un'occhiata al codice e ho notato questo commit:
image
(369419b)
il titolo è "usa una tupla invece di una lista", ma il contenuto non ha nulla a che fare con il titolo, come mai?

@matteotognini matteotognini force-pushed the 16.0-imp-l10n_italy_riba branch from 49af11b to c71655c Compare November 7, 2025 15:37
@VBNext

VBNext commented Nov 7, 2025

Copy link
Copy Markdown

riba_policy_expenses = one_a_month
Tiene conto della data fattura

Da correggere il seguente comportamento
Comportamento osservato:
Emetto 1° fattura nel mese di Ottobre tipo pagamento bonifico
Emetto 2° fattura nel mese di Ottobre tipo pagamento Riba
Non addebita le spese Riba sulla 2°
Comportamento desiderato:
Addebita le spese Riba sulla 2°
Perchè non deve tenere conto delle fattura con tipo di pagamento diverso da Riba

Comportamento osservato:
Non addebita le spese Riba su fatture con data successiva ad oggi
Comportamento desiderato:
Anche se la data fattura è successiva ad oggi devono essere addebitate le spese per la prima fattura del mese

Comportamento osservato:
Addebita 2 volte le spese se la scadenza riba ha due date (Riba 30/60)
Comportamento desiderato:
Deve addebitare 1 volta sola le spese

riba_policy_expenses = unlimited
cambiare la descrizione da "One expenses per maturity" in "One expenses per invoice"

Aggiungere riba_policy_expenses = one_a_maturity
con funzionamento simile a one_a_month ma che tenga conto della data scadenza
Quindi :
Addebitare 2 volte le spese se la scadenza riba ha due date (Riba 30/60)
Non addebitare la spese se esiste una fattura con scadenza stesso mese es:
Fattura 1 - data fattura Ottobre - Scadenza Dicembre (Riba 60GG) --> spese SI
Fattura 2- data fattura Novembre - Scadenza Dicembre (Riba 30GG) --> spese NO

@andreampiovesana andreampiovesana left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One expenses?

@matteotognini matteotognini force-pushed the 16.0-imp-l10n_italy_riba branch from 39d34df to 1116809 Compare December 17, 2025 15:50

@andreampiovesana andreampiovesana left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@matteotognini matteotognini force-pushed the 16.0-imp-l10n_italy_riba branch 2 times, most recently from 31bae74 to 66a36a4 Compare December 22, 2025 14:44
@monen17 monen17 added the is porting This pull request is porting a change from another version label Feb 20, 2026
Comment on lines -189 to +193
for d in all_date_due:
if invoice_date_due.month == d.month and invoice_date_due.year == d.year:
return True
self.ensure_one()
if self.partner_id.riba_policy_expenses != "unlimited":
for d in all_date_due:
if invoice_date_due.strftime("%Y-%m") == str(d.strftime("%Y-%m")):
return True

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prima di questa modifica il controllo era su month e year, possiamo mantenerlo com'era?
La modifica del commit originale 6cc3d21 aggiungeva praticamente solo l'if.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fatto, puoi rivedere la revisione?

Comment on lines -259 to +265
untaxed_amount_currency=0,
sign=1,
sign=1 if invoice.is_inbound(include_receipts=True) else -1,
untaxed_amount_currency=invoice.amount_untaxed,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Queste modifiche non c'erano nel commit originale 6cc3d21, come mai servono?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Era una correzione perlopiù semantica:

  • untaxed_amount_currency: _compute_terms usa gli importi per decidere quante rate generare e come distribuirle, con 0, in certi casi, la lista di rate ottenuta potrebbe essere diversa (o vuota) rispetto a passare l'importo reale e quindi date diverse o mancanti.
  • sign: passare sign=1 su una nota credito non produce date sbagliate nel caso standard, ma è concettualmente scorretto

Non cambia il risultato nel 99% dei casi pratici delle RIBA, ma è più robusto anche in vista di future modifiche.

Comment thread l10n_it_riba/models/account.py Outdated
return True
return False

def maturity_check(self, invoice_date_due, all_date_due):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Queste modifiche non vengono dalla PR originale, probabilmente sono per risolvere #4655 (comment), hai mica verificato se dipendono dalle alte modifiche di questa PR? Se non è così penso sia meglio farle in una PR separata così si può chiudere questo porting.
Sarebbe anche utile sapere se in 14.0 succede.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sì, porto il commit in un'altra PR

@stenext stenext force-pushed the 16.0-imp-l10n_italy_riba branch from 66a36a4 to bbad8b1 Compare May 25, 2026 09:19
@tafaRU

tafaRU commented Jun 12, 2026

Copy link
Copy Markdown
Member

@monen17 potresti aggiornare la tua review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

is porting This pull request is porting a change from another version mod:l10n_it_riba_oca Module l10n_it_riba_oca series:16.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

l10n_it_riba: generazione riga costi di incasso Miglioria RIBA - Politica di addebito spese d'incasso