Skip to content

Refactor label/report template copying - #6582

Merged
SchrodingersGat merged 57 commits into
inventree:masterfrom
matmair:refactor-labels
Feb 27, 2024
Merged

SchrodingersGat merged 57 commits into
inventree:masterfrom
matmair:refactor-labels

Conversation

@matmair

@matmair matmair commented Feb 27, 2024 •

Copy link
Copy Markdown
Member

This PR is a first step towards #5841 and will help with #6478.
It factors out the ready() function of the report and label apps into a generic function that can also be used by plugins to ship their own default templating content.
This does not change the functionality around templating and is only a refactor to get functionality into one place.

matmair and others added 30 commits April 24, 2022 20:48
@matmair matmair added report Report/Label generation refactor labels Feb 27, 2024
@matmair matmair added this to the 0.15.0 milestone Feb 27, 2024
@matmair matmair self-assigned this Feb 27, 2024
@netlify

netlify Bot commented Feb 27, 2024 •

Copy link
Copy Markdown

✅ Deploy Preview for inventree-web-pui-preview canceled.

Name Link
🔨 Latest commit b109f0c
🔍 Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/65dd84ea89c5960008fdaa78

@matmair
matmair marked this pull request as ready for review February 27, 2024 17:25
@SchrodingersGat SchrodingersGat modified the milestones: 0.15.0, 0.14.0 Feb 27, 2024
@SchrodingersGat

Copy link
Copy Markdown
Member

@matmair nice work, this will clean things up nicely for our future work

@SchrodingersGat
SchrodingersGat merged commit 1199291 into inventree:master Feb 27, 2024
@wolflu05

Copy link
Copy Markdown
Member

@matmair Does this also fixes the bug that if I change an InvenTree provided template, it gets crated again and I end up with duplicate templates?

@matmair
matmair deleted the refactor-labels branch February 27, 2024 22:44
@matmair

matmair commented Feb 27, 2024

Copy link
Copy Markdown
Member Author

@wolflu05 no, it is a pure internal refactor. The behaviour you describe is a more nuanced problem and will have to be discussed as the current way templates are handled (file based) has some problems when interacting with an API.

@wolflu05

Copy link
Copy Markdown
Member

Ok. Yeah that's right.

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

Labels

refactor report Report/Label generation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants