Merge lp:~camptocamp/account-invoice-report/account-invoice-report-fix-supplier-view into lp:~account-core-editors/account-invoice-report/7.0

Proposed by Nicolas Bessi - Camptocamp
Status: Merged
Merge reported by: Joël Grand-Guillaume @ camptocamp
Merged at revision: not available
Proposed branch: lp:~camptocamp/account-invoice-report/account-invoice-report-fix-supplier-view
Merge into: lp:~account-core-editors/account-invoice-report/7.0
Diff against target: 68 lines (+43/-1)
3 files modified
invoice_webkit/__init__.py (+2/-1)
invoice_webkit/product.py (+30/-0)
invoice_webkit/view/invoice_view.xml (+11/-0)
To merge this branch: bzr merge lp:~camptocamp/account-invoice-report/account-invoice-report-fix-supplier-view
Reviewer Review Type Date Requested Status
Alexandre Fayolle - camptocamp code review, no test Approve
Review via email: mp+145836@code.launchpad.net

Description of the change

Add form view in supplier invoice line

To post a comment you must log in.
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

There seem to be 2 changes in the patch : one adding the form and the other one adding the purchase_ok field (workaround for a bug). Is this intended?

review: Needs Information (code review, no test)
Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote :

Hello,

It is explicitly written in class doc string.

Regards

Nicolas

Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) :
review: Approve (code review, no test)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'invoice_webkit/__init__.py'
2--- invoice_webkit/__init__.py 2013-01-24 15:28:47 +0000
3+++ invoice_webkit/__init__.py 2013-01-31 13:12:32 +0000
4@@ -19,4 +19,5 @@
5 #
6 ##############################################################################
7 from . import invoice
8-from . import report
9\ No newline at end of file
10+from . import report
11+from . import product
12
13=== added file 'invoice_webkit/product.py'
14--- invoice_webkit/product.py 1970-01-01 00:00:00 +0000
15+++ invoice_webkit/product.py 2013-01-31 13:12:32 +0000
16@@ -0,0 +1,30 @@
17+# -*- coding: utf-8 -*-
18+##############################################################################
19+#
20+# Copyright (c) 2011 Camptocamp SA (http://www.camptocamp.com)
21+# @author Guewen Baconnier, Bessi Nicolas, Vincent Renaville
22+#
23+# This program is free software: you can redistribute it and/or modify
24+# it under the terms of the GNU Affero General Public License as
25+# published by the Free Software Foundation, either version 3 of the
26+# License, or (at your option) any later version.
27+#
28+# This program is distributed in the hope that it will be useful,
29+# but WITHOUT ANY WARRANTY; without even the implied warranty of
30+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31+# GNU Affero General Public License for more details.
32+#
33+# You should have received a copy of the GNU Affero General Public License
34+# along with this program. If not, see <http://www.gnu.org/licenses/>.
35+#
36+##############################################################################
37+from openerp.osv import orm, fields
38+
39+
40+class ProductTemplate(orm.Model):
41+ """TMP fix of bug 1111430"""
42+ _inherit = 'product.template'
43+
44+ _columns = {'purchase_ok': fields.boolean('Can be Purchased',
45+ help=("Specify if the product can be selected"
46+ " in a purchase order line."))}
47
48=== modified file 'invoice_webkit/view/invoice_view.xml'
49--- invoice_webkit/view/invoice_view.xml 2013-01-18 11:56:01 +0000
50+++ invoice_webkit/view/invoice_view.xml 2013-01-31 13:12:32 +0000
51@@ -75,6 +75,17 @@
52 </field>
53 </record>
54
55+ <record model="ir.ui.view" id="invoice_form_add_notes_in_invoice_line_1b">
56+ <field name="name">account.invoice.form.add.supplier.notes</field>
57+ <field name="model">account.invoice</field>
58+ <field name="inherit_id" ref="account.invoice_supplier_form"/>
59+ <field name="arch" type="xml">
60+ <xpath expr="//field[@name='invoice_line']/tree" position="attributes" >
61+ <attribute name="editable" eval="False"/>
62+ </xpath>
63+ </field>
64+ </record>
65+
66 <record model="ir.ui.view" id="invoice_form_add_notes_in_invoice_line_2">
67 <field name="name">account.invoice.form.add.notes</field>
68 <field name="model">account.invoice.line</field>

Subscribers

People subscribed via source and target branches