[IMP] Sale: Remove unused file board_sale_demo.xml and improve code

bzr revid: mra@mra-laptop-20100818090616-4b9tbenwb71nmol1
This commit is contained in:
Mustufa Rangwala
2010-08-18 14:36:16 +05:30
parent dddc5e45ae
commit ba350580c1
5 changed files with 16 additions and 17 deletions
+1 -1
View File
@@ -67,7 +67,7 @@
'board_sale_view.xml',
'process/sale_process.xml',
],
'demo_xml': ['sale_demo.xml','board_sale_demo.xml'],
'demo_xml': ['sale_demo.xml'],
'test': [
'test/data_test.yml',
'test/manual_order_policy.yml',
-6
View File
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
</data>
</openerp>
+5 -4
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@@ -15,20 +15,21 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from report import report_sxw
from osv import osv
class order(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
def __init__(self, cr, uid, name, context=None):
super(order, self).__init__(cr, uid, name, context=context)
self.localcontext.update({
'time': time,
})
report_sxw.report_sxw('report.sale.order','sale.order','addons/sale/report/sale_order.rml',parser=order)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+7 -6
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@@ -15,20 +15,22 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from report import report_sxw
class sale_prepare(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
def __init__(self, cr, uid, name, context=None):
super(sale_prepare, self).__init__(cr, uid, name, context=context)
self.localcontext.update( {
'allotment': self._allotment,
})
def _allotment(self, object):
allotments = {}
for line in object.order_line:
@@ -42,5 +44,4 @@ class sale_prepare(report_sxw.rml_parse):
report_sxw.report_sxw('report.sale.order.prepare.allot', 'sale.order', 'addons/sale/report/sale_prepare_allot.rml',parser=sale_prepare)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+3
View File
@@ -1,16 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<!-- Sequences for sale.order -->
<record id="seq_type_sale_order" model="ir.sequence.type">
<field name="name">Sale Order</field>
<field name="code">sale.order</field>
</record>
<record id="seq_sale_order" model="ir.sequence">
<field name="name">Sale Order</field>
<field name="code">sale.order</field>
<field name="prefix">SO</field>
<field name="padding">3</field>
</record>
</data>
</openerp>