Merge lp:~openbig/bigconsulting/improvement_changes_milestone1 into lp:bigconsulting
- improvement_changes_milestone1
- Merge into addons
Proposed by
gpa(OpenERP)
Status: | Superseded |
---|---|
Proposed branch: | lp:~openbig/bigconsulting/improvement_changes_milestone1 |
Merge into: | lp:bigconsulting |
Diff against target: |
615 lines (+271/-80) 4 files modified
account_invoice_cash_discount/account_invoice_cash_discount.py (+82/-10) account_invoice_cash_discount/account_invoice_cash_discount_view.xml (+17/-0) account_invoice_cash_discount/wizard/account_pay_invoice.py (+158/-69) account_invoice_cash_discount/wizard/account_pay_invoice_view.xml (+14/-1) |
To merge this branch: | bzr merge lp:~openbig/bigconsulting/improvement_changes_milestone1 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
openbig | Pending | ||
Review via email: mp+29283@code.launchpad.net |
This proposal supersedes a proposal from 2010-07-06.
This proposal has been superseded by a proposal from 2010-07-06.
Commit message
Description of the change
added new changes in milestone1
To post a comment you must log in.
- 47. By gpa(OpenERP)
-
changes in wocheck context
Unmerged revisions
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'account_invoice_cash_discount/account_invoice_cash_discount.py' | |||
2 | --- account_invoice_cash_discount/account_invoice_cash_discount.py 2010-07-01 14:49:31 +0000 | |||
3 | +++ account_invoice_cash_discount/account_invoice_cash_discount.py 2010-07-06 13:37:26 +0000 | |||
4 | @@ -44,17 +44,88 @@ | |||
5 | 44 | 'payment_id': fields.many2one('account.payment.term','Associated Payment Term'), | 44 | 'payment_id': fields.many2one('account.payment.term','Associated Payment Term'), |
6 | 45 | 'credit_account_id': fields.many2one('account.account', 'Credit Account'), | 45 | 'credit_account_id': fields.many2one('account.account', 'Credit Account'), |
7 | 46 | 'debit_account_id': fields.many2one('account.account', 'Debit Account'), | 46 | 'debit_account_id': fields.many2one('account.account', 'Debit Account'), |
8 | 47 | 'payment_term_ids': fields.one2many('account.payment.term.line', 'cash_account_discount_id', 'Payment Term Lines'), | ||
9 | 47 | } | 48 | } |
10 | 48 | account_cash_discount() | 49 | account_cash_discount() |
11 | 49 | 50 | ||
12 | 51 | class account_payment_term_line(osv.osv): | ||
13 | 52 | _inherit = "account.payment.term.line" | ||
14 | 53 | _columns = { | ||
15 | 54 | 'cash_account_discount_id': fields.many2one('account.cash.discount', 'Discount Lines',), | ||
16 | 55 | 'payment_id': fields.many2one('account.payment.term', 'Payment Term', required=False, select=True), | ||
17 | 56 | 'compl_cash_discount':fields.boolean('Use Complete Cash Discount'), | ||
18 | 57 | } | ||
19 | 58 | account_payment_term_line() | ||
20 | 59 | |||
21 | 50 | class account_invoice(osv.osv): | 60 | class account_invoice(osv.osv): |
22 | 51 | _inherit = "account.invoice" | 61 | _inherit = "account.invoice" |
23 | 52 | 62 | ||
24 | 63 | def _get_amount(self, cr, uid, ids, resudial_amonut, payment_term, context=None): | ||
25 | 64 | |||
26 | 65 | """ | ||
27 | 66 | This function return the Amount to paid according to the payment term cash discount payment term lines | ||
28 | 67 | """ | ||
29 | 68 | |||
30 | 69 | if context is None: | ||
31 | 70 | context = {} | ||
32 | 71 | |||
33 | 72 | tax_obj = self.pool.get('account.tax') | ||
34 | 73 | invoice = self.browse(cr, uid, ids[0], context=context) | ||
35 | 74 | |||
36 | 75 | if invoice.date_invoice: | ||
37 | 76 | date1 = invoice.date_invoice | ||
38 | 77 | else: | ||
39 | 78 | date1 = time.strftime('%Y-%m-%d') | ||
40 | 79 | |||
41 | 80 | if 'date_p' in context and context['date_p']: | ||
42 | 81 | date2 = context['date_p'] | ||
43 | 82 | else: | ||
44 | 83 | date2 = time.strftime('%Y-%m-%d') | ||
45 | 84 | |||
46 | 85 | if date1 >= date2: | ||
47 | 86 | from_dt = time.mktime(time.strptime(date1,'%Y-%m-%d')) | ||
48 | 87 | to_dt = time.mktime(time.strptime(date2,'%Y-%m-%d')) | ||
49 | 88 | diff_day = (from_dt-to_dt)/(3600*24) | ||
50 | 89 | else: | ||
51 | 90 | from_dt = time.mktime(time.strptime(date2,'%Y-%m-%d')) | ||
52 | 91 | to_dt = time.mktime(time.strptime(date1,'%Y-%m-%d')) | ||
53 | 92 | diff_day = (from_dt-to_dt)/(3600*24) | ||
54 | 93 | |||
55 | 94 | discount = 0.0 | ||
56 | 95 | amount = 0.0 | ||
57 | 96 | payment_line_found = False | ||
58 | 97 | if payment_term: | ||
59 | 98 | payment_term_lines = self.pool.get('account.payment.term').browse(cr, uid, payment_term, context=context) | ||
60 | 99 | for payment_term_line_id in payment_term_lines.line_ids: | ||
61 | 100 | payment_use_complete = payment_term_line_id.compl_cash_discount | ||
62 | 101 | if payment_use_complete: | ||
63 | 102 | if payment_term_lines.cash_discount_ids: | ||
64 | 103 | dis = 0 | ||
65 | 104 | for discount_line in payment_term_lines.cash_discount_ids: | ||
66 | 105 | if diff_day >= dis and diff_day <= discount_line.delay: | ||
67 | 106 | if resudial_amonut: | ||
68 | 107 | dis1 = 0 | ||
69 | 108 | if discount_line.payment_term_ids: | ||
70 | 109 | payment_line_found = True | ||
71 | 110 | for dis_payment_id in discount_line.payment_term_ids: | ||
72 | 111 | if diff_day >= dis1 and diff_day<= dis_payment_id.days: | ||
73 | 112 | if dis_payment_id.value == 'procent': | ||
74 | 113 | amount = resudial_amonut * dis_payment_id.value_amount | ||
75 | 114 | elif dis_payment_id.value == 'fixed': | ||
76 | 115 | amount = dis_payment_id.value_amount | ||
77 | 116 | else: | ||
78 | 117 | amount = resudial_amonut | ||
79 | 118 | dis1 = dis_payment_id.days | ||
80 | 119 | dis = discount_line.delay | ||
81 | 120 | else: | ||
82 | 121 | amount = resudial_amonut | ||
83 | 122 | |||
84 | 123 | return {'amount':amount,'found':payment_line_found} | ||
85 | 124 | |||
86 | 53 | def _get_payment(self, cr, uid, ids, resudial_amonut, payment_term, context=None): | 125 | def _get_payment(self, cr, uid, ids, resudial_amonut, payment_term, context=None): |
87 | 54 | """ | 126 | """ |
88 | 55 | This function return the Discount according to the payment term cash discount term | 127 | This function return the Discount according to the payment term cash discount term |
89 | 56 | """ | 128 | """ |
90 | 57 | |||
91 | 58 | if context is None: | 129 | if context is None: |
92 | 59 | context = {} | 130 | context = {} |
93 | 60 | 131 | ||
94 | @@ -79,6 +150,7 @@ | |||
95 | 79 | from_dt = time.mktime(time.strptime(date2,'%Y-%m-%d')) | 150 | from_dt = time.mktime(time.strptime(date2,'%Y-%m-%d')) |
96 | 80 | to_dt = time.mktime(time.strptime(date1,'%Y-%m-%d')) | 151 | to_dt = time.mktime(time.strptime(date1,'%Y-%m-%d')) |
97 | 81 | diff_day = (from_dt-to_dt)/(3600*24) | 152 | diff_day = (from_dt-to_dt)/(3600*24) |
98 | 153 | |||
99 | 82 | discount = 0.0 | 154 | discount = 0.0 |
100 | 83 | if payment_term: | 155 | if payment_term: |
101 | 84 | payment_term_lines = self.pool.get('account.payment.term').browse(cr, uid, payment_term, context=context) | 156 | payment_term_lines = self.pool.get('account.payment.term').browse(cr, uid, payment_term, context=context) |
102 | @@ -92,7 +164,7 @@ | |||
103 | 92 | discount = res | 164 | discount = res |
104 | 93 | dis = discount_line.delay | 165 | dis = discount_line.delay |
105 | 94 | return discount | 166 | return discount |
107 | 95 | 167 | ||
108 | 96 | def _get_account(self, cr, uid, ids, resudial_amonut, payment_term, context=None): | 168 | def _get_account(self, cr, uid, ids, resudial_amonut, payment_term, context=None): |
109 | 97 | """ | 169 | """ |
110 | 98 | This function return the Account according to the payment term cash discount term | 170 | This function return the Account according to the payment term cash discount term |
111 | @@ -136,6 +208,7 @@ | |||
112 | 136 | return account_id | 208 | return account_id |
113 | 137 | 209 | ||
114 | 138 | def pay_and_reconcile(self, cr, uid, ids, pay_amount, pay_account_id, period_id, pay_journal_id, writeoff_acc_id, writeoff_period_id, writeoff_journal_id, context=None, name=''): | 210 | def pay_and_reconcile(self, cr, uid, ids, pay_amount, pay_account_id, period_id, pay_journal_id, writeoff_acc_id, writeoff_period_id, writeoff_journal_id, context=None, name=''): |
115 | 211 | |||
116 | 139 | if context is None: | 212 | if context is None: |
117 | 140 | context = {} | 213 | context = {} |
118 | 141 | #TODO check if we can use different period for payment and the writeoff line | 214 | #TODO check if we can use different period for payment and the writeoff line |
119 | @@ -222,7 +295,7 @@ | |||
120 | 222 | if 'tax_move_ids' in context and context['tax_move_ids']: | 295 | if 'tax_move_ids' in context and context['tax_move_ids']: |
121 | 223 | move_line = context['tax_move_ids'] | 296 | move_line = context['tax_move_ids'] |
122 | 224 | for move_line_id in move_line: | 297 | for move_line_id in move_line: |
124 | 225 | move_line_data = self.pool.get('account.move.line').browse(cr, uid,move_line_id) | 298 | move_line_data = move_line_obj.browse(cr, uid,move_line_id) |
125 | 226 | l3 = { | 299 | l3 = { |
126 | 227 | 'debit': move_line_data.debit, | 300 | 'debit': move_line_data.debit, |
127 | 228 | 'credit': move_line_data.credit, | 301 | 'credit': move_line_data.credit, |
128 | @@ -237,8 +310,8 @@ | |||
129 | 237 | 'tax_amount':move_line_data.tax_amount, | 310 | 'tax_amount':move_line_data.tax_amount, |
130 | 238 | } | 311 | } |
131 | 239 | lines.append((0, 0, l3)) | 312 | lines.append((0, 0, l3)) |
134 | 240 | self.pool.get('account.move.line').unlink(cr, uid,[move_line_id]) | 313 | move_line_obj.unlink(cr, uid,[move_line_id]) |
135 | 241 | self.pool.get('account.move').unlink(cr, uid,[move_line_data.move_id.id]) | 314 | move_obj.unlink(cr, uid,[move_line_data.move_id.id]) |
136 | 242 | else: | 315 | else: |
137 | 243 | if amount_discount>0.0: | 316 | if amount_discount>0.0: |
138 | 244 | for line in invoice.invoice_line: | 317 | for line in invoice.invoice_line: |
139 | @@ -267,8 +340,8 @@ | |||
140 | 267 | 340 | ||
141 | 268 | if 'discount_move_ids' in context and context['discount_move_ids']: | 341 | if 'discount_move_ids' in context and context['discount_move_ids']: |
142 | 269 | dis_move_id = context['discount_move_ids'][0] | 342 | dis_move_id = context['discount_move_ids'][0] |
145 | 270 | move_id = self.pool.get('account.move.line').search(cr, uid,[('move_id','=',dis_move_id)]) | 343 | move_id = move_line_obj.search(cr, uid,[('move_id','=',dis_move_id)]) |
146 | 271 | move_line_data = self.pool.get('account.move.line').browse(cr, uid, move_id[0]) | 344 | move_line_data = move_line_obj.browse(cr, uid, move_id[0]) |
147 | 272 | l4 = { | 345 | l4 = { |
148 | 273 | 'debit': move_line_data.debit, | 346 | 'debit': move_line_data.debit, |
149 | 274 | 'credit':move_line_data.credit, | 347 | 'credit':move_line_data.credit, |
150 | @@ -282,7 +355,7 @@ | |||
151 | 282 | } | 355 | } |
152 | 283 | lines.append((0, 0, l4)) | 356 | lines.append((0, 0, l4)) |
153 | 284 | 357 | ||
155 | 285 | self.pool.get('account.move').unlink(cr, uid, context['discount_move_ids']) | 358 | move_obj.unlink(cr, uid, context['discount_move_ids']) |
156 | 286 | else: | 359 | else: |
157 | 287 | if amount_discount>0: | 360 | if amount_discount>0: |
158 | 288 | if 'account_id' in context and context['account_id']: | 361 | if 'account_id' in context and context['account_id']: |
159 | @@ -305,7 +378,7 @@ | |||
160 | 305 | lines.append((0, 0, l4)) | 378 | lines.append((0, 0, l4)) |
161 | 306 | 379 | ||
162 | 307 | move = {'ref': ref, 'line_id': lines, 'journal_id': pay_journal_id, 'period_id': period_id, 'date': date} | 380 | move = {'ref': ref, 'line_id': lines, 'journal_id': pay_journal_id, 'period_id': period_id, 'date': date} |
164 | 308 | move_id = self.pool.get('account.move').create(cr, uid, move, context=context) | 381 | move_id = move_obj.create(cr, uid, move, context=context) |
165 | 309 | 382 | ||
166 | 310 | line_ids = [] | 383 | line_ids = [] |
167 | 311 | total = 0.0 | 384 | total = 0.0 |
168 | @@ -317,7 +390,6 @@ | |||
169 | 317 | if l.account_id.id==src_account_id: | 390 | if l.account_id.id==src_account_id: |
170 | 318 | line_ids.append(l.id) | 391 | line_ids.append(l.id) |
171 | 319 | total += (l.debit or 0.0) - (l.credit or 0.0) | 392 | total += (l.debit or 0.0) - (l.credit or 0.0) |
172 | 320 | |||
173 | 321 | if (not round(total,int(config['price_accuracy']))) or writeoff_acc_id: | 393 | if (not round(total,int(config['price_accuracy']))) or writeoff_acc_id: |
174 | 322 | self.pool.get('account.move.line').reconcile(cr, uid, line_ids, 'manual', writeoff_acc_id, writeoff_period_id, writeoff_journal_id, context) | 394 | self.pool.get('account.move.line').reconcile(cr, uid, line_ids, 'manual', writeoff_acc_id, writeoff_period_id, writeoff_journal_id, context) |
175 | 323 | else: | 395 | else: |
176 | 324 | 396 | ||
177 | === modified file 'account_invoice_cash_discount/account_invoice_cash_discount_view.xml' | |||
178 | --- account_invoice_cash_discount/account_invoice_cash_discount_view.xml 2010-06-29 13:22:59 +0000 | |||
179 | +++ account_invoice_cash_discount/account_invoice_cash_discount_view.xml 2010-07-06 13:37:26 +0000 | |||
180 | @@ -15,6 +15,10 @@ | |||
181 | 15 | <field name="delay" select="1"/> | 15 | <field name="delay" select="1"/> |
182 | 16 | <field name="discount" select="1"/> | 16 | <field name="discount" select="1"/> |
183 | 17 | <field name="discount_account_id" /> | 17 | <field name="discount_account_id" /> |
184 | 18 | <group colspan="4"> | ||
185 | 19 | <separator string="Related Payment Terms Lines" colspan="4"/> | ||
186 | 20 | <field name="payment_term_ids" widget="one2many_list" nolabel="1"/> | ||
187 | 21 | </group> | ||
188 | 18 | </form> | 22 | </form> |
189 | 19 | </field> | 23 | </field> |
190 | 20 | </record> | 24 | </record> |
191 | @@ -84,6 +88,19 @@ | |||
192 | 84 | </xpath> | 88 | </xpath> |
193 | 85 | </field> | 89 | </field> |
194 | 86 | </record> | 90 | </record> |
195 | 91 | |||
196 | 92 | <record id="account_payment_term_line_view1" model="ir.ui.view"> | ||
197 | 93 | <field name="name">account.payment.term.line.form</field> | ||
198 | 94 | <field name="model">account.payment.term.line</field> | ||
199 | 95 | <field name="type">form</field> | ||
200 | 96 | <field name="inherit_id" ref="account.view_payment_term_line_form"/> | ||
201 | 97 | <field name="arch" type="xml"> | ||
202 | 98 | <field name="days2" position="after"> | ||
203 | 99 | <label string="" colspan="2"/> | ||
204 | 100 | <field name="compl_cash_discount"/> | ||
205 | 101 | </field> | ||
206 | 102 | </field> | ||
207 | 103 | </record> | ||
208 | 87 | 104 | ||
209 | 88 | </data> | 105 | </data> |
210 | 89 | </openerp> | 106 | </openerp> |
211 | 90 | 107 | ||
212 | === modified file 'account_invoice_cash_discount/wizard/account_pay_invoice.py' | |||
213 | --- account_invoice_cash_discount/wizard/account_pay_invoice.py 2010-07-01 14:49:31 +0000 | |||
214 | +++ account_invoice_cash_discount/wizard/account_pay_invoice.py 2010-07-06 13:37:26 +0000 | |||
215 | @@ -22,7 +22,6 @@ | |||
216 | 22 | from lxml import etree | 22 | from lxml import etree |
217 | 23 | from osv import fields, osv | 23 | from osv import fields, osv |
218 | 24 | from tools.translate import _ | 24 | from tools.translate import _ |
219 | 25 | #import decimal_precision as dp | ||
220 | 26 | 25 | ||
221 | 27 | class account_invoice_pay_writeoff(osv.osv_memory): | 26 | class account_invoice_pay_writeoff(osv.osv_memory): |
222 | 28 | """ | 27 | """ |
223 | @@ -41,6 +40,7 @@ | |||
224 | 41 | } | 40 | } |
225 | 42 | 41 | ||
226 | 43 | def pay_and_reconcile_writeoff(self, cr, uid, ids, context=None): | 42 | def pay_and_reconcile_writeoff(self, cr, uid, ids, context=None): |
227 | 43 | pay_invoice = self.pool.get('account.invoice.pay') | ||
228 | 44 | data = self.read(cr, uid, ids,context=context)[0] | 44 | data = self.read(cr, uid, ids,context=context)[0] |
229 | 45 | context.update({'write_off':data}) | 45 | context.update({'write_off':data}) |
230 | 46 | self.pool.get('account.invoice.pay').pay_and_reconcile(cr, uid, ids, context=context) | 46 | self.pool.get('account.invoice.pay').pay_and_reconcile(cr, uid, ids, context=context) |
231 | @@ -58,7 +58,7 @@ | |||
232 | 58 | 'amount': fields.float('Amount paid', required=True), | 58 | 'amount': fields.float('Amount paid', required=True), |
233 | 59 | 'name': fields.char('Entry Name', size=64, required=True), | 59 | 'name': fields.char('Entry Name', size=64, required=True), |
234 | 60 | 'date': fields.date('Date payment', required=True), | 60 | 'date': fields.date('Date payment', required=True), |
236 | 61 | 'cash_residual_amount': fields.float('Residual Amount', readonly=True), | 61 | 'cash_residual_amount': fields.float('Residual Amount'), |
237 | 62 | 'journal_id': fields.many2one('account.journal', 'Journal/Payment Mode', required=True), | 62 | 'journal_id': fields.many2one('account.journal', 'Journal/Payment Mode', required=True), |
238 | 63 | 'period_id': fields.many2one('account.period', 'Period', required=True), | 63 | 'period_id': fields.many2one('account.period', 'Period', required=True), |
239 | 64 | 'cash_amount':fields.float('Cash Discount Amount',), | 64 | 'cash_amount':fields.float('Cash Discount Amount',), |
240 | @@ -69,7 +69,7 @@ | |||
241 | 69 | 'discount_move_ids': fields.many2many('account.move', 'account_discount_move_rel', 'discount_account_id', 'discount_move_id', 'Account Discount Moves'), | 69 | 'discount_move_ids': fields.many2many('account.move', 'account_discount_move_rel', 'discount_account_id', 'discount_move_id', 'Account Discount Moves'), |
242 | 70 | 'tax_move_ids': fields.many2many('account.move.line', 'account_tax_move_rel', 'tax_account_id', 'tax_move_id', 'Account Taxes Moves'), | 70 | 'tax_move_ids': fields.many2many('account.move.line', 'account_tax_move_rel', 'tax_account_id', 'tax_move_id', 'Account Taxes Moves'), |
243 | 71 | } | 71 | } |
245 | 72 | 72 | ||
246 | 73 | def _get_period(self, cr, uid, context=None): | 73 | def _get_period(self, cr, uid, context=None): |
247 | 74 | ids = self.pool.get('account.period').find(cr, uid, context=context) | 74 | ids = self.pool.get('account.period').find(cr, uid, context=context) |
248 | 75 | period_id = False | 75 | period_id = False |
249 | @@ -80,34 +80,19 @@ | |||
250 | 80 | def _get_amount(self, cr, uid, context=None): | 80 | def _get_amount(self, cr, uid, context=None): |
251 | 81 | obj_inv = self.pool.get('account.invoice') | 81 | obj_inv = self.pool.get('account.invoice') |
252 | 82 | invoice = obj_inv.browse(cr, uid, context['id'], context=context) | 82 | invoice = obj_inv.browse(cr, uid, context['id'], context=context) |
255 | 83 | discount = obj_inv._get_payment(cr, uid, [context['id']] ,invoice.residual, invoice.payment_term.id, context=context) | 83 | amount = obj_inv._get_amount(cr, uid, [context['id']] ,invoice.residual, invoice.payment_term.id, context=context) |
256 | 84 | residual_amount = invoice.residual - discount | 84 | context.update({'found':amount['found']}) |
257 | 85 | amount = amount['amount'] | ||
258 | 86 | discount = obj_inv._get_payment(cr, uid, [context['id']] ,amount, invoice.payment_term.id, context=context) | ||
259 | 87 | residual_amount = amount - discount | ||
260 | 85 | return residual_amount | 88 | return residual_amount |
261 | 86 | 89 | ||
262 | 87 | def on_change_ammount(self, cr, uid, ids, amount, context=None): | ||
263 | 88 | """ | ||
264 | 89 | Function return the Discount according to the Amount paid and Payment Term Cash Discount | ||
265 | 90 | """ | ||
266 | 91 | res = {} | ||
267 | 92 | obj_inv = self.pool.get('account.invoice') | ||
268 | 93 | invoice = obj_inv.browse(cr, uid, context['id'], context=context) | ||
269 | 94 | discount = obj_inv._get_payment(cr, uid, [context['id']] , invoice.residual, invoice.payment_term.id, context=context) | ||
270 | 95 | diff_amount = round(invoice.residual - (amount + discount),2) | ||
271 | 96 | return {'value' : {'cash_residual_amount':diff_amount}} | ||
272 | 97 | |||
273 | 98 | def on_change_cash_discount_amount(self, cr, uid, ids, discount_amount, amount, context=None): | ||
274 | 99 | ### Return discount amount | ||
275 | 100 | res = {} | ||
276 | 101 | obj_inv = self.pool.get('account.invoice') | ||
277 | 102 | invoice = obj_inv.browse(cr, uid, context['id'], context=context) | ||
278 | 103 | diff_amount = 0.0 | ||
279 | 104 | diff_amount = round(invoice.residual - (amount + discount_amount),2) | ||
280 | 105 | return {'value' : {'cash_amount':discount_amount,'cash_residual_amount':diff_amount}} | ||
281 | 106 | |||
282 | 107 | def _get_discount(self, cr, uid, context=None): | 90 | def _get_discount(self, cr, uid, context=None): |
283 | 108 | obj_inv = self.pool.get('account.invoice') | 91 | obj_inv = self.pool.get('account.invoice') |
284 | 109 | invoice = obj_inv.browse(cr, uid, context['id'], context=context) | 92 | invoice = obj_inv.browse(cr, uid, context['id'], context=context) |
286 | 110 | discount = obj_inv._get_payment(cr, uid, [context['id']] , invoice.residual, invoice.payment_term.id, context=context) | 93 | amount = obj_inv._get_amount(cr, uid, [context['id']] ,invoice.residual, invoice.payment_term.id, context=context) |
287 | 94 | amount = amount['amount'] | ||
288 | 95 | discount = obj_inv._get_payment(cr, uid, [context['id']] , amount, invoice.payment_term.id, context=context) | ||
289 | 111 | return discount | 96 | return discount |
290 | 112 | 97 | ||
291 | 113 | def _get_account(self, cr, uid, context=None): | 98 | def _get_account(self, cr, uid, context=None): |
292 | @@ -122,13 +107,47 @@ | |||
293 | 122 | account = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, account) | 107 | account = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, account) |
294 | 123 | return account | 108 | return account |
295 | 124 | 109 | ||
303 | 125 | def default_get(self, cr, uid, fields, context=None): | 110 | _defaults = { |
304 | 126 | res = super(account_invoice_pay, self).default_get(cr, uid, fields, context=context) | 111 | 'date': lambda *a: time.strftime('%Y-%m-%d'), |
305 | 127 | invoice = self.pool.get('account.invoice').browse(cr, uid, context['id'], context=context) | 112 | 'period_id': _get_period, |
306 | 128 | if invoice.state in ['draft', 'proforma2', 'cancel']: | 113 | 'amount': _get_amount, |
307 | 129 | raise osv.except_osv(_('Error !'), _('Can not pay draft/proforma/cancel invoice.')) | 114 | 'cash_amount':_get_discount, |
308 | 130 | return res | 115 | 'account_id':_get_account, |
309 | 131 | 116 | 'cash_residual_amount': lambda *a:0.0, | |
310 | 117 | 'cal_method_selection':lambda *a :'method_gross_methodology', | ||
311 | 118 | } | ||
312 | 119 | |||
313 | 120 | def on_change_ammount(self, cr, uid, ids, amount, context=None): | ||
314 | 121 | """ | ||
315 | 122 | Function return the Discount according to the Amount paid and Payment Term Cash Discount | ||
316 | 123 | """ | ||
317 | 124 | res = {} | ||
318 | 125 | obj_inv = self.pool.get('account.invoice') | ||
319 | 126 | invoice = obj_inv.browse(cr, uid, context['id'], context=context) | ||
320 | 127 | cal_amount = obj_inv._get_amount(cr, uid, [context['id']] ,invoice.residual, invoice.payment_term.id, context=context) | ||
321 | 128 | |||
322 | 129 | old_cal_amount = cal_amount['amount'] | ||
323 | 130 | discount = obj_inv._get_payment(cr, uid, [context['id']] , old_cal_amount, invoice.payment_term.id, context=context) | ||
324 | 131 | old_amount = old_cal_amount | ||
325 | 132 | diff_amount = round(old_amount - (amount + discount),2) | ||
326 | 133 | |||
327 | 134 | return {'value' : {'cash_residual_amount':diff_amount}} | ||
328 | 135 | |||
329 | 136 | def on_change_cash_discount_amount(self, cr, uid, ids, discount_amount, amount, context=None): | ||
330 | 137 | ### Return discount amount | ||
331 | 138 | res = {} | ||
332 | 139 | obj_inv = self.pool.get('account.invoice') | ||
333 | 140 | invoice = obj_inv.browse(cr, uid, context['id'], context=context) | ||
334 | 141 | cal_amount = obj_inv._get_amount(cr, uid, [context['id']] ,invoice.residual, invoice.payment_term.id, context=context) | ||
335 | 142 | old_cal_amount = cal_amount['amount'] | ||
336 | 143 | discount = obj_inv._get_payment(cr, uid, [context['id']] , amount, invoice.payment_term.id, context=context) | ||
337 | 144 | old_amount = old_cal_amount | ||
338 | 145 | |||
339 | 146 | diff_amount = 0.0 | ||
340 | 147 | diff_amount = old_amount - (amount + discount_amount) | ||
341 | 148 | |||
342 | 149 | return {'value' : {'cash_amount':discount_amount,'cash_residual_amount':diff_amount}} | ||
343 | 150 | |||
344 | 132 | def _calculation(self, cr, uid, ids, context=None): | 151 | def _calculation(self, cr, uid, ids, context=None): |
345 | 133 | invoice_obj = self.pool.get('account.invoice') | 152 | invoice_obj = self.pool.get('account.invoice') |
346 | 134 | data = self.read(cr, uid, ids,context=context)[0] | 153 | data = self.read(cr, uid, ids,context=context)[0] |
347 | @@ -137,7 +156,19 @@ | |||
348 | 137 | invoice_tax_obj = self.pool.get("account.invoice.tax") | 156 | invoice_tax_obj = self.pool.get("account.invoice.tax") |
349 | 138 | move_obj = self.pool.get('account.move') | 157 | move_obj = self.pool.get('account.move') |
350 | 139 | move_line_obj = self.pool.get('account.move.line') | 158 | move_line_obj = self.pool.get('account.move.line') |
352 | 140 | 159 | ||
353 | 160 | ############## Delete another lines of taxes and discount | ||
354 | 161 | if data['tax_move_ids']: | ||
355 | 162 | move_line = data['tax_move_ids'] | ||
356 | 163 | for move_line_id in move_line: | ||
357 | 164 | move_id = move_line_data = move_line_obj.browse(cr, uid,move_line_id).move_id.id | ||
358 | 165 | move_line_obj.unlink(cr, uid,[move_line_id]) | ||
359 | 166 | move_obj.unlink(cr, uid,[move_id]) | ||
360 | 167 | |||
361 | 168 | if data['discount_move_ids']: | ||
362 | 169 | dis_move_id = data['discount_move_ids'][0] | ||
363 | 170 | move_obj.unlink(cr, uid, data['discount_move_ids']) | ||
364 | 171 | |||
365 | 141 | ######## to get ref | 172 | ######## to get ref |
366 | 142 | if invoice.type in ('in_invoice', 'in_refund'): | 173 | if invoice.type in ('in_invoice', 'in_refund'): |
367 | 143 | ref = invoice.reference | 174 | ref = invoice.reference |
368 | @@ -153,7 +184,6 @@ | |||
369 | 153 | name = invoice.invoice_line and invoice.invoice_line[0].name or invoice.number | 184 | name = invoice.invoice_line and invoice.invoice_line[0].name or invoice.number |
370 | 154 | 185 | ||
371 | 155 | ##### Entry in the discount account moves and entry in the tax account moves | 186 | ##### Entry in the discount account moves and entry in the tax account moves |
372 | 156 | |||
373 | 157 | ### Entry for taxes in the line of wizard tax | 187 | ### Entry for taxes in the line of wizard tax |
374 | 158 | if data.get('cash_amount',0.0)>0.0: | 188 | if data.get('cash_amount',0.0)>0.0: |
375 | 159 | lines3 = [] | 189 | lines3 = [] |
376 | @@ -202,7 +232,7 @@ | |||
377 | 202 | discount_account_id = self.pool.get('account.journal').browse(cr, uid, journal_id).default_credit_account_id.id | 232 | discount_account_id = self.pool.get('account.journal').browse(cr, uid, journal_id).default_credit_account_id.id |
378 | 203 | else: | 233 | else: |
379 | 204 | discount_account_id = data['account_id'] | 234 | discount_account_id = data['account_id'] |
381 | 205 | ###############################################3 | 235 | ############################################### |
382 | 206 | 236 | ||
383 | 207 | l4 = { | 237 | l4 = { |
384 | 208 | 'debit': direction * data.get('cash_amount',0.0)<0 and - direction * data.get('cash_amount',0.0), | 238 | 'debit': direction * data.get('cash_amount',0.0)<0 and - direction * data.get('cash_amount',0.0), |
385 | @@ -218,27 +248,57 @@ | |||
386 | 218 | move = {'ref': ref, 'line_id': lines4, 'journal_id': data['journal_id'], 'period_id': data['period_id'], } | 248 | move = {'ref': ref, 'line_id': lines4, 'journal_id': data['journal_id'], 'period_id': data['period_id'], } |
387 | 219 | move_id = move_obj.create(cr, uid, move, context=context) | 249 | move_id = move_obj.create(cr, uid, move, context=context) |
388 | 220 | self.write(cr, uid, ids, {'discount_move_ids':[(6,0,[move_id])]}, context) | 250 | self.write(cr, uid, ids, {'discount_move_ids':[(6,0,[move_id])]}, context) |
389 | 251 | |||
390 | 221 | return True | 252 | return True |
391 | 222 | 253 | ||
401 | 223 | _defaults = { | 254 | def default_get(self, cr, uid, fields, context=None): |
402 | 224 | 'date': lambda *a: time.strftime('%Y-%m-%d'), | 255 | res = super(account_invoice_pay, self).default_get(cr, uid, fields, context=context) |
403 | 225 | 'period_id': _get_period, | 256 | invoice = self.pool.get('account.invoice').browse(cr, uid, context['id'], context=context) |
404 | 226 | 'amount': _get_amount, | 257 | if invoice.state in ['draft', 'proforma2', 'cancel','paid']: |
405 | 227 | 'cash_amount':_get_discount, | 258 | raise osv.except_osv(_('Error !'), _('Can not pay draft/proforma/cancel/Done invoice.')) |
406 | 228 | 'account_id':_get_account, | 259 | return res |
407 | 229 | 'cash_residual_amount': lambda *a:0.0, | 260 | |
408 | 230 | 'cal_method_selection':lambda *a :'method_gross_methodology', | 261 | def _message(self, cr, uid, ids, context=None): |
409 | 231 | } | 262 | mod_obj = self.pool.get('ir.model.data') |
410 | 263 | data = self.read(cr, uid, ids,context=context)[0] | ||
411 | 232 | 264 | ||
412 | 265 | if data['discount_move_ids']: | ||
413 | 266 | context.update({'discount_move_ids':data['discount_move_ids']}) | ||
414 | 267 | |||
415 | 268 | if data['tax_move_ids']: | ||
416 | 269 | context.update({'tax_move_ids':data['tax_move_ids']}) | ||
417 | 270 | |||
418 | 271 | if data['amount']: | ||
419 | 272 | context.update({'amount':data['amount']}) | ||
420 | 273 | |||
421 | 274 | if data['cash_amount']: | ||
422 | 275 | context.update({'cash_amount':data['cash_amount']}) | ||
423 | 276 | |||
424 | 277 | model_data_ids = mod_obj.search(cr, uid,[('model','=','ir.ui.view'),('name','=','view_account_message')], context=context) | ||
425 | 278 | resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id'] | ||
426 | 279 | |||
427 | 280 | return { | ||
428 | 281 | 'name': _('Message'), | ||
429 | 282 | 'context': context, | ||
430 | 283 | 'view_type': 'form', | ||
431 | 284 | 'view_mode': 'form', | ||
432 | 285 | 'res_model': 'account.message', | ||
433 | 286 | 'views': [(resource_id,'form')], | ||
434 | 287 | 'type': 'ir.actions.act_window', | ||
435 | 288 | 'target': 'new', | ||
436 | 289 | } | ||
437 | 290 | |||
438 | 233 | def wo_check(self, cr, uid, ids, context=None): | 291 | def wo_check(self, cr, uid, ids, context=None): |
439 | 234 | cur_obj = self.pool.get('res.currency') | 292 | cur_obj = self.pool.get('res.currency') |
440 | 235 | mod_obj = self.pool.get('ir.model.data') | 293 | mod_obj = self.pool.get('ir.model.data') |
441 | 294 | obj_inv = self.pool.get('account.invoice') | ||
442 | 295 | |||
443 | 236 | if context is None: | 296 | if context is None: |
444 | 237 | context = {} | 297 | context = {} |
445 | 238 | data = self.read(cr, uid, ids,context=context)[0] | 298 | data = self.read(cr, uid, ids,context=context)[0] |
446 | 299 | |||
447 | 239 | invoice = self.pool.get('account.invoice').browse(cr, uid, context['id'], context) | 300 | invoice = self.pool.get('account.invoice').browse(cr, uid, context['id'], context) |
448 | 240 | journal = self.pool.get('account.journal').browse(cr, uid, data['journal_id'], context) | 301 | journal = self.pool.get('account.journal').browse(cr, uid, data['journal_id'], context) |
449 | 241 | |||
450 | 242 | # Here we need that: | 302 | # Here we need that: |
451 | 243 | # The invoice total amount in company's currency <> paid amount in company currency | 303 | # The invoice total amount in company's currency <> paid amount in company currency |
452 | 244 | # (according to the correct day rate, invoicing rate and payment rate are may be different) | 304 | # (according to the correct day rate, invoicing rate and payment rate are may be different) |
453 | @@ -251,13 +311,13 @@ | |||
454 | 251 | inv_amount_company_currency += aml.debit | 311 | inv_amount_company_currency += aml.debit |
455 | 252 | inv_amount_company_currency -= aml.credit | 312 | inv_amount_company_currency -= aml.credit |
456 | 253 | inv_amount_company_currency = abs(inv_amount_company_currency) | 313 | inv_amount_company_currency = abs(inv_amount_company_currency) |
457 | 254 | |||
458 | 255 | # Get the current amount paid in company currency | 314 | # Get the current amount paid in company currency |
459 | 256 | if journal.currency and invoice.company_id.currency_id.id<>journal.currency.id: | 315 | if journal.currency and invoice.company_id.currency_id.id<>journal.currency.id: |
460 | 257 | ctx = {'date':data['date']} | 316 | ctx = {'date':data['date']} |
461 | 258 | amount_paid = cur_obj.compute(cr, uid, journal.currency.id, invoice.company_id.currency_id.id, data['amount'], round=True, context=ctx) | 317 | amount_paid = cur_obj.compute(cr, uid, journal.currency.id, invoice.company_id.currency_id.id, data['amount'], round=True, context=ctx) |
462 | 259 | else: | 318 | else: |
464 | 260 | amount_paid = data['amount'] | 319 | amount_paid = data['amount'] + data['cash_amount'] |
465 | 320 | |||
466 | 261 | # Get the old payment if there are some | 321 | # Get the old payment if there are some |
467 | 262 | if invoice.payment_ids: | 322 | if invoice.payment_ids: |
468 | 263 | debit=credit=0.0 | 323 | debit=credit=0.0 |
469 | @@ -267,27 +327,42 @@ | |||
470 | 267 | amount_paid+=abs(debit-credit) | 327 | amount_paid+=abs(debit-credit) |
471 | 268 | 328 | ||
472 | 269 | # Test if there is a difference according to currency rouding setting | 329 | # Test if there is a difference according to currency rouding setting |
475 | 270 | if self.pool.get('res.currency').is_zero(cr, uid, invoice.company_id.currency_id, | 330 | amount = obj_inv._get_amount(cr, uid, [context['id']] ,invoice.residual, invoice.payment_term.id, context=context) |
476 | 271 | (amount_paid - inv_amount_company_currency)): | 331 | found_h = amount['found'] |
477 | 332 | |||
478 | 333 | if found_h: | ||
479 | 334 | if context.get('discount_move_ids',False): | ||
480 | 335 | context.update({'discount_move_ids':context['discount_move_ids']}) | ||
481 | 336 | |||
482 | 337 | if context.get('tax_move_ids',False): | ||
483 | 338 | context.update({'tax_move_ids':context['tax_move_ids']}) | ||
484 | 339 | |||
485 | 272 | return self.pay_and_reconcile(cr, uid, ids, context=context) | 340 | return self.pay_and_reconcile(cr, uid, ids, context=context) |
486 | 273 | else: | 341 | else: |
500 | 274 | model_data_ids = mod_obj.search(cr, uid,[('model','=','ir.ui.view'),('name','=','view_account_invoice_pay_writeoff')], context=context) | 342 | |
501 | 275 | resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id'] | 343 | if self.pool.get('res.currency').is_zero(cr, uid, invoice.company_id.currency_id, |
502 | 276 | return { | 344 | (amount_paid - inv_amount_company_currency)): |
503 | 277 | 'name': _('Information addendum'), | 345 | return self.pay_and_reconcile(cr, uid, ids, context=context) |
504 | 278 | 'context': context, | 346 | |
505 | 279 | 'view_type': 'form', | 347 | else: |
506 | 280 | 'view_mode': 'form', | 348 | model_data_ids = mod_obj.search(cr, uid,[('model','=','ir.ui.view'),('name','=','view_account_invoice_pay_writeoff')], context=context) |
507 | 281 | 'res_model': 'account.invoice.pay.writeoff', | 349 | resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id'] |
508 | 282 | 'views': [(resource_id,'form')], | 350 | return { |
509 | 283 | 'type': 'ir.actions.act_window', | 351 | 'name': _('Information addendum'), |
510 | 284 | 'target': 'new', | 352 | 'context': context, |
511 | 285 | } | 353 | 'view_type': 'form', |
512 | 286 | 354 | 'view_mode': 'form', | |
513 | 355 | 'res_model': 'account.invoice.pay.writeoff', | ||
514 | 356 | 'views': [(resource_id,'form')], | ||
515 | 357 | 'type': 'ir.actions.act_window', | ||
516 | 358 | 'target': 'new', | ||
517 | 359 | } | ||
518 | 360 | |||
519 | 287 | def pay_and_reconcile(self, cr, uid, ids, context=None): | 361 | def pay_and_reconcile(self, cr, uid, ids, context=None): |
520 | 288 | cur_obj = self.pool.get('res.currency') | 362 | cur_obj = self.pool.get('res.currency') |
521 | 289 | if context is None: | 363 | if context is None: |
522 | 290 | context = {} | 364 | context = {} |
523 | 365 | |||
524 | 291 | data = self.read(cr, uid, ids,context=context)[0] | 366 | data = self.read(cr, uid, ids,context=context)[0] |
525 | 292 | writeoff_account_id = False | 367 | writeoff_account_id = False |
526 | 293 | writeoff_journal_id = False | 368 | writeoff_journal_id = False |
527 | @@ -297,9 +372,9 @@ | |||
528 | 297 | writeoff_account_id = context['write_off']['writeoff_acc_id'] | 372 | writeoff_account_id = context['write_off']['writeoff_acc_id'] |
529 | 298 | writeoff_journal_id = context['write_off']['writeoff_journal_id'] | 373 | writeoff_journal_id = context['write_off']['writeoff_journal_id'] |
530 | 299 | comment = context['write_off']['comment'] | 374 | comment = context['write_off']['comment'] |
532 | 300 | 375 | ||
533 | 301 | amount = data['amount'] + data['cash_amount'] | 376 | amount = data['amount'] + data['cash_amount'] |
535 | 302 | 377 | ||
536 | 303 | invoice = self.pool.get('account.invoice').browse(cr, uid, context['id'], context=context) | 378 | invoice = self.pool.get('account.invoice').browse(cr, uid, context['id'], context=context) |
537 | 304 | journal = self.pool.get('account.journal').browse(cr, uid, data['journal_id'], context=context) | 379 | journal = self.pool.get('account.journal').browse(cr, uid, data['journal_id'], context=context) |
538 | 305 | # Compute the amount in company's currency, with the journal currency (which is equal to payment currency) | 380 | # Compute the amount in company's currency, with the journal currency (which is equal to payment currency) |
539 | @@ -326,12 +401,16 @@ | |||
540 | 326 | 401 | ||
541 | 327 | context.update({'account_id':data['account_id'],'cash_amount':data['cash_amount'],'amount_currency':data['amount'] + data['cash_amount']}) | 402 | context.update({'account_id':data['account_id'],'cash_amount':data['cash_amount'],'amount_currency':data['amount'] + data['cash_amount']}) |
542 | 328 | 403 | ||
545 | 329 | if data['discount_move_ids']: | 404 | if context.get('discount_move_ids',False): |
546 | 330 | context.update({'discount_move_ids':data['discount_move_ids']}) | 405 | context = context |
547 | 406 | else: | ||
548 | 407 | context.update({'discount_move_ids':data['discount_move_ids']}) | ||
549 | 331 | 408 | ||
551 | 332 | if data['tax_move_ids']: | 409 | if context.get('tax_move_ids',False): |
552 | 410 | context = context | ||
553 | 411 | else: | ||
554 | 333 | context.update({'tax_move_ids':data['tax_move_ids']}) | 412 | context.update({'tax_move_ids':data['tax_move_ids']}) |
556 | 334 | 413 | ||
557 | 335 | if data['cash_amount']: | 414 | if data['cash_amount']: |
558 | 336 | context.update({'cash_amount':data['cash_amount']}) | 415 | context.update({'cash_amount':data['cash_amount']}) |
559 | 337 | 416 | ||
560 | @@ -344,6 +423,7 @@ | |||
561 | 344 | return {} | 423 | return {} |
562 | 345 | 424 | ||
563 | 346 | def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False): | 425 | def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False): |
564 | 426 | |||
565 | 347 | res = super(account_invoice_pay,self).fields_view_get(cr, uid, view_id, view_type, context, toolbar) | 427 | res = super(account_invoice_pay,self).fields_view_get(cr, uid, view_id, view_type, context, toolbar) |
566 | 348 | fields=res.get('fields',{}) | 428 | fields=res.get('fields',{}) |
567 | 349 | word = "Supplier Cash Discount Account" | 429 | word = "Supplier Cash Discount Account" |
568 | @@ -358,4 +438,13 @@ | |||
569 | 358 | 438 | ||
570 | 359 | account_invoice_pay() | 439 | account_invoice_pay() |
571 | 360 | 440 | ||
572 | 441 | class account_message(osv.osv_memory): | ||
573 | 442 | _name = "account.message" | ||
574 | 443 | def _check(self, cr, uid, ids, context=None): | ||
575 | 444 | data = self.read(cr, uid, ids,context=context)[0] | ||
576 | 445 | result = self.pool.get('account.invoice.pay').wo_check(cr, uid, ids, context=context) | ||
577 | 446 | return result | ||
578 | 447 | |||
579 | 448 | account_message() | ||
580 | 449 | |||
581 | 361 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | 450 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
582 | 362 | \ No newline at end of file | 451 | \ No newline at end of file |
583 | 363 | 452 | ||
584 | === modified file 'account_invoice_cash_discount/wizard/account_pay_invoice_view.xml' | |||
585 | --- account_invoice_cash_discount/wizard/account_pay_invoice_view.xml 2010-07-01 12:19:51 +0000 | |||
586 | +++ account_invoice_cash_discount/wizard/account_pay_invoice_view.xml 2010-07-06 13:37:26 +0000 | |||
587 | @@ -34,7 +34,7 @@ | |||
588 | 34 | <label string ="" colspan="2"/> | 34 | <label string ="" colspan="2"/> |
589 | 35 | <button icon="gtk-cancel" special="cancel" string="Cancel"/> | 35 | <button icon="gtk-cancel" special="cancel" string="Cancel"/> |
590 | 36 | <button icon="gtk-execute" string="Partial Payment" name="pay_and_reconcile" type="object"/> | 36 | <button icon="gtk-execute" string="Partial Payment" name="pay_and_reconcile" type="object"/> |
592 | 37 | <button icon="gtk-execute" string="Full Payment" name="wo_check" type="object"/> | 37 | <button icon="gtk-execute" string="Full-Payment" name="_message" type="object"/> |
593 | 38 | </group> | 38 | </group> |
594 | 39 | </form> | 39 | </form> |
595 | 40 | </field> | 40 | </field> |
596 | @@ -70,5 +70,18 @@ | |||
597 | 70 | </form> | 70 | </form> |
598 | 71 | </field> | 71 | </field> |
599 | 72 | </record> | 72 | </record> |
600 | 73 | |||
601 | 74 | <record id="view_account_message" model="ir.ui.view"> | ||
602 | 75 | <field name="name">account.message.form</field> | ||
603 | 76 | <field name="model">account.message</field> | ||
604 | 77 | <field name="type">form</field> | ||
605 | 78 | <field name="arch" type="xml"> | ||
606 | 79 | <form string="Your Messages"> | ||
607 | 80 | <label colspan="8" string="Are you really want to reconcile this invoice" /> | ||
608 | 81 | <button icon="gtk-execute" string="OK" name="_check" type="object"/> | ||
609 | 82 | </form> | ||
610 | 83 | </field> | ||
611 | 84 | </record> | ||
612 | 85 | |||
613 | 73 | </data> | 86 | </data> |
614 | 74 | </openerp> | 87 | </openerp> |
615 | 75 | \ No newline at end of file | 88 | \ No newline at end of file |