API Documentation

Blok product_family

class anyblok_product.bloks.product_family.ProductFamilyBlok(registry)[source]

Bases: anyblok.blok.Blok

Product Family blok

name = 'product_family'
version = '0.1.0'
author = 'Franck BRET'
autoinstall = False
priority = 100

Product.Family

Family model

class anyblok_product.bloks.product_family.family.Family[source]

Product.Family class

AnyBlok registration:

  • Type: Model
  • Registry name: Model.Product.Family
  • Tablename: product_family
Fields  
id
  • Type - anyblok.column.Integer
  • Label - 'Identifier'
  • primary_key - True
  • autoincrement - True
  • default - anyblok.column.NoDefaultValue
create_date
  • Type - anyblok.column.DateTime
  • nullable - False
  • is auto updated - False
  • default timezone - <UTC>
edit_date
  • Type - anyblok.column.DateTime
  • nullable - False
  • is auto updated - True
  • default timezone - <UTC>
code
  • Type - anyblok.column.String
  • Label - 'Family code'
  • unique - True
  • nullable - False
  • default - anyblok.column.NoDefaultValue
  • size - 64
name
  • Type - anyblok.column.String
  • Label - 'Family name'
  • default - anyblok.column.NoDefaultValue
  • size - 256
description
  • Type - anyblok.column.Text
  • Label - 'Family description'
  • default - anyblok.column.NoDefaultValue
properties
  • Type - anyblok_postgres.column.Jsonb
  • Label - 'Family properties'
  • default - anyblok.column.NoDefaultValue
family_code
  • Type - anyblok.column.Selection
  • default - anyblok.column.NoDefaultValue
  • selections - 'get_family_codes'
  • size - 64
items
  • Type - anyblok.field.Function
  • fget - 'fget_items'
FAMILY_CODE = None
amend(**kwargs)[source]
code = <anyblok.column.String object>
classmethod create(**kwargs)[source]
create_date = <anyblok.column.DateTime object>
classmethod define_mapper_args()[source]
description = <anyblok.column.Text object>
edit_date = <anyblok.column.DateTime object>
family_code = <anyblok.column.Selection object>
family_schema = None
fget_items()[source]

Returns a list of products instance from this family

classmethod get_family_codes()[source]
id = <anyblok.column.Integer object>
item_schema = None
items = <anyblok.field.Function object>
name = <anyblok.column.String object>
properties = <anyblok_postgres.column.Jsonb object>
classmethod query(*args, **kwargs)[source]
template_schema = None
class anyblok_product.bloks.product_family.family.Template[source]

Add family relationship to template

amend(family, **kwargs)[source]
classmethod create(family, **kwargs)[source]
family = <anyblok.relationship.Many2One object>