summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabien Pinckaers <fp@tinyerp.com>2009-01-15 18:37:46 +0100
committerFabien Pinckaers <fp@tinyerp.com>2009-01-15 18:37:46 +0100
commitb7d010baec77d47ba0eeaefd8f95acd70511d33f (patch)
tree27016103f04e2b4163b06f004bfb372787a3d399
parente840ca7df03d277ccb2237ad2ab97f343b6c3d5d (diff)
modifs
bzr revid: fp@tinyerp.com-20090115173746-pf9k1ld5bi4j2pag
-rw-r--r--addons/account/wizard/wizard_unreconcile.py10
-rw-r--r--addons/sale/report/__init__.py4
-rw-r--r--addons/sale/sale_report.xml21
-rw-r--r--addons/sale_delivery_report/__init__.py24
-rw-r--r--addons/sale_delivery_report/__terp__.py40
-rw-r--r--addons/sale_delivery_report/delivery_report.xml13
-rw-r--r--addons/sale_delivery_report/report/__init__.py24
-rw-r--r--addons/sale_delivery_report/report/shipping.py (renamed from addons/sale/report/shipping.py)2
-rw-r--r--addons/sale_delivery_report/report/shipping.rml (renamed from addons/sale/report/shipping.rml)2
9 files changed, 112 insertions, 28 deletions
diff --git a/addons/account/wizard/wizard_unreconcile.py b/addons/account/wizard/wizard_unreconcile.py
index 898b107e4ca..1d263caa0fe 100644
--- a/addons/account/wizard/wizard_unreconcile.py
+++ b/addons/account/wizard/wizard_unreconcile.py
@@ -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):
diff --git a/addons/sale/report/__init__.py b/addons/sale/report/__init__.py
index 1dfd30cfedd..1ec8fde6538 100644
--- a/addons/sale/report/__init__.py
+++ b/addons/sale/report/__init__.py
@@ -22,7 +22,3 @@
import sale_prepare_allot
import order
-import shipping
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/sale/sale_report.xml b/addons/sale/sale_report.xml
index afb43b869c5..f21f20c63f7 100644
--- a/addons/sale/sale_report.xml
+++ b/addons/sale/sale_report.xml
@@ -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>
diff --git a/addons/sale_delivery_report/__init__.py b/addons/sale_delivery_report/__init__.py
new file mode 100644
index 00000000000..bef9ff4838e
--- /dev/null
+++ b/addons/sale_delivery_report/__init__.py
@@ -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
+
diff --git a/addons/sale_delivery_report/__terp__.py b/addons/sale_delivery_report/__terp__.py
new file mode 100644
index 00000000000..9021888f235
--- /dev/null
+++ b/addons/sale_delivery_report/__terp__.py
@@ -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:
diff --git a/addons/sale_delivery_report/delivery_report.xml b/addons/sale_delivery_report/delivery_report.xml
new file mode 100644
index 00000000000..b5192be59e3
--- /dev/null
+++ b/addons/sale_delivery_report/delivery_report.xml
@@ -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>
diff --git a/addons/sale_delivery_report/report/__init__.py b/addons/sale_delivery_report/report/__init__.py
new file mode 100644
index 00000000000..e3a97d242c9
--- /dev/null
+++ b/addons/sale_delivery_report/report/__init__.py
@@ -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
+
diff --git a/addons/sale/report/shipping.py b/addons/sale_delivery_report/report/shipping.py
index 667ca80b8d6..9b7fd0a80bb 100644
--- a/addons/sale/report/shipping.py
+++ b/addons/sale_delivery_report/report/shipping.py
@@ -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)
diff --git a/addons/sale/report/shipping.rml b/addons/sale_delivery_report/report/shipping.rml
index 8d0c82141ae..f7af0da65b0 100644
--- a/addons/sale/report/shipping.rml
+++ b/addons/sale_delivery_report/report/shipping.rml
@@ -222,4 +222,4 @@
<font color="white"> </font>
</para>
</story>
-</document> \ No newline at end of file
+</document>