-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] force compute of the field at creation
- Loading branch information
Showing
1 changed file
with
2 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
# @author Sébastien BEAU <[email protected]> | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models | ||
from odoo import api, fields, models | ||
|
||
|
||
class SaleOrderLine(models.Model): | ||
|
@@ -16,6 +16,7 @@ def _is_visible_in_shopinvader_api(self): | |
self.ensure_one() | ||
return True | ||
|
||
@api.depends("product_id") | ||
def _compute_visible_in_shopinvader_api(self): | ||
for record in self: | ||
record.visible_in_shopinvader_api = record._is_visible_in_shopinvader_api() |