@@ -31,11 +31,19 @@ _info_form = '''<?xml version="1.0"?>
|
||||
</form>'''
|
||||
|
||||
def _trans_unrec(self, cr, uid, data, context):
|
||||
recs = pooler.get_pool(cr.dbname).get('account.move.line').read(cr, uid, data['ids'], ['reconcile_id',])
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
recs = pool.get('account.move.line').read(cr, uid, data['ids'], ['reconcile_id',])
|
||||
recs = filter(lambda x: x['reconcile_id'], recs)
|
||||
rec_ids = [rec['reconcile_id'][0] for rec in recs]
|
||||
move = {}
|
||||
for r in pool.get('account.move.reconcile').browse(cr, uid, rec_ids):
|
||||
for line in r.line_id:
|
||||
move[line.move_id.id] = True
|
||||
if len(rec_ids):
|
||||
pooler.get_pool(cr.dbname).get('account.move.reconcile').unlink(cr, uid, rec_ids)
|
||||
if move:
|
||||
invoice_ids = pool.get('account.invoice').search(cr, uid, [('move_id','in',move.keys())], context=context)
|
||||
pool.get('account.invoice').write(cr, uid, invoice_ids, {}, context=context)
|
||||
return {}
|
||||
|
||||
class wiz_unreconcile(wizard.interface):
|
||||
|
||||
@@ -22,7 +22,3 @@
|
||||
|
||||
import sale_prepare_allot
|
||||
import order
|
||||
import shipping
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
@@ -1,28 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<!--
|
||||
this report is defined here instead of in the stock module because it uses the
|
||||
sale_id field defined in the sale module
|
||||
-->
|
||||
<report id="report_shipping" model="stock.picking" name="sale.shipping" rml="sale/report/shipping.rml" string="Delivery order"/>
|
||||
|
||||
<!--
|
||||
<report
|
||||
id="report_prepare"
|
||||
string="Preparation Order"
|
||||
model="sale.order"
|
||||
name="sale.order.prepare"
|
||||
rml="sale/report/prepare.rml"/>
|
||||
|
||||
<report
|
||||
id="report_prepare_allot"
|
||||
string="Preparation Order (with Allotments)"
|
||||
model="sale.order"
|
||||
name="sale.order.prepare.allot"
|
||||
rml="sale/report/prepare_allot.rml"
|
||||
auto="False"/>
|
||||
-->
|
||||
<report auto="False" id="report_sale_order" model="sale.order" name="sale.order" rml="sale/report/order.rml" string="Quotation / Order"/>
|
||||
|
||||
</data>
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
# 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import report
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
# 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
{
|
||||
'name': 'Print Delivery Order',
|
||||
'version': '1.0',
|
||||
'category': 'Generic Modules/Sales & Purchases',
|
||||
'description': """Allows to print a delivery order.""",
|
||||
'author': 'Tiny',
|
||||
'depends': ['sale', 'delivery'],
|
||||
'init_xml': [],
|
||||
'update_xml': [
|
||||
'delivery_report.xml'
|
||||
],
|
||||
'demo_xml': [],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '',
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<report
|
||||
id="report_shipping"
|
||||
model="stock.picking"
|
||||
name="sale.shipping"
|
||||
rml="sale_delivery/report/shipping.rml"
|
||||
string="Delivery order"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -0,0 +1,24 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
# 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import shipping
|
||||
|
||||
@@ -71,4 +71,4 @@ class shipping(report_sxw.rml_parse):
|
||||
# sum_total = self.cr.fetchone()[0] or 0.00
|
||||
# return True
|
||||
|
||||
report_sxw.report_sxw('report.sale.shipping','stock.picking','addons/sale/report/shipping.rml',parser=shipping)
|
||||
report_sxw.report_sxw('report.sale.shipping','stock.picking','addons/sale_delivery/report/shipping.rml',parser=shipping)
|
||||
@@ -222,4 +222,4 @@
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
</document>
|
||||
Reference in New Issue
Block a user