From e834a50810ed756dd99d61b3c3b541e207c546c6 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Fri, 12 Sep 2008 11:40:24 +0530 Subject: [PATCH] move sale_advance to sale module... bzr revid: mra@tinyerp.com-20080912061024-tt0ys561r6rs66ea --- addons/sale/sale_demo.xml | 52 +++++--- addons/sale/sale_wizard.xml | 32 +++-- addons/sale/wizard/__init__.py | 2 +- addons/sale/wizard/make_invoice_advance.py | 142 +++++++++++++++++++++ 4 files changed, 195 insertions(+), 33 deletions(-) create mode 100644 addons/sale/wizard/make_invoice_advance.py diff --git a/addons/sale/sale_demo.xml b/addons/sale/sale_demo.xml index d7ee9c2dd93..259b5d75e39 100644 --- a/addons/sale/sale_demo.xml +++ b/addons/sale/sale_demo.xml @@ -1,11 +1,11 @@ - + - + @@ -15,11 +15,11 @@ - + - + New server config + material @@ -28,7 +28,7 @@ 123 make_to_stock - + [PC1] Basic PC @@ -59,14 +59,14 @@ 5 make_to_stock - - - - + + + + - + @@ -76,11 +76,11 @@ - + - + [PC2] Computer assembled on demand @@ -99,10 +99,10 @@ 8 make_to_order - - - - + + + + @@ -136,7 +136,7 @@ 7 - + @@ -170,7 +170,7 @@ 1 - + @@ -194,8 +194,22 @@ 15 - + + + + + + + Advance Product + + service + 150.0 + 100.0 + + + + diff --git a/addons/sale/sale_wizard.xml b/addons/sale/sale_wizard.xml index 46e42ffff37..b829aafa472 100644 --- a/addons/sale/sale_wizard.xml +++ b/addons/sale/sale_wizard.xml @@ -1,22 +1,28 @@ - + - - - + + + + + diff --git a/addons/sale/wizard/__init__.py b/addons/sale/wizard/__init__.py index 782f11fbbed..cdea5aa161e 100644 --- a/addons/sale/wizard/__init__.py +++ b/addons/sale/wizard/__init__.py @@ -31,6 +31,6 @@ from make_invoice import make_invoice import wizard_sale_line_invoice - +import make_invoice_advance # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale/wizard/make_invoice_advance.py b/addons/sale/wizard/make_invoice_advance.py new file mode 100644 index 00000000000..792a3d41da2 --- /dev/null +++ b/addons/sale/wizard/make_invoice_advance.py @@ -0,0 +1,142 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Copyright (c) 2005-2006 TINY SPRL. (http://tiny.be) All Rights Reserved. +# +# $Id: make_invoice.py 1070 2005-07-29 12:41:24Z nicoe $ +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsability of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# garantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## + +import wizard +import pooler +from osv import fields, osv + +form = """ +
+ + + + + + +""" +fields = { + 'product_id': {'string':'Product', 'type':'many2one','relation':'product.product','required':True}, + 'amount': {'string':'Unit Price', 'type':'float', 'size':(16,2),'required':True}, + 'qtty': {'string':'Quantity', 'type':'float', 'size':(16,2),'required':True, 'default': lambda *a: 1}, +} + +form_msg = """ +
+