Merge lp:~therp-nl/therp-addons/7.0-port_fetchmail_invoice into lp:~therp-nl/therp-addons/7.0

Proposed by Stefan Rijnhart (Opener)
Status: Merged
Merged at revision: 81
Proposed branch: lp:~therp-nl/therp-addons/7.0-port_fetchmail_invoice
Merge into: lp:~therp-nl/therp-addons/7.0
Diff against target: 126 lines (+16/-42)
5 files modified
fetchmail_invoice/__openerp__.py (+4/-3)
fetchmail_invoice/data/installer.xml (+2/-2)
fetchmail_invoice/data/partner_data.xml (+3/-8)
fetchmail_invoice/model/fetchmail_invoice.py (+7/-7)
fetchmail_invoice/view/invoice.xml (+0/-22)
To merge this branch: bzr merge lp:~therp-nl/therp-addons/7.0-port_fetchmail_invoice
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) code review Approve
Review via email: mp+176369@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Holger Brunn (Therp) (hbrunn) :
review: Approve (code review)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'fetchmail_invoice/__openerp__.py'
2--- fetchmail_invoice/__openerp__.py 2012-12-28 14:10:30 +0000
3+++ fetchmail_invoice/__openerp__.py 2013-07-23 12:28:23 +0000
4@@ -35,17 +35,18 @@
5 The actual emails can be inspected on a dedicated tab on the invoice
6 form which is otherwise invisible.
7
8-This module is compatible with OpenERP 6.1
9+This module is compatible with OpenERP 7.0.
10+
11+Known issues: not safe for use within a multicompany database.
12 """,
13 "depends": [
14 'fetchmail',
15 'account'
16 ],
17 "data": [
18- 'view/invoice.xml',
19 'data/partner_data.xml',
20 'data/installer.xml',
21 ],
22- 'installable': False,
23+ 'installable': True,
24 }
25 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
26
27=== modified file 'fetchmail_invoice/data/installer.xml'
28--- fetchmail_invoice/data/installer.xml 2012-07-27 15:17:16 +0000
29+++ fetchmail_invoice/data/installer.xml 2013-07-23 12:28:23 +0000
30@@ -15,9 +15,9 @@
31 </field>
32 </record>
33
34- <record model="ir.actions.todo" id="config_wizard_action_link_invoice_to_email_account">
35+ <record model="ir.actions.todo" id="base.open_menu">
36 <field name="action_id" ref="action_link_invoice_to_email_account" />
37- <field name="category_id" ref="account.category_accounting_configuration" />
38+ <field name="state">open</field>
39 </record>
40 </data>
41 </openerp>
42
43=== modified file 'fetchmail_invoice/data/partner_data.xml'
44--- fetchmail_invoice/data/partner_data.xml 2012-07-27 15:17:16 +0000
45+++ fetchmail_invoice/data/partner_data.xml 2013-07-23 12:28:23 +0000
46@@ -3,14 +3,9 @@
47 <data noupdate="1">
48 <record id="default_partner" model="res.partner">
49 <field name="name">Default partner for incoming invoices by email</field>
50- <field name="address" eval="[]"/>
51 <field name="company_id" ref="base.main_company"/>
52 <field name="customer" eval="False"/>
53- </record>
54- <record id="default_partner_address" model="res.partner.address">
55- <field name="partner_id" ref="default_partner"/>
56- <field name="type">default</field>
57- <field name="company_id" ref="base.main_company"/>
58- </record>
59- </data>
60+ <field name="is_company" eval="False"/>
61+ </record>
62+ </data>
63 </openerp>
64
65=== modified file 'fetchmail_invoice/model/fetchmail_invoice.py'
66--- fetchmail_invoice/model/fetchmail_invoice.py 2012-07-27 15:17:16 +0000
67+++ fetchmail_invoice/model/fetchmail_invoice.py 2013-07-23 12:28:23 +0000
68@@ -19,12 +19,12 @@
69 #
70 ##############################################################################
71 import base64
72-from osv import osv, fields
73+from openerp.osv import orm, fields
74 from tools.translate import _
75
76-class account_invoice(osv.osv):
77+class account_invoice(orm.Model):
78 _name = 'account.invoice'
79- _inherit = ['mail.thread', 'account.invoice']
80+ _inherit = 'account.invoice'
81
82 def message_new(
83 self, cr, uid, msg_dict, custom_values=None, context=None):
84@@ -63,10 +63,10 @@
85 # Retrieve partner_id from the email address
86 # and add related field values
87 custom_values['partner_id'] = (
88- self.message_partner_by_email(
89- cr, uid, email_from, context=None)['partner_id']
90- or data_pool.get_object_reference(
91- cr, uid, 'fetchmail_invoice', 'default_partner')[1])
92+ msg_dict.get(
93+ 'author_id',
94+ data_pool.get_object_reference(
95+ cr, uid, 'fetchmail_invoice', 'default_partner')[1]))
96 custom_values.update(
97 self.onchange_partner_id(
98 cr, uid, [], 'in_invoice',
99
100=== removed file 'fetchmail_invoice/view/invoice.xml'
101--- fetchmail_invoice/view/invoice.xml 2012-07-27 15:17:16 +0000
102+++ fetchmail_invoice/view/invoice.xml 1970-01-01 00:00:00 +0000
103@@ -1,22 +0,0 @@
104-<?xml version="1.0" encoding="utf-8"?>
105-<openerp>
106- <data>
107- <record id="invoice_supplier_form" model="ir.ui.view">
108- <field name="name">account.invoice.supplier.form</field>
109- <field name="model">account.invoice</field>
110- <field name="inherit_id" ref="account.invoice_supplier_form"/>
111- <field name="arch" type="xml">
112- <page string="Payments" position="after">
113- <page string="Emails" attrs="{
114- 'invisible': [('message_ids', '=', False)]
115- }">
116- <field name="message_ids" nolabel="1" colspan="4"/>
117- </page>
118- </page>
119- </field>
120- </record>
121- </data>
122-</openerp>
123-
124-
125-
126\ No newline at end of file

Subscribers

People subscribed via source and target branches

to all changes: