mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 03:00:54 +00:00
Add title when creating child build (#9893)
This commit is contained in:
@ -29,7 +29,7 @@ class AutoCreateBuildsPlugin(EventMixin, InvenTreePlugin):
|
|||||||
SLUG = 'autocreatebuilds'
|
SLUG = 'autocreatebuilds'
|
||||||
AUTHOR = _('InvenTree contributors')
|
AUTHOR = _('InvenTree contributors')
|
||||||
DESCRIPTION = _('Automatically create build orders for assemblies')
|
DESCRIPTION = _('Automatically create build orders for assemblies')
|
||||||
VERSION = '1.0.0'
|
VERSION = '1.1.0'
|
||||||
|
|
||||||
def wants_process_event(self, event) -> bool:
|
def wants_process_event(self, event) -> bool:
|
||||||
"""Return whether given event should be processed or not."""
|
"""Return whether given event should be processed or not."""
|
||||||
@ -93,6 +93,7 @@ class AutoCreateBuildsPlugin(EventMixin, InvenTreePlugin):
|
|||||||
Build.objects.create(
|
Build.objects.create(
|
||||||
part=subassembly,
|
part=subassembly,
|
||||||
parent=build,
|
parent=build,
|
||||||
|
title=f'Generated child build for {build.reference}',
|
||||||
project_code=build.project_code,
|
project_code=build.project_code,
|
||||||
quantity=required_quantity,
|
quantity=required_quantity,
|
||||||
responsible=build.responsible,
|
responsible=build.responsible,
|
||||||
|
Reference in New Issue
Block a user