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"),
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."))
222
222
'l10n.es.aeat.mod347.invoice_record': (_get_lines, ['amount'] , 10 )
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),
227
227
'l10n.es.aeat.mod347.invoice_record': (_get_lines, ['amount'] , 10 )
233
233
'l10n.es.aeat.mod347.invoice_record': (_get_lines, ['amount'] , 10 )
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 )
240
240
multi="quarter_multi",digits=(13,2), store= {
241
241
'l10n.es.aeat.mod347.invoice_record': (_get_lines, ['amount'] , 10 )
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 )
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 )
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 )
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)),
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)]}),
316
316
class l10n_es_aeat_mod347_real_state_record(osv.osv):
318
Represents a real state record for the 347 model.
318
Represents a real estate record for the 347 model.
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"
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),
390
390
class l10n_es_aeat_mod347_report_add_real_state_records(osv.osv):
392
Extends the report to add the real state records.
392
Extends the report to add the real estate records.
394
394
_inherit = 'l10n.es.aeat.mod347.report'
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)]}),
399
399
l10n_es_aeat_mod347_report_add_real_state_records()
402
402
class l10n_es_aeat_mod347_partner_record_add_real_state_records(osv.osv):
404
Extends the partner_records to add the real state records.
404
Extends the partner_records to add the real estate records.
406
406
_inherit = 'l10n.es.aeat.mod347.partner_record'
409
409
def _get_real_state_record_ids(self, cr, uid, ids, field_name, args, context=None):
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.
413
413
if context is None:
426
426
def _set_real_state_record_ids(self, cr, uid, id, field_name, values, args=None, context=None):
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.
430
430
if context is None:
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),
450
450
l10n_es_aeat_mod347_partner_record_add_real_state_records()