forked from OpenG2P/openg2p-program
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ODK Importer: Fixed Program enrollement issue
Signed-off-by: Manoj Kumar <[email protected]>
- Loading branch information
Showing
5 changed files
with
25 additions
and
21 deletions.
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Part of Newlogic G2P. See LICENSE file for full copyright and licensing details. | ||
|
||
from . import odk_client | ||
from . import odk_config | ||
from . import odk_import |
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from odoo import api, fields, models | ||
|
||
|
||
class OdkImport(models.Model): | ||
_inherit = "odk.import" | ||
|
||
target_program = fields.Many2one("g2p.program", domain="[('target_type', '=', target_registry)]") | ||
|
||
@api.onchange("target_registry") | ||
def onchange_target_registry(self): | ||
for rec in self: | ||
rec.target_program = None |
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