Skip to content

Conversation

@legalsylvain
Copy link
Contributor

  • if we come from a 8.0 database, the fiscal years are present in the table account_fiscalyear. (model account.fiscalyear).
  • V12.0 reintroduce a similar model account.fiscal.year in the table account_fiscal_year.

So, this PR improve the V12 migration script, populating new table with the old datas, if the old table is present.

CC : @StefanRijnhart, @pedrobaeza, @MiquelRForgeFlow

Thanks for your review !

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@legalsylvain legalsylvain added this to the 12.0 milestone May 30, 2020
@pedrobaeza
Copy link
Member

I prefer to not have that entries if the fiscal year is equal to the natural one. Is there any possibility of checking that?

@legalsylvain
Copy link
Contributor Author

Hi @pedrobaeza. thanks for your answer. It seems, you don't like a lot this V12 model -;)

Well, I could add a test if month != 12 and day != 31 (for date_from and date_to fields) but, in fact, we cant know if user want to keep or not the data, even if the fiscal year is the "natural one".

My point is to keep all the data. Then, if user don't want to use them, there are free to drop them very easely.

  • Keep there data will not hurt anything, (AFAIK)
  • it's only a few records in the database. (not a space problem IMO)
  • for users that want to use some OCA modules like account_move_fiscal_year, it avoids to recreate all the fiscal years. CC : @benwillig, @bjeficent

Do you think it's acceptable ?

@sbidoul sbidoul changed the title [IMP] populate account.fiscal.year with account.fiscalyear data [12.0][IMP] populate account.fiscal.year with account.fiscalyear data Jun 9, 2020
Copy link
Member

@sbidoul sbidoul left a comment

Choose a reason for hiding this comment

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

Sounds reasonable to me.

@pedrobaeza
Copy link
Member

OK, I suppose that getting fiscal year dates doesn't take more time having this table than not having it:

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 12.0-ocabot-merge-pr-2342-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 083aacb into OCA:12.0 Jun 10, 2020
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 083aacb. 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.

4 participants