robin.keunen
4 years ago
7 changed files with 51 additions and 19 deletions
-
1easy_my_coop_api/models/__init__.py
-
17easy_my_coop_api/models/external_id_mixin.py
-
18easy_my_coop_api/models/subscription_request.py
-
2easy_my_coop_api/services/subscription_request_service.py
-
22easy_my_coop_api/tests/test_account_invoice.py
-
2easy_my_coop_api/tests/test_subscription_requests.py
-
8easy_my_coop_connector/components/emc_backend.py
@ -1,2 +1,3 @@ |
|||
from . import auth_api_key |
|||
from . import external_id_mixin |
|||
from . import subscription_request |
@ -0,0 +1,18 @@ |
|||
# Copyright 2020 Coop IT Easy SCRL fs |
|||
# Robin Keunen <robin@coopiteasy.be> |
|||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
|||
|
|||
from odoo import api, models |
|||
from odoo.fields import Datetime |
|||
|
|||
|
|||
class SubscriptionRequest(models.Model): |
|||
_name = "subscription.request" |
|||
_inherit = ["subscription.request", "external.id.mixin"] |
|||
|
|||
@api.multi |
|||
def _timestamp_export(self): |
|||
self.write({"last_api_export_date": Datetime.now()}) |
|||
self.filtered(lambda sr: not sr.first_api_export_date).write( |
|||
{"first_api_export_date": Datetime.now()} |
|||
) |
Write
Preview
Loading…
Cancel
Save
Reference in new issue