Files
enterprise-addons/sale_renting_planning/__init__.py
T

14 lines
358 B
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import models
def uninstall_hook(env):
# remove plannings which are scheduled by rental sale order
env['planning.slot'] \
.search([
('sale_line_id', '!=', False),
('sale_line_id.is_rental', '=', True),
]) \
.unlink()