flectra/addons/sale_expense/models/product_template.py
2018-01-16 02:34:37 -08:00

14 lines
369 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
from flectra import api, models
class ProductTemplate(models.Model):
_inherit = "product.template"
@api.onchange('can_be_expensed')
def _onchange_can_be_expensed(self):
if not self.can_be_expensed:
self.expense_policy = 'no'