Skip to main content

A collection of opinionated factories for common Tryton modules

Project description

Trytond-factories

Trytond-factories is a factory_trytond extension which uses factory_boy that allows to create Tryton ERP models with factories.

You can inherit ERP's core model factories to do some testing or to populate databases with some sample data.

How does it work?

Import this module and you will be able to create objects such as Company, Party, etc.

Here's an example with Tryton's model Company:

import trytond_factories

company = trytond_factories.Company.create(party__name='Example Company')

print(company)
>>> Pool().get('company.company')(1)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trytond-factories-7.0.0.tar.gz (22.3 kB view hashes)

Uploaded Source

Built Distribution

trytond_factories-7.0.0-py3-none-any.whl (27.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page