Remove show_account_move_form because of the fact that the context is kept from the account.move.line form view, so it triggers a crash when creating a line from the account.move form

Fix domain on analytic account on move lines
This commit is contained in:
Alexis de Lattre
2017-03-08 00:31:23 +01:00
parent 281c0b7052
commit 4c3c8e50db
2 changed files with 2 additions and 13 deletions

View File

@@ -197,18 +197,8 @@ class AccountMoveLine(models.Model):
else: else:
self.credit = amount_company_currency self.credit = amount_company_currency
@api.multi analytic_account_id = fields.Many2one(
def show_account_move_form(self): domain=[('type', 'not in', ('view', 'template'))])
self.ensure_one()
action = self.env['ir.actions.act_window'].for_xml_id(
'account', 'action_move_line_form')
action.update({
'res_id': self.move_id.id,
'view_id': False,
'views': False,
'view_mode': 'form,tree',
})
return action
class AccountBankStatement(models.Model): class AccountBankStatement(models.Model):

View File

@@ -234,7 +234,6 @@ module -->
<field name="reconcile_ref" position="after"> <field name="reconcile_ref" position="after">
<field name="reconcile_id"/> <field name="reconcile_id"/>
<field name="reconcile_partial_id"/> <field name="reconcile_partial_id"/>
<button name="show_account_move_form" type="object" icon="STOCK_GO_FORWARD" string="Show Journal Entry"/>
</field> </field>
</field> </field>
</record> </record>