-
Notifications
You must be signed in to change notification settings - Fork 12
/
account_move.py
36 lines (26 loc) · 993 Bytes
/
account_move.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
import re
from odoo import api, fields, models, tools, _
from odoo.exceptions import UserError, ValidationError
from odoo.osv import expression
from odoo.tools import float_compare
_logger = logging.getLogger(__name__)
class AccountMoveLine(models.Model):
_inherit = "account.move.line"
_inherit = "product.category"
# chemical_tax = fields.Float(string="Chemical tax", help="Chemical tax for products in this category", readonly=True)
"""
product_id = fields.Many2one(
comodel_name="product.product",
readonly=True,
)
price_with_chemtax = fields.Many2one(
comodel_name="product.product",
readonly=True,
)
@api.depends('price_unit', 'categ_id.chemical_tax')
def _get_price_reduce(self):
for line in self:
line.price_reduce = line.price_unit * (1.0 - line.discount / 100.0) """