Initial import from Docker volume
This commit is contained in:
15
modules/product_month/__init__.py
Executable file
15
modules/product_month/__init__.py
Executable file
@@ -0,0 +1,15 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
|
||||
from trytond.pool import Pool
|
||||
|
||||
from . import product
|
||||
|
||||
|
||||
def register():
|
||||
Pool.register(
|
||||
product.Product,
|
||||
product.Template,
|
||||
product.Month,
|
||||
product.ProductMonth,
|
||||
module='product_month', type_='model')
|
||||
BIN
modules/product_month/__pycache__/__init__.cpython-311.opt-1.pyc
Executable file
BIN
modules/product_month/__pycache__/__init__.cpython-311.opt-1.pyc
Executable file
Binary file not shown.
BIN
modules/product_month/__pycache__/product.cpython-311.opt-1.pyc
Executable file
BIN
modules/product_month/__pycache__/product.cpython-311.opt-1.pyc
Executable file
Binary file not shown.
15
modules/product_month/build/lib/trytond/modules/product_month/__init__.py
Executable file
15
modules/product_month/build/lib/trytond/modules/product_month/__init__.py
Executable file
@@ -0,0 +1,15 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
|
||||
from trytond.pool import Pool
|
||||
|
||||
from . import product
|
||||
|
||||
|
||||
def register():
|
||||
Pool.register(
|
||||
product.Product,
|
||||
product.Template,
|
||||
product.Month,
|
||||
product.ProductMonth,
|
||||
module='product_month', type_='model')
|
||||
30
modules/product_month/build/lib/trytond/modules/product_month/product.py
Executable file
30
modules/product_month/build/lib/trytond/modules/product_month/product.py
Executable file
@@ -0,0 +1,30 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from trytond.model import fields
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
from trytond.pyson import Bool, Eval, Id
|
||||
from trytond.model import (ModelSQL, ModelView)
|
||||
|
||||
class Template(metaclass=PoolMeta):
|
||||
__name__ = 'product.template'
|
||||
|
||||
month = fields.One2Many('product.product.month', 'product',
|
||||
"Period")
|
||||
|
||||
class Product(metaclass=PoolMeta):
|
||||
__name__ = 'product.product'
|
||||
|
||||
class Month(ModelView, ModelSQL):
|
||||
"Month"
|
||||
__name__ = 'product.month'
|
||||
_rec_name = 'month_name'
|
||||
month_name = fields.Char("Month")
|
||||
is_cotation = fields.Boolean("Cotation month")
|
||||
beg_date = fields.Date("Date from")
|
||||
end_date = fields.Date("Date end")
|
||||
|
||||
class ProductMonth(ModelView, ModelSQL):
|
||||
"Product month"
|
||||
__name__ = 'product.product.month'
|
||||
product = fields.Many2One('product.product',"Product")
|
||||
month = fields.Many2One('product.month',"Month")
|
||||
12
modules/product_month/build/lib/trytond/modules/product_month/product.xml
Executable file
12
modules/product_month/build/lib/trytond/modules/product_month/product.xml
Executable file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="template_view_form">
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit" ref="product.template_view_form"/>
|
||||
<field name="name">template_form</field>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
||||
8
modules/product_month/build/lib/trytond/modules/product_month/tryton.cfg
Executable file
8
modules/product_month/build/lib/trytond/modules/product_month/tryton.cfg
Executable file
@@ -0,0 +1,8 @@
|
||||
[tryton]
|
||||
version=7.2.7
|
||||
depends:
|
||||
ir
|
||||
product
|
||||
res
|
||||
xml:
|
||||
product.xml
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath expr="/form/notebook" position="inside">
|
||||
<page string="Month" col="3" id="month">
|
||||
<label name="month"/>
|
||||
<field name="month"/>
|
||||
</page>
|
||||
</xpath>
|
||||
</data>
|
||||
BIN
modules/product_month/dist/trytond_product_month-7.2.7-py3.11.egg
vendored
Executable file
BIN
modules/product_month/dist/trytond_product_month-7.2.7-py3.11.egg
vendored
Executable file
Binary file not shown.
30
modules/product_month/product.py
Executable file
30
modules/product_month/product.py
Executable file
@@ -0,0 +1,30 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from trytond.model import fields
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
from trytond.pyson import Bool, Eval, Id
|
||||
from trytond.model import (ModelSQL, ModelView)
|
||||
|
||||
class Template(metaclass=PoolMeta):
|
||||
__name__ = 'product.template'
|
||||
|
||||
month = fields.One2Many('product.product.month', 'product',
|
||||
"Period")
|
||||
|
||||
class Product(metaclass=PoolMeta):
|
||||
__name__ = 'product.product'
|
||||
|
||||
class Month(ModelView, ModelSQL):
|
||||
"Month"
|
||||
__name__ = 'product.month'
|
||||
_rec_name = 'month_name'
|
||||
month_name = fields.Char("Month")
|
||||
is_cotation = fields.Boolean("Cotation month")
|
||||
beg_date = fields.Date("Date from")
|
||||
end_date = fields.Date("Date end")
|
||||
|
||||
class ProductMonth(ModelView, ModelSQL):
|
||||
"Product month"
|
||||
__name__ = 'product.product.month'
|
||||
product = fields.Many2One('product.product',"Product")
|
||||
month = fields.Many2One('product.month',"Month")
|
||||
12
modules/product_month/product.xml
Executable file
12
modules/product_month/product.xml
Executable file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="template_view_form">
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit" ref="product.template_view_form"/>
|
||||
<field name="name">template_form</field>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
||||
123
modules/product_month/setup.py
Executable file
123
modules/product_month/setup.py
Executable file
@@ -0,0 +1,123 @@
|
||||
#!/usr/bin/env python3
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
|
||||
import io
|
||||
import os
|
||||
import re
|
||||
from configparser import ConfigParser
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
|
||||
def read(fname):
|
||||
return io.open(
|
||||
os.path.join(os.path.dirname(__file__), fname),
|
||||
'r', encoding='utf-8').read()
|
||||
|
||||
|
||||
def get_require_version(name):
|
||||
require = '%s >= %s.%s, < %s.%s'
|
||||
require %= (name, major_version, minor_version,
|
||||
major_version, minor_version + 1)
|
||||
return require
|
||||
|
||||
|
||||
config = ConfigParser()
|
||||
config.read_file(open(os.path.join(os.path.dirname(__file__), 'tryton.cfg')))
|
||||
info = dict(config.items('tryton'))
|
||||
for key in ('depends', 'extras_depend', 'xml'):
|
||||
if key in info:
|
||||
info[key] = info[key].strip().splitlines()
|
||||
version = info.get('version', '0.0.1')
|
||||
major_version, minor_version, _ = version.split('.', 2)
|
||||
major_version = int(major_version)
|
||||
minor_version = int(minor_version)
|
||||
name = 'trytond_product_month'
|
||||
|
||||
if minor_version % 2:
|
||||
download_url = ''
|
||||
else:
|
||||
download_url = 'http://downloads.tryton.org/%s.%s/' % (
|
||||
major_version, minor_version)
|
||||
|
||||
requires = []
|
||||
for dep in info.get('depends', []):
|
||||
if not re.match(r'(ir|res)(\W|$)', dep):
|
||||
requires.append(get_require_version('trytond_%s' % dep))
|
||||
requires.append(get_require_version('trytond'))
|
||||
|
||||
setup(name=name,
|
||||
version=version,
|
||||
description='Tryton module to add period to product',
|
||||
author='Tryton',
|
||||
author_email='foundation@tryton.org',
|
||||
url='http://www.tryton.org/',
|
||||
download_url=download_url,
|
||||
project_urls={
|
||||
"Bug Tracker": 'https://bugs.tryton.org/',
|
||||
"Documentation": 'https://docs.tryton.org/',
|
||||
"Forum": 'https://www.tryton.org/forum',
|
||||
"Source Code": 'https://code.tryton.org/tryton',
|
||||
},
|
||||
keywords='tryton product month',
|
||||
package_dir={'trytond.modules.product_month': '.'},
|
||||
packages=(
|
||||
['trytond.modules.product_month']
|
||||
+ ['trytond.modules.product_month.%s' % p
|
||||
for p in find_packages()]
|
||||
),
|
||||
package_data={
|
||||
'trytond.modules.product_month': (info.get('xml', [])
|
||||
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po']),
|
||||
},
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Environment :: Plugins',
|
||||
'Framework :: Tryton',
|
||||
'Intended Audience :: Developers',
|
||||
'Intended Audience :: Financial and Insurance Industry',
|
||||
'Intended Audience :: Legal Industry',
|
||||
'Intended Audience :: Manufacturing',
|
||||
'License :: OSI Approved :: '
|
||||
'GNU General Public License v3 or later (GPLv3+)',
|
||||
'Natural Language :: Bulgarian',
|
||||
'Natural Language :: Catalan',
|
||||
'Natural Language :: Chinese (Simplified)',
|
||||
'Natural Language :: Czech',
|
||||
'Natural Language :: Dutch',
|
||||
'Natural Language :: English',
|
||||
'Natural Language :: Finnish',
|
||||
'Natural Language :: French',
|
||||
'Natural Language :: German',
|
||||
'Natural Language :: Hungarian',
|
||||
'Natural Language :: Indonesian',
|
||||
'Natural Language :: Italian',
|
||||
'Natural Language :: Persian',
|
||||
'Natural Language :: Polish',
|
||||
'Natural Language :: Portuguese (Brazilian)',
|
||||
'Natural Language :: Romanian',
|
||||
'Natural Language :: Russian',
|
||||
'Natural Language :: Slovenian',
|
||||
'Natural Language :: Spanish',
|
||||
'Natural Language :: Turkish',
|
||||
'Natural Language :: Ukrainian',
|
||||
'Operating System :: OS Independent',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
'Programming Language :: Python :: 3.9',
|
||||
'Programming Language :: Python :: 3.10',
|
||||
'Programming Language :: Python :: 3.11',
|
||||
'Programming Language :: Python :: 3.12',
|
||||
'Programming Language :: Python :: Implementation :: CPython',
|
||||
'Topic :: Office/Business',
|
||||
],
|
||||
license='GPL-3',
|
||||
python_requires='>=3.8',
|
||||
install_requires=requires,
|
||||
zip_safe=False,
|
||||
entry_points="""
|
||||
[trytond.modules]
|
||||
product_month = trytond.modules.product_month
|
||||
""",
|
||||
)
|
||||
8
modules/product_month/tryton.cfg
Executable file
8
modules/product_month/tryton.cfg
Executable file
@@ -0,0 +1,8 @@
|
||||
[tryton]
|
||||
version=7.2.7
|
||||
depends:
|
||||
ir
|
||||
product
|
||||
res
|
||||
xml:
|
||||
product.xml
|
||||
53
modules/product_month/trytond_product_month.egg-info/PKG-INFO
Executable file
53
modules/product_month/trytond_product_month.egg-info/PKG-INFO
Executable file
@@ -0,0 +1,53 @@
|
||||
Metadata-Version: 2.1
|
||||
Name: trytond-product-month
|
||||
Version: 7.2.7
|
||||
Summary: Tryton module to add period to product
|
||||
Home-page: http://www.tryton.org/
|
||||
Download-URL: http://downloads.tryton.org/7.2/
|
||||
Author: Tryton
|
||||
Author-email: foundation@tryton.org
|
||||
License: GPL-3
|
||||
Project-URL: Bug Tracker, https://bugs.tryton.org/
|
||||
Project-URL: Documentation, https://docs.tryton.org/
|
||||
Project-URL: Forum, https://www.tryton.org/forum
|
||||
Project-URL: Source Code, https://code.tryton.org/tryton
|
||||
Keywords: tryton product month
|
||||
Classifier: Development Status :: 5 - Production/Stable
|
||||
Classifier: Environment :: Plugins
|
||||
Classifier: Framework :: Tryton
|
||||
Classifier: Intended Audience :: Developers
|
||||
Classifier: Intended Audience :: Financial and Insurance Industry
|
||||
Classifier: Intended Audience :: Legal Industry
|
||||
Classifier: Intended Audience :: Manufacturing
|
||||
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
||||
Classifier: Natural Language :: Bulgarian
|
||||
Classifier: Natural Language :: Catalan
|
||||
Classifier: Natural Language :: Chinese (Simplified)
|
||||
Classifier: Natural Language :: Czech
|
||||
Classifier: Natural Language :: Dutch
|
||||
Classifier: Natural Language :: English
|
||||
Classifier: Natural Language :: Finnish
|
||||
Classifier: Natural Language :: French
|
||||
Classifier: Natural Language :: German
|
||||
Classifier: Natural Language :: Hungarian
|
||||
Classifier: Natural Language :: Indonesian
|
||||
Classifier: Natural Language :: Italian
|
||||
Classifier: Natural Language :: Persian
|
||||
Classifier: Natural Language :: Polish
|
||||
Classifier: Natural Language :: Portuguese (Brazilian)
|
||||
Classifier: Natural Language :: Romanian
|
||||
Classifier: Natural Language :: Russian
|
||||
Classifier: Natural Language :: Slovenian
|
||||
Classifier: Natural Language :: Spanish
|
||||
Classifier: Natural Language :: Turkish
|
||||
Classifier: Natural Language :: Ukrainian
|
||||
Classifier: Operating System :: OS Independent
|
||||
Classifier: Programming Language :: Python :: 3
|
||||
Classifier: Programming Language :: Python :: 3.8
|
||||
Classifier: Programming Language :: Python :: 3.9
|
||||
Classifier: Programming Language :: Python :: 3.10
|
||||
Classifier: Programming Language :: Python :: 3.11
|
||||
Classifier: Programming Language :: Python :: 3.12
|
||||
Classifier: Programming Language :: Python :: Implementation :: CPython
|
||||
Classifier: Topic :: Office/Business
|
||||
Requires-Python: >=3.8
|
||||
13
modules/product_month/trytond_product_month.egg-info/SOURCES.txt
Executable file
13
modules/product_month/trytond_product_month.egg-info/SOURCES.txt
Executable file
@@ -0,0 +1,13 @@
|
||||
setup.py
|
||||
./__init__.py
|
||||
./product.py
|
||||
./product.xml
|
||||
./tryton.cfg
|
||||
./view/template_form.xml
|
||||
trytond_product_month.egg-info/PKG-INFO
|
||||
trytond_product_month.egg-info/SOURCES.txt
|
||||
trytond_product_month.egg-info/dependency_links.txt
|
||||
trytond_product_month.egg-info/entry_points.txt
|
||||
trytond_product_month.egg-info/not-zip-safe
|
||||
trytond_product_month.egg-info/requires.txt
|
||||
trytond_product_month.egg-info/top_level.txt
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
2
modules/product_month/trytond_product_month.egg-info/entry_points.txt
Executable file
2
modules/product_month/trytond_product_month.egg-info/entry_points.txt
Executable file
@@ -0,0 +1,2 @@
|
||||
[trytond.modules]
|
||||
product_month = trytond.modules.product_month
|
||||
1
modules/product_month/trytond_product_month.egg-info/not-zip-safe
Executable file
1
modules/product_month/trytond_product_month.egg-info/not-zip-safe
Executable file
@@ -0,0 +1 @@
|
||||
|
||||
2
modules/product_month/trytond_product_month.egg-info/requires.txt
Executable file
2
modules/product_month/trytond_product_month.egg-info/requires.txt
Executable file
@@ -0,0 +1,2 @@
|
||||
trytond<7.3,>=7.2
|
||||
trytond_product<7.3,>=7.2
|
||||
1
modules/product_month/trytond_product_month.egg-info/top_level.txt
Executable file
1
modules/product_month/trytond_product_month.egg-info/top_level.txt
Executable file
@@ -0,0 +1 @@
|
||||
trytond
|
||||
11
modules/product_month/view/template_form.xml
Executable file
11
modules/product_month/view/template_form.xml
Executable file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath expr="/form/notebook" position="inside">
|
||||
<page string="Month" col="3" id="month">
|
||||
<label name="month"/>
|
||||
<field name="month"/>
|
||||
</page>
|
||||
</xpath>
|
||||
</data>
|
||||
Reference in New Issue
Block a user