Active Records

This commit is contained in:
resteve 2012-10-09 09:37:05 +02:00
parent 0e37981005
commit cd335975f2
9 changed files with 51 additions and 51 deletions

View file

@ -1,2 +1,5 @@
Version 2.6.0 - 2012-10-09
* Active Records
Version 2.4.0 - 2012-07-07
* Initial release

View file

@ -5,6 +5,5 @@ include CHANGELOG
include COPYRIGHT
include LICENSE
include *.xml
include *.odt
include locale/*.po
include doc/*

1
README
View file

@ -2,7 +2,6 @@ trytond_sale_invoice_cancel
===========================
The currency module of the Tryton application platform.
See __tryton__.py
Installing
----------

View file

@ -2,4 +2,10 @@
#The COPYRIGHT file at the top level of this repository contains
#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')

View file

@ -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': [
]
}

21
invoice.py Normal file
View file

@ -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
View file

@ -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()

View file

@ -5,8 +5,15 @@
from setuptools import setup
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 = int(major_version)
minor_version = int(minor_version)
@ -22,10 +29,10 @@ requires.append('trytond >= %s.%s, < %s.%s' %
setup(name='trytond_sale_invoice_cancel',
version=info.get('version', '0.0.1'),
description=info.get('description', ''),
author=info.get('author', 'Zikzakmedia'),
author_email=info.get('email', 'zikzak@zikzakmedia.com'),
url=info.get('website', 'http://www.zikzakmedia.com'),
description='Tryton module for cancel invoices from sale and reopen',
author='Zikzakmedia SL',
author_email='zikzak@zikzakmedia.com',
url='http://www.zikzakmedia.com',
download_url="http://downloads.tryton.org/" + \
info.get('version', '0.0.1').rsplit('.', 1)[0] + '/',
package_dir={'trytond.modules.sale_invoice_cancel': '.'},
@ -35,7 +42,7 @@ setup(name='trytond_sale_invoice_cancel',
],
package_data={
'trytond.modules.sale_invoice_cancel': info.get('xml', []) \
+ info.get('translation', []),
+ ['tryton.cfg', 'locale/*.po'],
},
classifiers=[
'Development Status :: 5 - Production/Stable',

7
tryton.cfg Normal file
View file

@ -0,0 +1,7 @@
[tryton]
version=2.6.0
depends:
ir
res
sale
xml: