Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from __future__ import with_statement
- from trytond.model import Workflow, ModelView, ModelSQL, fields
- from trytond.pool import Pool, PoolMeta
- __all__ = ['Sale']
- __metaclass__ = PoolMeta
- class Sale(Workflow, ModelSQL, ModelView):
- 'Sale'
- __name__ = 'sale.sale'
- @classmethod
- def create_invoice(self, invoice_type):
- invoice_id = super(Sale, self).create_invoice(sale, invoice_type)
- pool = Pool()
- Invoice = pool.get('account.invoice')
- Sale = pool.get('sale.sale')
- description = Sale.description
- if invoice_id:
- Invoice.write(invoice_id, {'description':description})
- return invoice_id
Advertisement
Add Comment
Please, Sign In to add comment