KiCost: added `board_qty` as alias for `number`

This commit is contained in:
Diego Capusotto 2021-12-16 07:40:21 -03:00
parent 96a5f3da21
commit 93f57ff6c6
3 changed files with 8 additions and 0 deletions

View File

@ -1318,9 +1318,11 @@ Next time you need this list just use an alias, like this:
* Valid keys:
- `aggregate`: [list(dict)] Add components from other projects.
* Valid keys:
- *board_qty*: Alias for number.
- `file`: [string=''] Name of the XML to aggregate.
- `number`: [number=100] Number of boards to build (components multiplier).
- `variant`: [string=' '] Variant for this project.
- *board_qty*: Alias for number.
- `currency`: [string|list(string)=USD] Currency priority. Use ISO4217 codes (i.e. USD, EUR).
- `distributors`: [string|list(string)] Include this distributors list. Default is all the available.
- `dnf_filter`: [string|list(string)='_none'] Name of the filter to mark components as not fitted.

View File

@ -765,12 +765,14 @@ outputs:
options:
# [list(dict)] Add components from other projects
aggregate:
# `board_qty` is an alias for `number`
# [string=''] Name of the XML to aggregate
- file: ''
# [number=100] Number of boards to build (components multiplier)
number: 100
# [string=' '] Variant for this project
variant: ' '
# `board_qty` is an alias for `number`
# [string|list(string)=USD] Currency priority. Use ISO4217 codes (i.e. USD, EUR)
currency: USD
# [string|list(string)] Include this distributors list. Default is all the available

View File

@ -29,6 +29,8 @@ class Aggregate(Optionable):
""" Variant for this project """
self.number = 100
""" Number of boards to build (components multiplier) """
self.board_qty = None
""" {number} """
def config(self, parent):
super().config(parent)
@ -70,6 +72,8 @@ class KiCostOptions(VariantOptions):
""" [list(dict)] Add components from other projects """
self.number = 100
""" Number of boards to build (components multiplier) """
self.board_qty = None
""" {number} """
super().__init__()
self.add_to_doc('variant', WARNING_MIX)