Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][OU-FIX] hr_timesheet: Delete obsolete view #3658

Merged
merged 1 commit into from
Dec 16, 2022

Conversation

ypapouin
Copy link

In previous hr_timesheet_analysis module version, a pivot view was already defined for the hr_timesheet.timesheet_action_all action.

In 14.0, the hr_timesheet module introduced its own pivot view timesheet_action_view_all_pivot that collides with the deprecated one from the OCA module and raise a constraint exception:

psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "act_window_view_unique_mode_per_action"
DETAIL:  Key (act_window_id, view_mode)=(xxx, pivot) already exists.

@OCA-git-bot
Copy link
Contributor

Hi @pedrobaeza, @MiquelRForgeFlow, @StefanRijnhart,
some modules you are maintaining are being modified, check this out!

@ypapouin ypapouin force-pushed the 14.0-fix-hr-timesheet-view-collision branch from de5b107 to 9694bcb Compare December 16, 2022 10:16
@pedrobaeza
Copy link
Member

Better to rename the view then, to auto-document the disappearing of such module. And shouldn't you put it on apriori.py as merged module?

@ypapouin
Copy link
Author

No the OCA module hr_timesheet_analysis still exists, this is only this ir.actions.act_window.view record that has been deleted since it is now built-in the hr_timesheet module.

I'm using unlink because without this collision, the view would have been deleted during the hr_timesheet_analysis update.

@pedrobaeza pedrobaeza changed the title [OU-FIX] hr_timesheet: Delete obsolete view [14.0][OU-FIX] hr_timesheet: Delete obsolete view Dec 16, 2022
@pedrobaeza
Copy link
Member

I don't get it then. If if exists on 14.0, when you do the regular update, the view will be removed as the XML-ID doesn't exist anymore.

@ypapouin
Copy link
Author

But the hr_timesheet is migrated before hr_timesheet_analysis since the last one depends on the first one

@pedrobaeza pedrobaeza added this to the 14.0 milestone Dec 16, 2022
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

OK, it's due to such constraint...

In previous `hr_timesheet_analysis` module version, a pivot view was already defined for the `hr_timesheet.timesheet_action_all` action.

In 14.0, the `hr_timesheet` module introduced its own pivot view `timesheet_action_view_all_pivot` that collides with the deprecated one from the OCA module and raise a constraint exception:

```
psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "act_window_view_unique_mode_per_action"
DETAIL:  Key (act_window_id, view_mode)=(xxx, pivot) already exists.
```
@ypapouin ypapouin force-pushed the 14.0-fix-hr-timesheet-view-collision branch from 9694bcb to dc03be9 Compare December 16, 2022 10:45
@pedrobaeza pedrobaeza merged commit 5618fff into OCA:14.0 Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants