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
=== modified file 'purchase/purchase_view.xml'
--- purchase/purchase_view.xml 2009-03-10 07:12:13 +0000
+++ purchase/purchase_view.xml 2009-04-29 10:13:57 +0000
@@ -28,6 +28,8 @@
28 </graph>28 </graph>
29 </field>29 </field>
30 </record>30 </record>
31
32 <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"/>
3133
32 <record id="purchase_order_form" model="ir.ui.view">34 <record id="purchase_order_form" model="ir.ui.view">
33 <field name="name">purchase.order.form</field>35 <field name="name">purchase.order.form</field>
3436
=== modified file 'sale/__init__.py'
--- sale/__init__.py 2009-01-04 22:12:50 +0000
+++ sale/__init__.py 2009-04-29 10:13:57 +0000
@@ -27,6 +27,7 @@
27import sale27import sale
28import stock28import stock
29import product29import product
30import invoice
3031
31import wizard32import wizard
32import report33import report
3334
=== modified file 'sale/__terp__.py'
--- sale/__terp__.py 2009-02-03 17:02:20 +0000
+++ sale/__terp__.py 2009-04-29 09:32:01 +0000
@@ -56,8 +56,7 @@
56 'sale_report.xml',56 'sale_report.xml',
57 'sale_wizard.xml',57 'sale_wizard.xml',
58 'stock_view.xml',58 'stock_view.xml',
59 'process/sale_process.xml',59 'process/sale_process.xml'
60 'product_view.xml'
61 ],60 ],
62 'demo_xml': ['sale_demo.xml'],61 'demo_xml': ['sale_demo.xml'],
63 'installable': True,62 'installable': True,
6463
=== added file 'sale/invoice.py'
--- sale/invoice.py 1970-01-01 00:00:00 +0000
+++ sale/invoice.py 2009-04-29 10:13:57 +0000
@@ -0,0 +1,35 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
6# $Id$
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21##############################################################################
22
23import time
24import netsvc
25from osv import fields, osv
26
27
28class account_invoice(osv.osv):
29 _inherit = "account.invoice"
30
31 _columns = {
32 'sale_ids': fields.many2many('sale.order', 'sale_order_invoice_rel', 'invoice_id', 'order_id', 'Sale Orders')
33 }
34
35account_invoice()
036
=== removed file 'sale/product_view.xml'
--- sale/product_view.xml 2008-12-18 19:54:16 +0000
+++ sale/product_view.xml 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4
5
6 </data>
7</openerp>
80
=== modified file 'sale/sale.py'
--- sale/sale.py 2009-04-09 10:02:19 +0000
+++ sale/sale.py 2009-04-29 09:59:22 +0000
@@ -220,7 +220,7 @@
220 'project_id':fields.many2one('account.analytic.account', 'Analytic Account', readonly=True, states={'draft':[('readonly', False)]}),220 'project_id':fields.many2one('account.analytic.account', 'Analytic Account', readonly=True, states={'draft':[('readonly', False)]}),
221221
222 'order_line': fields.one2many('sale.order.line', 'order_id', 'Order Lines', readonly=True, states={'draft':[('readonly',False)]}),222 'order_line': fields.one2many('sale.order.line', 'order_id', 'Order Lines', readonly=True, states={'draft':[('readonly',False)]}),
223 '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)."),223 '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)."),
224 '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"),224 '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"),
225 'shipped':fields.boolean('Picked', readonly=True),225 'shipped':fields.boolean('Picked', readonly=True),
226 'picked_rate': fields.function(_picked_rate, method=True, string='Picked', type='float'),226 'picked_rate': fields.function(_picked_rate, method=True, string='Picked', type='float'),
227227
=== modified file 'sale/sale_view.xml'
--- sale/sale_view.xml 2009-04-06 12:38:10 +0000
+++ sale/sale_view.xml 2009-04-29 10:13:57 +0000
@@ -210,11 +210,6 @@
210 <separator colspan="4" string="Notes"/>210 <separator colspan="4" string="Notes"/>
211 <field colspan="4" name="note" nolabel="1"/>211 <field colspan="4" name="note" nolabel="1"/>
212 </page>212 </page>
213 <page string="History">
214 <separator colspan="4" string="Related invoices"/>
215 <field colspan="4" name="invoice_ids" nolabel="1"/>
216 <field colspan="4" name="picking_ids" nolabel="1"/>
217 </page>
218 </notebook>213 </notebook>
219 </form>214 </form>
220 </field>215 </field>
@@ -455,6 +450,11 @@
455450
456 <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"/>451 <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"/>
457452
453 <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"/>
454
455 <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"/>
456
457
458 <!-- configartion view -->458 <!-- configartion view -->
459459
460 <record id="view_config_picking_policy" model="ir.ui.view">460 <record id="view_config_picking_policy" model="ir.ui.view">