mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[FIX] double defaults
This commit is contained in:
@@ -26,9 +26,9 @@
|
||||
'complexity': 'normal',
|
||||
'depends': ['base', 'account'],
|
||||
'description': """
|
||||
This module allows you to import move/moveline via CSV asynchronously.
|
||||
This module allows you to import moves / move lines via CSV asynchronously.
|
||||
|
||||
You can access model in the journal entries menu-> Move line importer.
|
||||
You can access model in the journal entries menu -> Moves/ Move lines importer.
|
||||
User must be an account manger.
|
||||
|
||||
To import a CSV simply save an UTF8 CSV file in the "file" field.
|
||||
|
||||
@@ -35,7 +35,7 @@ _logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class move_line_importer(orm.Model):
|
||||
"""Asynchrone move /move line importer.
|
||||
"""Asynchrone move / move line importer.
|
||||
It will parse the saved CSV file using orm.BaseModel.load
|
||||
in a thread. If you set bypass_orm to True then the load function
|
||||
will use a totally overriden create function that is a lot faster
|
||||
@@ -96,16 +96,15 @@ class move_line_importer(orm.Model):
|
||||
" and in conjonction with provided canvas."),
|
||||
}
|
||||
|
||||
_defaults = {'delimiter': ',',
|
||||
'bypass_orm': False}
|
||||
|
||||
def _get_current_company(self, cr, uid, context=None, model="move.line.importer"):
|
||||
return self.pool.get('res.company')._company_default_get(cr, uid, model,
|
||||
context=context)
|
||||
|
||||
_defaults = {'state': 'draft',
|
||||
'name': fields.datetime.now(),
|
||||
'company_id': _get_current_company}
|
||||
'company_id': _get_current_company
|
||||
'delimiter': ',',
|
||||
'bypass_orm': False}
|
||||
|
||||
def _parse_csv(self, cr, uid, imp_id):
|
||||
"""Parse stored CSV file in order to be usable by BaseModel.load method.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<field name="name">move line importer form</field>
|
||||
<field name="model">move.line.importer</field>
|
||||
<field name="arch" type="xml">
|
||||
<form version="7.0" string="Imported file">
|
||||
<form version="7.0" string="Move / Move lines importer">
|
||||
<header>
|
||||
<button name="import_file"
|
||||
type="object"
|
||||
|
||||
Reference in New Issue
Block a user