Skip to content

[16.0][MIG] l10n_it_central_journal_reportlab#3002

Merged
OCA-git-bot merged 6 commits into
OCA:16.0from
Borruso:16.0-mig-l10n_it_central_journal_reportlab
Sep 7, 2023
Merged

[16.0][MIG] l10n_it_central_journal_reportlab#3002
OCA-git-bot merged 6 commits into
OCA:16.0from
Borruso:16.0-mig-l10n_it_central_journal_reportlab

Conversation

@Borruso

@Borruso Borruso commented Nov 4, 2022

Copy link
Copy Markdown
Contributor

Migration l10n_it_central_journal_reportlab from 14.0 to 16.0

--
Confermo di aver firmato il CLA https://odoo-community.org/page/cla e di aver letto le linee guida su https://odoo-community.org/page/contributing

@primes2h

primes2h commented Nov 8, 2022

Copy link
Copy Markdown
Contributor

/ocabot migration l10n_it_central_journal_reportlab

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Nov 8, 2022
@OCA-git-bot OCA-git-bot mentioned this pull request Nov 8, 2022
81 tasks
@Borruso Borruso force-pushed the 16.0-mig-l10n_it_central_journal_reportlab branch from 36db4b8 to ea0e200 Compare November 10, 2022 10:51
@Borruso Borruso marked this pull request as ready for review November 10, 2022 10:51
@Borruso Borruso force-pushed the 16.0-mig-l10n_it_central_journal_reportlab branch 3 times, most recently from 5fe7d50 to 0a38bc5 Compare November 11, 2022 09:31

@TonyMasciI TonyMasciI 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.

Aprirò una ISSUE per la V14

<field name="l10n_it_central_journal_exclude" />
</xpath>
</field>
</record>

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.

Sposterei questa view in un file dedicato (account_journal_views.xml)

if self.l10n_it_date_move_line_from_view:
self.l10n_it_year_footer = fields.Date.to_date(
self.l10n_it_date_move_line_from_view
).year

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.

Non ha senso modificare questo pezzo di codice:

self.l10n_it_year_footer = fields.Date.to_date( self.l10n_it_date_move_line_from_view ).year

con:

self.l10n_it_year_footer = self.l10n_it_date_move_line_from_view.year

date_end = fields.Date.to_date(self.daterange_id.date_end)

if self.daterange_id.date_last_print:
date_last_print = fields.Date.to_date(self.daterange_id.date_last_print)

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.

Suggested change
date_last_print = fields.Date.to_date(self.daterange_id.date_last_print)
date_last_print = self.daterange_id.date_last_print

if self.daterange_id.date_last_print:
date_last_print = fields.Date.to_date(self.daterange_id.date_last_print)
self.last_def_date_print = date_last_print
date_start = (date_last_print + timedelta(days=1)).__str__()

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.

Suggested change
date_start = (date_last_print + timedelta(days=1)).__str__()
date_start = (date_last_print + timedelta(days=1)).strftime("%Y-%m-%d")

debit = Paragraph(formatLang(self.env, 0), style_number)
credit = Paragraph(formatLang(self.env, line["credit"]), style_number)
list_balance.append((0, line["credit"]))
lines_data.append([[row, date, move, account, name, debit, credit]])

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.

c'è un motivo per cui sono stati fatti due if in cascata quando si potrebbe eseguire questo codice?

Da questo:

            if line["debit"] > 0:
                debit = Paragraph(formatLang(self.env, line["debit"]), style_number)
                credit = Paragraph(formatLang(self.env, 0), style_number)
                list_balance.append((line["debit"], 0))
                lines_data.append([[row, date, move, account, name, debit, credit]])
            if line["credit"] > 0:
                debit = Paragraph(formatLang(self.env, 0), style_number)
                credit = Paragraph(formatLang(self.env, line["credit"]), style_number)
                list_balance.append((0, line["credit"]))
                lines_data.append([[row, date, move, account, name, debit, credit]])

a questo:

            debit = Paragraph(formatLang(self.env, line["debit"]), style_number)
            credit = Paragraph(formatLang(self.env, line["credit"]), style_number)
            list_balance.append((line["credit"], line["credit"]))
            lines_data.append([[row, date, move, account, name, debit, credit]])

@api.onchange("date_move_line_from_view")
def get_year_footer_reportlab(self):
if self.date_move_line_from_view:
self.year_footer = fields.Date.to_date(self.date_move_line_from_view).year

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.

Non ha senso modificare questo pezzo di codice:

self.year_footer = fields.Date.to_date(self.date_move_line_from_view).year

con:

self.l10n_it_year_footer = self.l10n_it_date_move_line_from_view.year

@Borruso Borruso force-pushed the 16.0-mig-l10n_it_central_journal_reportlab branch 2 times, most recently from 2ab3630 to c5b921a Compare July 18, 2023 14:43
@Borruso Borruso force-pushed the 16.0-mig-l10n_it_central_journal_reportlab branch from c5b921a to 72e95de Compare July 26, 2023 09:00
@Borruso Borruso force-pushed the 16.0-mig-l10n_it_central_journal_reportlab branch 3 times, most recently from 10294bd to ceb3f7e Compare August 25, 2023 15:26
@Borruso

Borruso commented Sep 7, 2023

Copy link
Copy Markdown
Contributor Author

@TonyMasciI per le varie modifiche suggerite Aprirò una ISSUE per la V14, suggerisco di applicarle dopo la migrazione dato che queste modifiche dovranno essere per v14 e v16

Bisognerebbe creare poi una issue di tracciamento

@TonyMasciI

Copy link
Copy Markdown
Contributor

@Borruso perfetto!

@tafaRU tafaRU left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Il resto LGTM 👍

Comment thread l10n_it_central_journal_reportlab/wizard/print_giornale.xml
@Borruso Borruso force-pushed the 16.0-mig-l10n_it_central_journal_reportlab branch from ceb3f7e to 78ff26f Compare September 7, 2023 08:44

@marcelofrare marcelofrare 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 functional

@marcelofrare

Copy link
Copy Markdown
Contributor

Nota a margine:
il readme è piuttosto limitato.
Sarebbe da aggiungere l'indicazione che il file PDF generato dal modulo lo si trova in fondo alla form.
Inoltre, servirebbe spiegare la differenza tra STAMPA e STAMPA DEFINITIVA

@tafaRU

tafaRU commented Sep 7, 2023

Copy link
Copy Markdown
Member

@marcelofrare in merito a #3002 (comment) abbiamo aperto #3562

@tafaRU tafaRU left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Borruso puoi schiacciare 669bf8022d1934fa3a4942fece3847432a943f99 con il precedente?

@MarcoCalcagni MarcoCalcagni left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

OK . test funzionali

@Borruso Borruso force-pushed the 16.0-mig-l10n_it_central_journal_reportlab branch from 78ff26f to 0b60310 Compare September 7, 2023 12:40
@tafaRU

tafaRU commented Sep 7, 2023

Copy link
Copy Markdown
Member

/ocabot merge nobump

@OCA-git-bot

Copy link
Copy Markdown
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-3002-by-tafaRU-bump-nobump, awaiting test results.

@tafaRU

tafaRU commented Sep 7, 2023

Copy link
Copy Markdown
Member

/ocabot merge nobump

OCA-git-bot added a commit that referenced this pull request Sep 7, 2023
Signed-off-by tafaRU
@OCA-git-bot

Copy link
Copy Markdown
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-3002-by-tafaRU-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 3aa24e9 into OCA:16.0 Sep 7, 2023
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at bc548ae. Thanks a lot for contributing to OCA. ❤️

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants