Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Egypt E-Invoicing
Entity: account.move
Compute Method: _compute_eta_long_id
| Inputs | Method | Outputs |
|---|---|---|
|
- for rec in self: - response_data = rec.l10n_eg_eta_json_doc_file and json.loads(base64.b64decode(rec.l10n_eg_eta_json_doc_file)).get('response') - if response_data: - rec.l10n_eg_long_id = response_data.get('l10n_eg_long_id') - else: - rec.l10n_eg_long_id = False + for move in self: + last_submission = move.l10n_eg_eta_submission_ids[-1:] + move.l10n_eg_long_id = last_submission.eta_document_longid if last_submission else False |
|
