diff options
| author | Luis Torres <luis_t@vauxoo.com> | 2019-08-15 19:10:44 +0000 |
|---|---|---|
| committer | Luis Torres <luis_t@vauxoo.com> | 2019-08-21 15:07:23 +0000 |
| commit | b4ef0299db0e1ba5073cebd99abf6720c142671d (patch) | |
| tree | 9e9a78c4975905ab1847f9ef3eed8e3af7e56b1f | |
| parent | 4a771a6763fa2baf13e4097b0258f9ce54995a3b (diff) | |
[FIX] account: Remove supplier/customer in default_partner_type
The fields supplier/customer was removed from the partner, then, they
cannot be used in the default for the views.
Avoid the next traceback in the next case:
'''raise ValueError("Invalid field %r in leaf %r" % (left, str(leaf)))
ValueError: Invalid field 'supplier' in leaf "<osv.ExtendedLeaf: ('supplier', '=', True) on res_partner (ctx: )>"```
1. Go to create a new payment for supplier
2. Try select the supplier
closes odoo/odoo#35743
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
| -rw-r--r-- | addons/account/models/account_payment.py | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/addons/account/models/account_payment.py b/addons/account/models/account_payment.py index ff41ca762ff..9e86f393793 100644 --- a/addons/account/models/account_payment.py +++ b/addons/account/models/account_payment.py @@ -213,13 +213,6 @@ class account_payment(models.Model): self.partner_bank_account_id = False return {'domain': {'partner_bank_account_id': [('partner_id', 'in', [self.partner_id.id, self.partner_id.commercial_partner_id.id])]}} - @api.onchange('partner_type') - def _onchange_partner_type(self): - self.ensure_one() - # Set partner_id domain - if self.partner_type: - return {'domain': {'partner_id': [(self.partner_type, '=', True)]}} - @api.onchange('payment_type') def _onchange_payment_type(self): if not self.invoice_ids and not self.partner_type: |
