~pedro.baeza/openerp-spain/6.1-l10n_es_bank_statement-fy_fix

« back to all changes in this revision

Viewing changes to l10n_es_aeat_mod347/mod347.py

[FIX] *: Cambiada cadena 'real estate' por 'real state'
[IMP] *: Vaciados msgstr de las plantillas pot
[IMP] *: Permisos correctos para los archivos.

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
        'total_partner_records': fields.function(_get_totals, string="Partners records", method=True, type='integer', multi="totals_multi"),
100
100
        'total_amount': fields.function(_get_totals, string="Amount", method=True, type='float', multi="totals_multi"),
101
101
        'total_cash_amount': fields.function(_get_totals, string="Cash Amount", method=True, type='float', multi="totals_multi"),
102
 
        'total_real_state_transmissions_amount': fields.function(_get_totals, string="Real State Transmissions Amount", method=True, type='float', multi="totals_multi"),
103
 
        'total_real_state_records': fields.function(_get_totals, string="Real state records", method=True, type='integer', multi="totals_multi"),
104
 
        'total_real_state_amount': fields.function(_get_totals, string="Real State Amount", method=True, type='float', multi="totals_multi"),
 
102
        'total_real_state_transmissions_amount': fields.function(_get_totals, string="Real Estate Transmissions Amount", method=True, type='float', multi="totals_multi"),
 
103
        'total_real_state_records': fields.function(_get_totals, string="Real estate records", method=True, type='integer', multi="totals_multi"),
 
104
        'total_real_state_amount': fields.function(_get_totals, string="Real Estate Amount", method=True, type='float', multi="totals_multi"),
105
105
 
106
106
    }
107
107
    _defaults = {
130
130
 
131
131
            for real_state_record in item.real_state_record_ids:
132
132
                if not real_state_record.state_code:
133
 
                    raise osv.except_osv(_('Error!'), _("All real state records state code field must be filled."))
 
133
                    raise osv.except_osv(_('Error!'), _("All real estate records state code field must be filled."))
134
134
 
135
135
        return True
136
136
 
221
221
                store= { 
222
222
                    'l10n.es.aeat.mod347.invoice_record': (_get_lines, ['amount'] , 10 )
223
223
                }),
224
 
        'first_quarter_real_state_transmission_amount':fields.function(_get_quarter_totals, string="First Quarter Real State Transmission Amount",
 
224
        'first_quarter_real_state_transmission_amount':fields.function(_get_quarter_totals, string="First Quarter Real Estate Transmission Amount",
225
225
                method=True, type='float', multi="quarter_multi" ,digits=(13,2),
226
226
                store= { 
227
227
                    'l10n.es.aeat.mod347.invoice_record': (_get_lines, ['amount'] , 10 )
232
232
                store= { 
233
233
                    'l10n.es.aeat.mod347.invoice_record': (_get_lines, ['amount'] , 10 )
234
234
                }),
235
 
        'second_quarter_real_state_transmission_amount':fields.function(_get_quarter_totals, string="Second Quarter Real State Transmission Amount",
 
235
        'second_quarter_real_state_transmission_amount':fields.function(_get_quarter_totals, string="Second Quarter Real Estate Transmission Amount",
236
236
                method=True, type='float', multi="quarter_multi",digits=(13,2), store= { 
237
237
                    'l10n.es.aeat.mod347.invoice_record': (_get_lines, ['amount'] , 10 )
238
238
                }),
240
240
                multi="quarter_multi",digits=(13,2), store= { 
241
241
                    'l10n.es.aeat.mod347.invoice_record': (_get_lines, ['amount'] , 10 )
242
242
                }),
243
 
        'third_quarter_real_state_transmission_amount':fields.function(_get_quarter_totals, string="Third Quarter Real State Transmission Amount",
 
243
        'third_quarter_real_state_transmission_amount':fields.function(_get_quarter_totals, string="Third Quarter Real Estate Transmission Amount",
244
244
                method=True, type='float', multi="quarter_multi",digits=(13,2), store= { 
245
245
                    'l10n.es.aeat.mod347.invoice_record': (_get_lines, ['amount'] , 10 )
246
246
                } ),
248
248
                method=True, type='float', multi="quarter_multi",digits=(13,2), store= { 
249
249
                    'l10n.es.aeat.mod347.invoice_record': (_get_lines, ['amount'] , 10 )
250
250
                }),
251
 
        'fourth_quarter_real_state_transmission_amount':fields.function(_get_quarter_totals, string="Fourth Quarter Real State Transmossion Amount",
 
251
        'fourth_quarter_real_state_transmission_amount':fields.function(_get_quarter_totals, string="Fourth Quarter Real Estate Transmossion Amount",
252
252
                method=True, type='float', multi="quarter_multi",digits=(13,2), store= { 
253
253
                    'l10n.es.aeat.mod347.invoice_record': (_get_lines, ['amount'] , 10 )
254
254
                }),        
255
255
        'amount': fields.float('Operations amount', digits=(13,2)),
256
256
        'cash_amount': fields.float('Received cash amount', digits=(13,2)),
257
 
        'real_state_transmissions_amount': fields.float('Real State Transmisions amount', digits=(13,2)),
 
257
        'real_state_transmissions_amount': fields.float('Real Estate Transmisions amount', digits=(13,2)),
258
258
 
259
259
        'insurance_operation': fields.boolean('Insurance Operation', help="Only for insurance companies. Set to identify insurance operations aside from the rest."),
260
 
        'bussiness_real_state_rent': fields.boolean('Bussiness Real State Rent', help="Set to identify real state rent operations aside from the rest. You'll need to fill in the real state info only when you are the one that receives the money."),
 
260
        'bussiness_real_state_rent': fields.boolean('Bussiness Real Estate Rent', help="Set to identify real estate rent operations aside from the rest. You'll need to fill in the real estate info only when you are the one that receives the money."),
261
261
        'origin_fiscalyear_id': fields.many2one('account.fiscalyear', 'Origin fiscal year', help="Origin cash operation fiscal year"),
262
262
        'invoice_record_ids': fields.one2many('l10n.es.aeat.mod347.invoice_record', 'partner_record_id', 'Invoice records',
263
263
                                                      states = {'done': [('readonly', True)]}),
315
315
 
316
316
class l10n_es_aeat_mod347_real_state_record(osv.osv):
317
317
    """
318
 
    Represents a real state record for the 347 model.
 
318
    Represents a real estate record for the 347 model.
319
319
    """
320
320
    _name = 'l10n.es.aeat.mod347.real_state_record'
321
 
    _description = 'Real State Record'
 
321
    _description = 'Real Estate Record'
322
322
    _rec_name = "reference"
323
323
 
324
324
    _columns = {
334
334
                    ('2', '2 - Basque Country and Navarra'),
335
335
                    ('3', '3 - Spain, without catastral reference'),
336
336
                    ('4', '4 - Foreign'),
337
 
                ], 'Real state Situation'),
 
337
                ], 'Real estate Situation'),
