mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[FIX] Filter payment modes for sales
This commit is contained in:
@@ -8,7 +8,7 @@ class AccountAnalyticAccount(models.Model):
|
|||||||
payment_mode_id = fields.Many2one(
|
payment_mode_id = fields.Many2one(
|
||||||
'payment.mode',
|
'payment.mode',
|
||||||
string='Payment Mode',
|
string='Payment Mode',
|
||||||
domain="[('type', '=', 'sale')]")
|
domain="[('sale_ok', '=', True)]")
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def on_change_partner_id(self, partner_id, name):
|
def on_change_partner_id(self, partner_id, name):
|
||||||
@@ -23,8 +23,7 @@ class AccountAnalyticAccount(models.Model):
|
|||||||
@api.model
|
@api.model
|
||||||
def _prepare_invoice_data(self, contract):
|
def _prepare_invoice_data(self, contract):
|
||||||
invoice_vals = super(AccountAnalyticAccount, self).\
|
invoice_vals = super(AccountAnalyticAccount, self).\
|
||||||
_prepare_invoice_data(
|
_prepare_invoice_data(contract)
|
||||||
contract)
|
|
||||||
if contract.payment_mode_id:
|
if contract.payment_mode_id:
|
||||||
invoice_vals['payment_mode_id'] = contract.payment_mode_id.id
|
invoice_vals['payment_mode_id'] = contract.payment_mode_id.id
|
||||||
invoice_vals['partner_bank_id'] = \
|
invoice_vals['partner_bank_id'] = \
|
||||||
|
|||||||
Reference in New Issue
Block a user