Active Records
This commit is contained in:
parent
0e37981005
commit
cd335975f2
|
@ -1,2 +1,5 @@
|
||||||
|
Version 2.6.0 - 2012-10-09
|
||||||
|
* Active Records
|
||||||
|
|
||||||
Version 2.4.0 - 2012-07-07
|
Version 2.4.0 - 2012-07-07
|
||||||
* Initial release
|
* Initial release
|
||||||
|
|
|
@ -5,6 +5,5 @@ include CHANGELOG
|
||||||
include COPYRIGHT
|
include COPYRIGHT
|
||||||
include LICENSE
|
include LICENSE
|
||||||
include *.xml
|
include *.xml
|
||||||
include *.odt
|
|
||||||
include locale/*.po
|
include locale/*.po
|
||||||
include doc/*
|
include doc/*
|
||||||
|
|
1
README
1
README
|
@ -2,7 +2,6 @@ trytond_sale_invoice_cancel
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
The currency module of the Tryton application platform.
|
The currency module of the Tryton application platform.
|
||||||
See __tryton__.py
|
|
||||||
|
|
||||||
Installing
|
Installing
|
||||||
----------
|
----------
|
||||||
|
|
|
@ -2,4 +2,10 @@
|
||||||
#The COPYRIGHT file at the top level of this repository contains
|
#The COPYRIGHT file at the top level of this repository contains
|
||||||
#the full copyright notices and license terms.
|
#the full copyright notices and license terms.
|
||||||
|
|
||||||
from .sale import *
|
from trytond.pool import Pool
|
||||||
|
from .invoice import *
|
||||||
|
|
||||||
|
def register():
|
||||||
|
Pool.register(
|
||||||
|
Invoice,
|
||||||
|
module='sale_invoice_cancel', type_='model')
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
#This file is part sale_invoice_cancel module for Tryton.
|
|
||||||
#The COPYRIGHT file at the top level of this repository contains
|
|
||||||
#the full copyright notices and license terms.
|
|
||||||
{
|
|
||||||
'name': 'Sale Invoice Cancel',
|
|
||||||
'name_ca_ES': 'Cancel·lar factures de comandes',
|
|
||||||
'name_es_ES': 'Cancelar facturas de pedidos',
|
|
||||||
'version': '2.4.0',
|
|
||||||
'author': 'Zikzakmedia',
|
|
||||||
'email': 'zikzak@zikzakmedia.com',
|
|
||||||
'website': 'http://www.zikzakmedia.com/',
|
|
||||||
'description': '''Cancel invoices from sale''',
|
|
||||||
'description_ca_ES': '''Cancel·la factures provinents de comandes de venda''',
|
|
||||||
'description_es_ES': '''Cancela facturas provenientes de pedidos de venta''',
|
|
||||||
'depends': [
|
|
||||||
'ir',
|
|
||||||
'res',
|
|
||||||
'account_invoice_cancel',
|
|
||||||
],
|
|
||||||
'xml': [
|
|
||||||
],
|
|
||||||
'translation': [
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
#This file is part sale_invoice_cancel module for Tryton.
|
||||||
|
#The COPYRIGHT file at the top level of this repository contains
|
||||||
|
#the full copyright notices and license terms.
|
||||||
|
|
||||||
|
from trytond.model import ModelView, Workflow
|
||||||
|
from trytond.pool import Pool, PoolMeta
|
||||||
|
|
||||||
|
__all__ = ['Invoice']
|
||||||
|
__metaclass__ = PoolMeta
|
||||||
|
|
||||||
|
class Invoice:
|
||||||
|
__name__ = 'account.invoice'
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
@ModelView.button
|
||||||
|
@Workflow.transition('draft')
|
||||||
|
def draft(cls, invoices):
|
||||||
|
'''Available cancel invoices from purchase'''
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
18
sale.py
18
sale.py
|
@ -1,18 +0,0 @@
|
||||||
#This file is part sale_invoice_cancel module for Tryton.
|
|
||||||
#The COPYRIGHT file at the top level of this repository contains
|
|
||||||
#the full copyright notices and license terms.
|
|
||||||
|
|
||||||
from trytond.model import Workflow, ModelView, ModelSQL, fields
|
|
||||||
from trytond.tools import safe_eval, datetime_strftime
|
|
||||||
from trytond.transaction import Transaction
|
|
||||||
from trytond.pool import Pool
|
|
||||||
|
|
||||||
class Invoice(ModelSQL, ModelView):
|
|
||||||
_name = 'account.invoice'
|
|
||||||
|
|
||||||
@Workflow.transition('draft')
|
|
||||||
def draft(self, ids):
|
|
||||||
'''Available cancel invoices from sale'''
|
|
||||||
pass
|
|
||||||
|
|
||||||
Invoice()
|
|
19
setup.py
19
setup.py
|
@ -5,8 +5,15 @@
|
||||||
|
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
import re
|
import re
|
||||||
|
import os
|
||||||
|
import ConfigParser
|
||||||
|
|
||||||
info = eval(open('__tryton__.py').read())
|
config = ConfigParser.ConfigParser()
|
||||||
|
config.readfp(open('tryton.cfg'))
|
||||||
|
info = dict(config.items('tryton'))
|
||||||
|
for key in ('depends', 'extras_depend', 'xml'):
|
||||||
|
if key in info:
|
||||||
|
info[key] = info[key].strip().splitlines()
|
||||||
major_version, minor_version, _ = info.get('version', '0.0.1').split('.', 2)
|
major_version, minor_version, _ = info.get('version', '0.0.1').split('.', 2)
|
||||||
major_version = int(major_version)
|
major_version = int(major_version)
|
||||||
minor_version = int(minor_version)
|
minor_version = int(minor_version)
|
||||||
|
@ -22,10 +29,10 @@ requires.append('trytond >= %s.%s, < %s.%s' %
|
||||||
|
|
||||||
setup(name='trytond_sale_invoice_cancel',
|
setup(name='trytond_sale_invoice_cancel',
|
||||||
version=info.get('version', '0.0.1'),
|
version=info.get('version', '0.0.1'),
|
||||||
description=info.get('description', ''),
|
description='Tryton module for cancel invoices from sale and reopen',
|
||||||
author=info.get('author', 'Zikzakmedia'),
|
author='Zikzakmedia SL',
|
||||||
author_email=info.get('email', 'zikzak@zikzakmedia.com'),
|
author_email='zikzak@zikzakmedia.com',
|
||||||
url=info.get('website', 'http://www.zikzakmedia.com'),
|
url='http://www.zikzakmedia.com',
|
||||||
download_url="http://downloads.tryton.org/" + \
|
download_url="http://downloads.tryton.org/" + \
|
||||||
info.get('version', '0.0.1').rsplit('.', 1)[0] + '/',
|
info.get('version', '0.0.1').rsplit('.', 1)[0] + '/',
|
||||||
package_dir={'trytond.modules.sale_invoice_cancel': '.'},
|
package_dir={'trytond.modules.sale_invoice_cancel': '.'},
|
||||||
|
@ -35,7 +42,7 @@ setup(name='trytond_sale_invoice_cancel',
|
||||||
],
|
],
|
||||||
package_data={
|
package_data={
|
||||||
'trytond.modules.sale_invoice_cancel': info.get('xml', []) \
|
'trytond.modules.sale_invoice_cancel': info.get('xml', []) \
|
||||||
+ info.get('translation', []),
|
+ ['tryton.cfg', 'locale/*.po'],
|
||||||
},
|
},
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 5 - Production/Stable',
|
'Development Status :: 5 - Production/Stable',
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
[tryton]
|
||||||
|
version=2.6.0
|
||||||
|
depends:
|
||||||
|
ir
|
||||||
|
res
|
||||||
|
sale
|
||||||
|
xml:
|
Loading…
Reference in New Issue