Browse Source

Active Records

main
resteve 10 years ago
parent
commit
cd335975f2
  1. 3
      CHANGELOG
  2. 1
      MANIFEST.in
  3. 1
      README
  4. 8
      __init__.py
  5. 24
      __tryton__.py
  6. 21
      invoice.py
  7. 18
      sale.py
  8. 19
      setup.py
  9. 7
      tryton.cfg

3
CHANGELOG

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

1
MANIFEST.in

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

1
README

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

8
__init__.py

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

24
__tryton__.py

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

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

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

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

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