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
=== modified file 'fetchmail_invoice/__openerp__.py'
--- fetchmail_invoice/__openerp__.py 2012-12-28 14:10:30 +0000
+++ fetchmail_invoice/__openerp__.py 2013-07-23 12:28:23 +0000
@@ -35,17 +35,18 @@
35The actual emails can be inspected on a dedicated tab on the invoice35The actual emails can be inspected on a dedicated tab on the invoice
36form which is otherwise invisible.36form which is otherwise invisible.
3737
38This module is compatible with OpenERP 6.138This module is compatible with OpenERP 7.0.
39
40Known issues: not safe for use within a multicompany database.
39""",41""",
40 "depends": [42 "depends": [
41 'fetchmail',43 'fetchmail',
42 'account'44 'account'
43 ],45 ],
44 "data": [46 "data": [
45 'view/invoice.xml',
46 'data/partner_data.xml',47 'data/partner_data.xml',
47 'data/installer.xml',48 'data/installer.xml',
48 ],49 ],
49 'installable': False,50 'installable': True,
50}51}
51# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:52# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
5253
=== modified file 'fetchmail_invoice/data/installer.xml'
--- fetchmail_invoice/data/installer.xml 2012-07-27 15:17:16 +0000
+++ fetchmail_invoice/data/installer.xml 2013-07-23 12:28:23 +0000
@@ -15,9 +15,9 @@
15 </field>15 </field>
16 </record>16 </record>
1717
18 <record model="ir.actions.todo" id="config_wizard_action_link_invoice_to_email_account">18 <record model="ir.actions.todo" id="base.open_menu">
19 <field name="action_id" ref="action_link_invoice_to_email_account" />19 <field name="action_id" ref="action_link_invoice_to_email_account" />
20 <field name="category_id" ref="account.category_accounting_configuration" />20 <field name="state">open</field>
21 </record>21 </record>
22 </data>22 </data>
23</openerp>23</openerp>
2424
=== modified file 'fetchmail_invoice/data/partner_data.xml'
--- fetchmail_invoice/data/partner_data.xml 2012-07-27 15:17:16 +0000
+++ fetchmail_invoice/data/partner_data.xml 2013-07-23 12:28:23 +0000
@@ -3,14 +3,9 @@
3 <data noupdate="1">3 <data noupdate="1">
4 <record id="default_partner" model="res.partner">4 <record id="default_partner" model="res.partner">
5 <field name="name">Default partner for incoming invoices by email</field>5 <field name="name">Default partner for incoming invoices by email</field>
6 <field name="address" eval="[]"/>
7 <field name="company_id" ref="base.main_company"/>6 <field name="company_id" ref="base.main_company"/>
8 <field name="customer" eval="False"/>7 <field name="customer" eval="False"/>
9 </record>8 <field name="is_company" eval="False"/>
10 <record id="default_partner_address" model="res.partner.address">9 </record>
11 <field name="partner_id" ref="default_partner"/>10 </data>
12 <field name="type">default</field>
13 <field name="company_id" ref="base.main_company"/>
14 </record>
15 </data>
16</openerp>11</openerp>
1712
=== modified file 'fetchmail_invoice/model/fetchmail_invoice.py'
--- fetchmail_invoice/model/fetchmail_invoice.py 2012-07-27 15:17:16 +0000
+++ fetchmail_invoice/model/fetchmail_invoice.py 2013-07-23 12:28:23 +0000
@@ -19,12 +19,12 @@
19#19#
20##############################################################################20##############################################################################
21import base6421import base64
22from osv import osv, fields22from openerp.osv import orm, fields
23from tools.translate import _23from tools.translate import _
2424
25class account_invoice(osv.osv):25class account_invoice(orm.Model):
26 _name = 'account.invoice'26 _name = 'account.invoice'
27 _inherit = ['mail.thread', 'account.invoice']27 _inherit = 'account.invoice'
2828
29 def message_new(29 def message_new(
30 self, cr, uid, msg_dict, custom_values=None, context=None):30 self, cr, uid, msg_dict, custom_values=None, context=None):
@@ -63,10 +63,10 @@
63 # Retrieve partner_id from the email address63 # Retrieve partner_id from the email address
64 # and add related field values64 # and add related field values
65 custom_values['partner_id'] = (65 custom_values['partner_id'] = (
66 self.message_partner_by_email(66 msg_dict.get(
67 cr, uid, email_from, context=None)['partner_id']67 'author_id',
68 or data_pool.get_object_reference(68 data_pool.get_object_reference(
69 cr, uid, 'fetchmail_invoice', 'default_partner')[1])69 cr, uid, 'fetchmail_invoice', 'default_partner')[1]))
70 custom_values.update(70 custom_values.update(
71 self.onchange_partner_id(71 self.onchange_partner_id(
72 cr, uid, [], 'in_invoice',72 cr, uid, [], 'in_invoice',
7373
=== removed file 'fetchmail_invoice/view/invoice.xml'
--- fetchmail_invoice/view/invoice.xml 2012-07-27 15:17:16 +0000
+++ fetchmail_invoice/view/invoice.xml 1970-01-01 00:00:00 +0000
@@ -1,22 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4 <record id="invoice_supplier_form" model="ir.ui.view">
5 <field name="name">account.invoice.supplier.form</field>
6 <field name="model">account.invoice</field>
7 <field name="inherit_id" ref="account.invoice_supplier_form"/>
8 <field name="arch" type="xml">
9 <page string="Payments" position="after">
10 <page string="Emails" attrs="{
11 'invisible': [('message_ids', '=', False)]
12 }">
13 <field name="message_ids" nolabel="1" colspan="4"/>
14 </page>
15 </page>
16 </field>
17 </record>
18 </data>
19</openerp>
20
21
22
23\ No newline at end of file0\ No newline at end of file

Subscribers

People subscribed via source and target branches

to all changes: