Define in the sale subscription if the invoice must be posted or validated
Project description
…
Install
Dependencies for ArchLinux
sudo pacman -S cairo pkgconf gobject-introspection
Dependencies for debian
sudo apt-get install libcairo2-dev libgirepository1.0-dev
Install the package
# installs python deps
pip install hb_tryton_sale_subscription_automatic_post
# install the module
trytond-admin -u sale_subscription_automatic_post --activate-dependencies
Install the db by hb-tryton-devtools
pip install git+https://gitlab.com/hashbangfr/tryton-modules/hb_tryton_devtools.git#egg=hb_tryton_devtools
export TRYTON_DATABASE_URI=postgresql:///
export TRYTON_DATABASE_NAME=test
hb-tryton-admin create-db --modules sale_subscription_automatic_post
Test package
The package need pytest and hb-tryton-devtools
pip install pytest pytest-cov
pip install git+ssh://git@gitlab.com/hashbangfr/tryton-modules/hb_tryton_devtools.git#egg=hb_tryton_devtools
Run the test with pytest with environ variable
export TRYTON_DATABASE_URI=postgresql:///
export TRYTON_DATABASE_NAME=test
pytest sale_subscription_automatic_post/tests
Design
This module adds new fields to the Subscription Model and the Sale Configuration model.
The field “Invoice State” of the Subscription Model allows to set, for each instance of Subscription, to set the state of the invoices that will be generated : draft, validated or posted.
The default value of this field is set by the field “Default Subscription invoice state” of the Sale Configuration model.
Usage
Setting the state of the invoices generated by a subscription
When creating a new subscription, select a state (draft, validated or posted) in the “Invoice State” field, set up all the subscription, quote and run. Then, when running the Consumption Creation wizard and the Invoice Creation wizard, all the invoices linked to this subscription will have the state of the “Invoice State” field of the subscription.
Setting the default value of the invoice state of a subscription
Open the Sale Configuration menu, and select a state (draft, validated or posted) in the “Default Subscription invoice state” field. Then, when creating a new Subscription, the default value of the “Invoice State” will be the value selected in the Sale Configuration. The value of “Invoice State” is still editable.
When the “Default Subscription invoice state” field is empty, the default value of “Invoice State” is draft.
CHANGELOG
1.0.0 (2022-05-17)
Added field on subcription to indicate if the invoice will be posted or not.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file hb_tryton_sale_subscription_automatic_post-1.0.0.tar.gz
.
File metadata
- Download URL: hb_tryton_sale_subscription_automatic_post-1.0.0.tar.gz
- Upload date:
- Size: 20.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb8bbc1c09fab652f76c9e97732d003a48eef90523b7487a3177edce170badb7 |
|
MD5 | 727176dd0ca80acac9cdd30b1e38c4c5 |
|
BLAKE2b-256 | a586eaa388ae086816d8dfb4649fe5df5c528cdd5578679b09e158f89f74faa6 |
File details
Details for the file hb_tryton_sale_subscription_automatic_post-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: hb_tryton_sale_subscription_automatic_post-1.0.0-py3-none-any.whl
- Upload date:
- Size: 23.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 872653c14f9247a529a11b6c377aa339e25b65e1658aa45189197444bcf732c4 |
|
MD5 | a2d5c027f63f2cae77e0bf2e3235ba75 |
|
BLAKE2b-256 | 7504ccc7564e99af686f3f099de0ccf10f9d8a15ed878866a97725c6516ea0af |