Merge lp:~openerp-dev/openobject-addons/7.0-opw-595349-fka into lp:openobject-addons/7.0

Proposed by Foram Katharotiya (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-opw-595349-fka
Merge into: lp:openobject-addons/7.0
Diff against target: 52 lines (+15/-3)
2 files modified
l10n_be_invoice_bba/account_invoice_view.xml (+12/-0)
l10n_be_invoice_bba/invoice.py (+3/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-595349-fka
Reviewer Review Type Date Requested Status
Vinay Rana (OpenERP) Pending
OpenERP Core Team Pending
Review via email: mp+178719@code.launchpad.net

Description of the change

Hello,

I have fixed the issue of BBA structured communication.I have removed bbc error from supplier invoice.
Step to Reproduce:
- Create purchase order then confirm it.
- Click on recieve invoice.
- Set 'BBA structured communication' in communication type, save it.

Thanks,
FKA

To post a comment you must log in.

Unmerged revisions

9349. By Foram Katharotiya (OpenERP)

[IMP] remove BBA erroe when we validate supplier invoice

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'l10n_be_invoice_bba/account_invoice_view.xml'
2--- l10n_be_invoice_bba/account_invoice_view.xml 2012-11-29 22:26:45 +0000
3+++ l10n_be_invoice_bba/account_invoice_view.xml 2013-08-06 11:17:25 +0000
4@@ -16,5 +16,17 @@
5 </field>
6 </record>
7
8+ <!-- Adapt supplier Invoices to support bba structured communication -->
9+ <record id="supplier_invoice_bbacomm_form" model="ir.ui.view">
10+ <field name="name">account.invoice.form.inherit</field>
11+ <field name="model">account.invoice</field>
12+ <field name="inherit_id" ref="account.invoice_supplier_form"/>
13+ <field name="arch" type="xml">
14+ <field name="reference_type" position="attributes">
15+ <attribute name="on_change">generate_bbacomm(type,reference_type, partner_id,reference, context)</attribute>
16+ </field>
17+ </field>
18+ </record>
19+
20 </data>
21 </openerp>
22
23=== modified file 'l10n_be_invoice_bba/invoice.py'
24--- l10n_be_invoice_bba/invoice.py 2013-08-05 15:37:13 +0000
25+++ l10n_be_invoice_bba/invoice.py 2013-08-06 11:17:25 +0000
26@@ -72,7 +72,7 @@
27 reference = False
28 reference_type = 'none'
29 if partner_id:
30- if (type == 'out_invoice'):
31+ if (type in ['out_invoice','in_invoice']):
32 reference_type = self.pool.get('res.partner').browse(cr, uid, partner_id).out_inv_comm_type
33 if reference_type:
34 reference = self.generate_bbacomm(cr, uid, ids, type, reference_type, partner_id, '', context={})['value']['reference']
35@@ -90,7 +90,7 @@
36 if partner_id:
37 algorithm = partner_obj.browse(cr, uid, partner_id, context=context).out_inv_comm_algorithm
38 algorithm = algorithm or 'random'
39- if (type == 'out_invoice'):
40+ if (type in ['out_invoice','in_invoice']):
41 if reference_type == 'bba':
42 if algorithm == 'date':
43 if not self.check_bbacomm(reference):
44@@ -210,7 +210,7 @@
45 def copy(self, cr, uid, id, default=None, context=None):
46 default = default or {}
47 invoice = self.browse(cr, uid, id, context=context)
48- if invoice.type in ['out_invoice']:
49+ if invoice.type in ['out_invoice' 'in_invoice']:
50 reference_type = invoice.reference_type or 'none'
51 default['reference_type'] = reference_type
52 if reference_type == 'bba':