338
338
        'reference': fields.char('Catastral Reference', size=25),
339
339
        # 'address_id': fields.many2one('res.partner.address', 'Address'),
340
340
        'address_type': fields.char('Address type', size=5),
389
389
 
390
390
class l10n_es_aeat_mod347_report_add_real_state_records(osv.osv):
391
391
    """
392
 
    Extends the report to add the real state records.
 
392
    Extends the report to add the real estate records.
393
393
    """
394
394
    _inherit = 'l10n.es.aeat.mod347.report'
395
395
    _columns = {
396
 
        'real_state_record_ids': fields.one2many('l10n.es.aeat.mod347.real_state_record', 'report_id', 'Real State Records',
 
396
        'real_state_record_ids': fields.one2many('l10n.es.aeat.mod347.real_state_record', 'report_id', 'Real Estate Records',
397
397
                            states = {'done': [('readonly', True)]}),
398
398
    }
399
399
l10n_es_aeat_mod347_report_add_real_state_records()
401
401
 
402
402
class l10n_es_aeat_mod347_partner_record_add_real_state_records(osv.osv):
403
403
    """
404
 
    Extends the partner_records to add the real state records.
 
404
    Extends the partner_records to add the real estate records.
405
405
    """
406
406
    _inherit = 'l10n.es.aeat.mod347.partner_record'
407
407
 
408
408
 
409
409
    def _get_real_state_record_ids(self, cr, uid, ids, field_name, args, context=None):
410
410
        """
411
 
        Get the real state records from this record parent report for this partner.
 
411
        Get the real estate records from this record parent report for this partner.
412
412
        """
413
413
        if context is None:
414
414
            context = {}
425
425
 
426
426
    def _set_real_state_record_ids(self, cr, uid, id, field_name, values, args=None, context=None):
427
427
        """
428
 
        Set the real state records from this record parent report for this partner.
 
428
        Set the real estate records from this record parent report for this partner.
429
429
        """
430
430
        if context is None:
431
431
            context = {}
445
445
        'real_state_record_ids': fields.function(_get_real_state_record_ids,
446
446
                    fnct_inv=_set_real_state_record_ids, method=True,
447
447
                    obj="l10n.es.aeat.mod347.real_state_record",
448
 
                    type="one2many", string='Real State Records', store=False),
 
448
                    type="one2many", string='Real Estate Records', store=False),
449
449
    }
450
450
l10n_es_aeat_mod347_partner_record_add_real_state_records()
451
451