Merge lp:~rvalyi/openobject-addons/smile-5-0-patches into lp:openobject-addons/5.0

Proposed by Raphaël Valyi - http://www.akretion.com
Status: Merged
Merge reported by: Husen Daudi
Merged at revision: not available
Proposed branch: lp:~rvalyi/openobject-addons/smile-5-0-patches
Merge into: lp:openobject-addons/5.0
Diff against target: None lines
To merge this branch: bzr merge lp:~rvalyi/openobject-addons/smile-5-0-patches
Reviewer Review Type Date Requested Status
Husen Daudi (community) Approve
Review via email: mp+6009@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

clean up and ergonomic fixes. Care has be taken for not introducing regressions. See blueprint definition. Also please notice that nothing has been added to the data model, only existing data are used, in my opinion using existing data by default just makes sense.

Revision history for this message
Husen Daudi (husendaudi) wrote :

merged code for adding purchases link on product form.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'purchase/purchase_view.xml'
2--- purchase/purchase_view.xml 2009-03-10 07:12:13 +0000
3+++ purchase/purchase_view.xml 2009-04-29 10:13:57 +0000
4@@ -28,6 +28,8 @@
5 </graph>
6 </field>
7 </record>
8+
9+ <act_window domain="[('product_id','=',active_id)]" id="action_purchase_line_product_tree" name="Product purchases" res_model="purchase.order.line" src_model="product.product"/>
10
11 <record id="purchase_order_form" model="ir.ui.view">
12 <field name="name">purchase.order.form</field>
13
14=== modified file 'sale/__init__.py'
15--- sale/__init__.py 2009-01-04 22:12:50 +0000
16+++ sale/__init__.py 2009-04-29 10:13:57 +0000
17@@ -27,6 +27,7 @@
18 import sale
19 import stock
20 import product
21+import invoice
22
23 import wizard
24 import report
25
26=== modified file 'sale/__terp__.py'
27--- sale/__terp__.py 2009-02-03 17:02:20 +0000
28+++ sale/__terp__.py 2009-04-29 09:32:01 +0000
29@@ -56,8 +56,7 @@
30 'sale_report.xml',
31 'sale_wizard.xml',
32 'stock_view.xml',
33- 'process/sale_process.xml',
34- 'product_view.xml'
35+ 'process/sale_process.xml'
36 ],
37 'demo_xml': ['sale_demo.xml'],
38 'installable': True,
39
40=== added file 'sale/invoice.py'
41--- sale/invoice.py 1970-01-01 00:00:00 +0000
42+++ sale/invoice.py 2009-04-29 10:13:57 +0000
43@@ -0,0 +1,35 @@
44+# -*- encoding: utf-8 -*-
45+##############################################################################
46+#
47+# OpenERP, Open Source Management Solution
48+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
49+# $Id$
50+#
51+# This program is free software: you can redistribute it and/or modify
52+# it under the terms of the GNU General Public License as published by
53+# the Free Software Foundation, either version 3 of the License, or
54+# (at your option) any later version.
55+#
56+# This program is distributed in the hope that it will be useful,
57+# but WITHOUT ANY WARRANTY; without even the implied warranty of
58+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
59+# GNU General Public License for more details.
60+#
61+# You should have received a copy of the GNU General Public License
62+# along with this program. If not, see <http://www.gnu.org/licenses/>.
63+#
64+##############################################################################
65+
66+import time
67+import netsvc
68+from osv import fields, osv
69+
70+
71+class account_invoice(osv.osv):
72+ _inherit = "account.invoice"
73+
74+ _columns = {
75+ 'sale_ids': fields.many2many('sale.order', 'sale_order_invoice_rel', 'invoice_id', 'order_id', 'Sale Orders')
76+ }
77+
78+account_invoice()
79
80=== removed file 'sale/product_view.xml'
81--- sale/product_view.xml 2008-12-18 19:54:16 +0000
82+++ sale/product_view.xml 1970-01-01 00:00:00 +0000
83@@ -1,7 +0,0 @@
84-<?xml version="1.0" encoding="utf-8"?>
85-<openerp>
86- <data>
87-
88-
89- </data>
90-</openerp>
91
92=== modified file 'sale/sale.py'
93--- sale/sale.py 2009-04-09 10:02:19 +0000
94+++ sale/sale.py 2009-04-29 09:59:22 +0000
95@@ -220,7 +220,7 @@
96 'project_id':fields.many2one('account.analytic.account', 'Analytic Account', readonly=True, states={'draft':[('readonly', False)]}),
97
98 'order_line': fields.one2many('sale.order.line', 'order_id', 'Order Lines', readonly=True, states={'draft':[('readonly',False)]}),
99- 'invoice_ids': fields.many2many('account.invoice', 'sale_order_invoice_rel', 'order_id', 'invoice_id', 'Invoice', help="This is the list of invoices that have been generated for this sale order. The same sale order may have been invoiced in several times (by line for example)."),
100+ 'invoice_ids': fields.many2many('account.invoice', 'sale_order_invoice_rel', 'order_id', 'invoice_id', 'Invoices', help="This is the list of invoices that have been generated for this sale order. The same sale order may have been invoiced in several times (by line for example)."),
101 'picking_ids': fields.one2many('stock.picking', 'sale_id', 'Related Packing', readonly=True, help="This is the list of picking list that have been generated for this invoice"),
102 'shipped':fields.boolean('Picked', readonly=True),
103 'picked_rate': fields.function(_picked_rate, method=True, string='Picked', type='float'),
104
105=== modified file 'sale/sale_view.xml'
106--- sale/sale_view.xml 2009-04-06 12:38:10 +0000
107+++ sale/sale_view.xml 2009-04-29 10:13:57 +0000
108@@ -210,11 +210,6 @@
109 <separator colspan="4" string="Notes"/>
110 <field colspan="4" name="note" nolabel="1"/>
111 </page>
112- <page string="History">
113- <separator colspan="4" string="Related invoices"/>
114- <field colspan="4" name="invoice_ids" nolabel="1"/>
115- <field colspan="4" name="picking_ids" nolabel="1"/>
116- </page>
117 </notebook>
118 </form>
119 </field>
120@@ -455,6 +450,11 @@
121
122 <act_window domain="[('product_id','=',active_id)]" id="action_order_line_product_tree" name="Product sales" res_model="sale.order.line" src_model="product.product"/>
123
124+ <act_window domain="[('sale_id','=',active_id)]" id="action_picking_from_sale" name="Packing" res_model="stock.picking" src_model="sale.order" view_mode="tree,form" view_type="form"/>
125+
126+ <act_window domain="[('sale_ids','in',[active_id])]" id="action_invoices_from_sale" name="Invoices" res_model="account.invoice" src_model="sale.order" view_mode="tree,form" view_type="form"/>
127+
128+
129 <!-- configartion view -->
130
131 <record id="view_config_picking_policy" model="ir.ui.view">