Subject: account: Avoid to triple-validate the same move line.
Author: Manuel Vázquez Acosta
Committer: Manuel Vázquez Acosta

Date Level Type Message
2017-03-21 23:04:56 INFO runbot init Init build environment
2017-03-21 23:05:15 INFO runbot test_base Start test base module
2017-03-21 23:14:58 INFO runbot test_all Start test all modules
2017-03-21 23:19:53 CRITICAL server openerp.service.server:954 preload_registries
Failed to initialize database `3283595-599-9947cf-all`.
Traceback (most recent call last):
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3283595-599-9947cf/openerp/service/server.py", line 941, in preload_registries
    registry = RegistryManager.new(dbname, update_module=update_module)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3283595-599-9947cf/openerp/modules/registry.py", line 370, in new
    openerp.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3283595-599-9947cf/openerp/modules/loading.py", line 354, in load_modules
    loaded_modules, update_module)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3283595-599-9947cf/openerp/modules/loading.py", line 255, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3283595-599-9947cf/openerp/modules/loading.py", line 179, in load_module_graph
    _load_data(cr, module_name, idref, mode, kind='demo')
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3283595-599-9947cf/openerp/modules/loading.py", line 118, in _load_data
    tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3283595-599-9947cf/openerp/tools/convert.py", line 897, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3283595-599-9947cf/openerp/tools/convert.py", line 983, in convert_xml_import
    obj.parse(doc.getroot(), mode=mode)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3283595-599-9947cf/openerp/tools/convert.py", line 849, in parse
    self._tags[rec.tag](self.cr, rec, n, mode=mode)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3283595-599-9947cf/openerp/tools/convert.py", line 375, in _tag_function
    _eval_xml(self,rec, self.pool, cr, uid, self.idref, context=context)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3283595-599-9947cf/openerp/tools/convert.py", line 226, in _eval_xml
    res = getattr(model, method)(cr, uid, *args)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3283595-599-9947cf/openerp/api.py", line 268, in wrapper
    return old_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3283595-599-9947cf/openerp/addons/account/account_invoice.py", line 1232, in pay_and_reconcile
    writeoff_acc_id, writeoff_period_id, writeoff_journal_id, name=name)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3283595-599-9947cf/openerp/api.py", line 266, in wrapper
    return new_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3283595-599-9947cf/openerp/addons/account/account_invoice.py", line 1215, in pay_and_reconcile
    lines2rec.reconcile('manual', writeoff_acc_id, writeoff_period_id, writeoff_journal_id)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3283595-599-9947cf/openerp/api.py", line 266, in wrapper
    return new_api(self, *args, **kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3283595-599-9947cf/openerp/api.py", line 592, in new_api
    result = method(self._model, cr, uid, self.ids, *args, **old_kwargs)
  File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3283595-599-9947cf/openerp/addons/account/account_move_line.py", line 974, in reconcile
    _('Entry "%s" is not valid !') % line.name)
ParseError: "Error!
Entry "Payment from ASUStek" is not valid !" while parsing /srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3283595-599-9947cf/openerp/addons/account/account_unit_test.xml:51, near
<function model="account.invoice" name="pay_and_reconcile">
            <!-- ids = -->                    <value eval="[ref('test_invoice_1')]"/>
            <!-- pay_amount = -->            <value eval="1850"/>
            <!-- pay_account_id = -->        <value eval="ref('cash')"/>
            <!-- period_id = -->            <value eval="ref('account.period_' + str(int(time.strftime('%m'))))"/>
            <!-- pay_journal_id = -->        <value eval="ref('bank_journal')"/>
            <!-- writeoff_acc_id = -->        <value eval="ref('cash')"/>
            <!-- writeoff_period_id = -->    <value eval="ref('account.period_' + str(int(time.strftime('%m'))))"/>
            <!-- writeoff_journal_id = -->    <value eval="ref('bank_journal')"/>
            <!-- context = -->              <value eval="{}"/>
            <!-- name = -->                 <value eval="str('Payment from ASUStek')"/>
        </function>
2017-03-21 23:30:33 INFO runbot run Start running build 3283595-599-9947cf
2017-03-27 13:45:43 INFO runbot kill Kill build 3283595-599-9947cf