# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, models class MembershipLine(models.Model): _inherit = "membership.membership_line" @api.model_create_multi def create(self, vals_list): res = super().create(vals_list) for line in res: discount = line.account_invoice_line.discount if discount: line.member_price *= discount / 100.0 return res