[IMP] account: Don't allow Invoice creation from Payment
Fixes https://github.com/odoo/odoo/issues/38233 New Invoices shouldn't be created from Payment screen. closes odoo/odoo#38687 X-original-commit: 44226ec450e09d7893c5c3ca0d0d8e6533ccc246 Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
This commit is contained in:
@@ -428,6 +428,7 @@ class account_payment(models.Model):
|
||||
'views': [(self.env.ref('account.view_move_tree').id, 'tree'), (self.env.ref('account.view_move_form').id, 'form')],
|
||||
'type': 'ir.actions.act_window',
|
||||
'domain': [('id', 'in', [x.id for x in self.reconciled_invoice_ids])],
|
||||
'context': {'create': False},
|
||||
}
|
||||
|
||||
def unreconcile(self):
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
groups="account.group_account_user"
|
||||
attrs="{'invisible':[('move_line_ids','=',[])]}" icon="fa-bars"/>
|
||||
<field name="move_line_ids" invisible="1"/>
|
||||
<button class="oe_stat_button" name="button_invoices" type="object" icon="fa-bars">
|
||||
<button class="oe_stat_button" name="button_invoices" type="object" icon="fa-bars" attrs="{'invisible':[('reconciled_invoices_count','=', 0)]}" >
|
||||
<field name="reconciled_invoices_count"/>
|
||||
<span attrs="{'invisible':[('reconciled_invoices_count','>',1)]}">Invoice</span>
|
||||
<span attrs="{'invisible':[('reconciled_invoices_count','<=',1)]}">Invoices</span>
|
||||
|
||||
Reference in New Issue
Block a user