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

[15.0][ADD] project_fields_sequence #1096

Closed
wants to merge 2 commits into from

Conversation

Shide
Copy link

@Shide Shide commented Mar 24, 2023

Add a new module to be able to fill project fields based on sequences when creating a new one.

Define a sequence starting with project.field. and concatenate a (technical) field name to it.
Eg: project.field.name, project.field.alias_name

Field names must be Character types.

This will return the next value of the sequence when the project is created (and default_get is called)

MT-1506 @moduon @rafaelbn @yajo @anddago78 please review if you want :)

@Shide Shide marked this pull request as draft March 24, 2023 08:23
@Shide Shide force-pushed the 15.0-project_name_sequence-project branch from 3f8b901 to 196e211 Compare March 24, 2023 08:28
@Shide Shide marked this pull request as ready for review March 24, 2023 08:28
@Shide
Copy link
Author

Shide commented Mar 27, 2023

@sbidoul Hey! Do you know how to fix the runboat build? I've tried to mark project_task_code module as rebel, but it's failing when loading demo data (i suppose).

@sbidoul
Copy link
Member

sbidoul commented Mar 27, 2023

I don't know. It does not look like a runboat issue. It's either an Odoo bug, or an incompatibility with a module of this repo?

@Shide
Copy link
Author

Shide commented Mar 27, 2023

Yes, project_task_code module is creating a constraint on project.task and other modules (not this one) who creates tasks (by strange ways or on a different order) breaks the init of the ruboat with demo data.

@sbidoul
Copy link
Member

sbidoul commented Mar 27, 2023

Ah, yes. IMO modules that add constraints on standard models should enable them by configuration, otherwise we reach dead ends like this one.

@rafaelbn rafaelbn added this to the 15.0 milestone Mar 27, 2023
@yajo
Copy link
Member

yajo commented Mar 28, 2023

I asked @Shide declared the rebel module groups, so tests go ✅ now. The only part that's missing is runboat.

I'm thinking that maybe runboat should be able to boot always, no matter if the build failed. After all, if installation fails because of these kind of problems, one could always go to the runboat and create an empty database, or uninstall the rebel module by hand. Does that make sense to you @sbidoul?

Copy link
Member

@yajo yajo left a comment

Choose a reason for hiding this comment

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

Code review.

project_fields_sequence/models/project_project.py Outdated Show resolved Hide resolved
project_fields_sequence/static/description/icon.svg Outdated Show resolved Hide resolved
@Shide Shide force-pushed the 15.0-project_name_sequence-project branch from 592d343 to 592e27f Compare March 28, 2023 08:56
@Shide Shide force-pushed the 15.0-project_name_sequence-project branch from 592e27f to 57fee3d Compare March 28, 2023 09:03
@yajo
Copy link
Member

yajo commented Mar 28, 2023

Superseded by OCA/server-tools#2598

@yajo yajo closed this Mar 28, 2023
@yajo yajo deleted the 15.0-project_name_sequence-project branch March 28, 2023 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants