Skip to content

[15.0][ADD] project_fields_sequence - #1096

Closed
Shide wants to merge 2 commits into
OCA:15.0from
moduon:15.0-project_name_sequence-project
Closed

Shide wants to merge 2 commits into
OCA:15.0from
moduon:15.0-project_name_sequence-project

Conversation

@Shide

@Shide Shide commented Mar 24, 2023

Copy link
Copy Markdown
Contributor

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

Shide commented Mar 27, 2023

Copy link
Copy Markdown
Contributor Author

@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

sbidoul commented Mar 27, 2023

Copy link
Copy Markdown
Member

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

Shide commented Mar 27, 2023

Copy link
Copy Markdown
Contributor Author

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

sbidoul commented Mar 27, 2023

Copy link
Copy Markdown
Member

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

yajo commented Mar 28, 2023

Copy link
Copy Markdown
Member

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?

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

Code review.

Comment thread project_fields_sequence/models/project_project.py Outdated
Comment thread project_fields_sequence/static/description/icon.svg Outdated
@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

yajo commented Mar 28, 2023

Copy link
Copy Markdown
Member

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