557
557
_name = "account.journal"
558
558
_description = "Journal"
560
'name': fields.char('Journal Name', size=64, required=True, translate=True),
561
'code': fields.char('Code', size=16),
562
'type': fields.selection([('sale', 'Sale'), ('purchase', 'Purchase'), ('expense', 'Expense'), ('cash', 'Cash'), ('bank', 'Bank'), ('general', 'General'), ('situation', 'Situation')], 'Type', size=32, required=True,
560
'name': fields.char('Journal Name', size=64, required=True, translate=True,help="Name of the journal"),
561
'code': fields.char('Code', size=16,required=True,help="Code of the journal"),
562
'type': fields.selection([('sale', 'Sale'),('sale_refund','Sale Refund'), ('purchase', 'Purchase'), ('purchase_refund','Purchase Refund'),('expense', 'Expense'), ('cash', 'Cash'), ('bank', 'Bank'), ('general', 'General'), ('situation', 'Situation')], 'Type', size=32, required=True,
563
563
help="Select 'Sale' for Sale journal to be used at the time of making invoice."\
564
564
" Select 'Purchase' for Purchase Journal to be used at the time of approving purchase order."\
565
565
" Select 'Cash' to be used at the time of making payment."\
566
566
" Select 'General' to be used at the time of stock input/output."\
567
567
" Select 'Situation' to be used at the time of making vouchers."),
568
568
'refund_journal': fields.boolean('Refund Journal', help='Fill this if the journal is to be used for refunds of invoices.'),
570
569
'type_control_ids': fields.many2many('account.account.type', 'account_journal_type_rel', 'journal_id','type_id', 'Type Controls', domain=[('code','<>','view'), ('code', '<>', 'closed')]),
571
570
'account_control_ids': fields.many2many('account.account', 'account_account_type_rel', 'journal_id','account_id', 'Account', domain=[('type','<>','view'), ('type', '<>', 'closed')]),
573
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the journal without removing it."),
574
'view_id': fields.many2one('account.journal.view', 'View', required=True, help="Gives the view used when writing or browsing entries in this journal. The view tells Open ERP which fields should be visible, required or readonly and in which order. You can create your own view for a faster encoding in each journal."),
575
'default_credit_account_id': fields.many2one('account.account', 'Default Credit Account', domain="[('type','!=','view')]"),
576
'default_debit_account_id': fields.many2one('account.account', 'Default Debit Account', domain="[('type','!=','view')]"),
571
'view_id': fields.many2one('account.journal.view', 'Display Mode', required=True, help="Gives the view used when writing or browsing entries in this journal. The view tells Open ERP which fields should be visible, required or readonly and in which order. You can create your own view for a faster encoding in each journal."),
572
'default_credit_account_id': fields.many2one('account.account', 'Default Credit Account', domain="[('type','!=','view')]",help="This will act as a default account for credit amount"),
573
'default_debit_account_id': fields.many2one('account.account', 'Default Debit Account', domain="[('type','!=','view')]",help="This will act as a default account for debit amount"),
577
574
'centralisation': fields.boolean('Centralised counterpart', help="Check this box to determine that each entry of this journal won't create a new counterpart but will share the same counterpart. This is used in fiscal year closing."),
578
'update_posted': fields.boolean('Allow Cancelling Entries'),
579
575
'group_invoice_lines': fields.boolean('Group invoice lines', help="If this box is checked, the system will try to group the accounting lines when generating them from invoices."),
580
576
'sequence_id': fields.many2one('ir.sequence', 'Entry Sequence', help="The sequence gives the display order for a list of journals", required=True),
581
577
'user_id': fields.many2one('res.users', 'User', help="The user responsible for this journal"),
582
578
'groups_id': fields.many2many('res.groups', 'account_journal_group_rel', 'journal_id', 'group_id', 'Groups'),
583
579
'currency': fields.many2one('res.currency', 'Currency', help='The currency used to enter statement'),
584
580
'entry_posted': fields.boolean('Skip \'Draft\' State for Created Entries', help='Check this box if you don\'t want new account moves to pass through the \'draft\' state and instead goes directly to the \'posted state\' without any manual validation.'),
585
'company_id': fields.many2one('res.company', 'Company', required=True,select=1),
581
'company_id': fields.many2one('res.company', 'Company', required=True,select=1,help="Company related to a journal"),
586
582
'invoice_sequence_id': fields.many2one('ir.sequence', 'Invoice Sequence', \
587
583
help="The sequence used for invoice numbers in this journal."),
588
584
'allow_date':fields.boolean('Check Date not in the Period', help= 'If set to True then do not accept the entry if the entry date is not into the period dates'),
592
'active': lambda *a: 1,
593
588
'user_id': lambda self,cr,uid,context: uid,
594
589
'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,