Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
95cb0b615a | ||
|
|
1f23c9f281 |
@@ -3,7 +3,7 @@ name: Publish Package
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "8.0"
|
||||
- "7.0"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
with:
|
||||
token: ${{ secrets.GITEA_TOKEN }}
|
||||
github-server-url: "http://unpaismejor-gitea-app:3000"
|
||||
ref: "8.0"
|
||||
ref: ${{ github.ref_name }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Detect package branch
|
||||
@@ -81,7 +81,6 @@ jobs:
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import tomllib
|
||||
|
||||
OWNER = 'tryton-do'
|
||||
PACKAGE_TYPE = 'pypi'
|
||||
@@ -98,8 +97,7 @@ jobs:
|
||||
series = os.environ['PACKAGE_SERIES']
|
||||
major, minor = map(int, series.split('.'))
|
||||
|
||||
pyproject = tomllib.loads(Path('pyproject.toml').read_text())
|
||||
package_name = pyproject['project']['name']
|
||||
package_name = 'unpaismejor_account_debit_note'
|
||||
normalized_name = normalize(package_name)
|
||||
|
||||
username = os.environ['TWINE_USERNAME']
|
||||
|
||||
+12
@@ -1,3 +1,15 @@
|
||||
from trytond.pool import Pool
|
||||
|
||||
from . import invoice
|
||||
|
||||
__all__ = ['invoice']
|
||||
|
||||
|
||||
def register():
|
||||
Pool.register(
|
||||
invoice.Invoice,
|
||||
invoice.DebitInvoiceStart,
|
||||
module='account_debit_note', type_='model')
|
||||
Pool.register(
|
||||
invoice.DebitInvoice,
|
||||
module='account_debit_note', type_='wizard')
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
[build-system]
|
||||
requires = ['hatchling >= 1', 'hatch-tryton']
|
||||
build-backend = 'hatchling.build'
|
||||
|
||||
[project]
|
||||
name = 'unpaismejor_account_debit_note'
|
||||
dynamic = ['version', 'dependencies', 'optional-dependencies', 'authors', 'readme']
|
||||
requires-python = '>=3.10'
|
||||
maintainers = [
|
||||
{name = "Fundación Un País Mejor"},
|
||||
]
|
||||
description = "Debit notes for Tryton invoices"
|
||||
license = 'GPL-3.0-or-later'
|
||||
license-files = ["LICENSE", "COPYRIGHT"]
|
||||
keywords = ["tryton", "accounting", "invoice", "debit-note"]
|
||||
classifiers = [
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"Environment :: Plugins",
|
||||
"Framework :: Tryton",
|
||||
"Topic :: Office/Business",
|
||||
"Topic :: Office/Business :: Financial :: Accounting",
|
||||
"Topic :: Software Development :: Libraries :: Python Modules",
|
||||
]
|
||||
|
||||
[project.entry-points.'trytond.modules']
|
||||
account_debit_note = 'trytond.modules.account_debit_note'
|
||||
|
||||
[project.urls]
|
||||
homepage = "https://www.unpaismejor.org.do"
|
||||
repository = "https://code.unpaismejor.org.do/tryton-do/account_debit_note"
|
||||
|
||||
[tool.hatch.build]
|
||||
include = [
|
||||
'CHANGELOG',
|
||||
'COPYRIGHT',
|
||||
'LICENSE',
|
||||
'README.rst',
|
||||
'**/tryton.cfg',
|
||||
'**/*.py',
|
||||
'**/*.xml',
|
||||
'view/**/*.xml',
|
||||
'locale/**/*.po',
|
||||
'doc/**/*.rst',
|
||||
'tests/**/*.rst',
|
||||
'tests/**/*.json',
|
||||
]
|
||||
|
||||
[tool.hatch.build.targets.wheel.sources]
|
||||
"" = "trytond/modules/account_debit_note"
|
||||
|
||||
[tool.hatch.metadata.hooks.tryton]
|
||||
copyright = 'COPYRIGHT'
|
||||
readme = 'README.rst'
|
||||
|
||||
[tool.hatch.metadata.hooks.tryton.tryton-optional-dependencies]
|
||||
test = ['proteus']
|
||||
@@ -0,0 +1,68 @@
|
||||
from configparser import ConfigParser
|
||||
from pathlib import Path
|
||||
|
||||
from setuptools import setup
|
||||
|
||||
|
||||
MODULE = 'account_debit_note'
|
||||
PREFIX = 'trytond.modules'
|
||||
PACKAGE = f'{PREFIX}.{MODULE}'
|
||||
|
||||
|
||||
def read(path):
|
||||
return Path(path).read_text(encoding='utf-8')
|
||||
|
||||
|
||||
config = ConfigParser()
|
||||
config.read('tryton.cfg')
|
||||
version = config.get('tryton', 'version')
|
||||
major, minor, _ = version.split('.', 2)
|
||||
series = f'{major}.{minor}'
|
||||
next_major = f'{major}.{int(minor) + 1}'
|
||||
|
||||
|
||||
setup(
|
||||
name='unpaismejor_account_debit_note',
|
||||
version=version,
|
||||
description='Debit notes for Tryton invoices',
|
||||
long_description=read('README.rst'),
|
||||
long_description_content_type='text/x-rst',
|
||||
author='Solutema SRL, Fundación Un País Mejor',
|
||||
maintainer='Fundación Un País Mejor',
|
||||
url='https://code.unpaismejor.org.do/tryton-do/account_debit_note',
|
||||
keywords='tryton accounting invoice debit-note',
|
||||
license='GPL-3.0-or-later',
|
||||
python_requires='>=3.8',
|
||||
packages=[PACKAGE],
|
||||
package_dir={PACKAGE: '.'},
|
||||
package_data={
|
||||
PACKAGE: [
|
||||
'tryton.cfg',
|
||||
'*.xml',
|
||||
'view/*.xml',
|
||||
'locale/*.po',
|
||||
'doc/*.rst',
|
||||
],
|
||||
},
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Environment :: Plugins',
|
||||
'Framework :: Tryton',
|
||||
'Topic :: Office/Business',
|
||||
'Topic :: Office/Business :: Financial :: Accounting',
|
||||
'Topic :: Software Development :: Libraries :: Python Modules',
|
||||
],
|
||||
install_requires=[
|
||||
f'trytond >= {series}, < {next_major}',
|
||||
f'trytond_account_invoice >= {series}, < {next_major}',
|
||||
],
|
||||
extras_require={
|
||||
'test': [f'proteus >= {series}, < {next_major}'],
|
||||
},
|
||||
entry_points={
|
||||
'trytond.modules': [
|
||||
f'{MODULE} = {PACKAGE}',
|
||||
],
|
||||
},
|
||||
zip_safe=False,
|
||||
)
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
[tryton]
|
||||
version=8.0.0
|
||||
version=7.0.0
|
||||
depends:
|
||||
account_invoice
|
||||
xml:
|
||||
|
||||
Reference in New Issue
Block a user