Skip to content

Commit

Permalink
[8.0] evita di riaprire fattura se presente una ricevuta bancaria (OC…
Browse files Browse the repository at this point in the history
  • Loading branch information
scigghia authored and TonyMasciI committed Aug 4, 2023
1 parent 240320d commit 0bd0631
Show file tree
Hide file tree
Showing 73 changed files with 78,461 additions and 888 deletions.
1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/am.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/ar.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/bg.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/bs.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/ca.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/ca_ES.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/cs.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/da.po

Large diffs are not rendered by default.

1,122 changes: 1,122 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/de.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/el_GR.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/en_AU.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/en_GB.po

Large diffs are not rendered by default.

640 changes: 349 additions & 291 deletions l10n_it_ricevute_bancarie/i18n/es.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/es_AR.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/es_CL.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/es_CO.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/es_CR.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/es_DO.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/es_EC.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/es_ES.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/es_MX.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/es_PE.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/es_PY.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/es_VE.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/et.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/eu.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/fa.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/fi.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/fr.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/fr_CA.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/fr_CH.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/fr_FR.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/gl.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/gl_ES.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/he.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/hi.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/hr.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/hr_HR.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/hu.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/id.po

Large diffs are not rendered by default.

678 changes: 377 additions & 301 deletions l10n_it_ricevute_bancarie/i18n/it.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/ja.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/ko.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/lo.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/lt.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/lt_LT.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/lv.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/mk.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/mn.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/nb.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/nb_NO.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/nl.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/nl_BE.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/pl.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/pt.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/pt_BR.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/pt_PT.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/ro.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/ru.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/sk.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/sk_SK.po

Large diffs are not rendered by default.

660 changes: 364 additions & 296 deletions l10n_it_ricevute_bancarie/i18n/sl.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/sr.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/sr@latin.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/sv.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/th.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/tr.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/uk.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/vi.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/vi_VN.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/zh_CN.po

Large diffs are not rendered by default.

1,121 changes: 1,121 additions & 0 deletions l10n_it_ricevute_bancarie/i18n/zh_TW.po

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions l10n_it_ricevute_bancarie/models/account/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,27 @@ def action_invoice_draft(self):
super(AccountInvoice, self).action_invoice_draft()

@api.multi
def action_cancel(self):
for invoice in self:
# we get move_lines with date_maturity and check if they are
# present in some riba_distinta_line
move_line_model = self.env['account.move.line']
rdml_model = self.env['riba.distinta.move.line']
move_line_ids = move_line_model.search([
('move_id', '=', invoice.move_id.id),
('date_maturity', '!=', False)])
if move_line_ids:
riba_line_ids = rdml_model.search(
[('move_line_id', 'in', [m.id for m in move_line_ids])])
if riba_line_ids:
if len(riba_line_ids) > 1:
riba_line_ids = riba_line_ids[0]
raise UserError(
_('Invoice is linked to RI.BA. list nr {riba}').format(
riba=riba_line_ids.riba_line_id.distinta_id.name
))
super(AccountInvoice, self).action_cancel()

def copy(self, default=None):
self.ensure_one()
# Delete Due Cost Line of invoice when copying
Expand Down

0 comments on commit 0bd0631

Please sign in to comment.