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:
@@ -197,18 +197,8 @@ class AccountMoveLine(models.Model):
|
||||
else:
|
||||
self.credit = amount_company_currency
|
||||
|
||||
@api.multi
|
||||
def show_account_move_form(self):
|
||||
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
|
||||
analytic_account_id = fields.Many2one(
|
||||
domain=[('type', 'not in', ('view', 'template'))])
|
||||
|
||||
|
||||
class AccountBankStatement(models.Model):
|
||||
|
||||
@@ -234,7 +234,6 @@ module -->
|
||||
<field name="reconcile_ref" position="after">
|
||||
<field name="reconcile_id"/>
|
||||
<field name="reconcile_partial_id"/>
|
||||
<button name="show_account_move_form" type="object" icon="STOCK_GO_FORWARD" string="Show Journal Entry"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user