details: https://code.tryton.org/tryton/commit/e6e5d9c22571
branch: default
user: Cédric Krier <[email protected]>
date: Thu Jan 15 10:35:05 2026 +0100
description:
Add an "Update Status" button to the Peppol document
diffstat:
modules/edocument_peppol/CHANGELOG
| 1 +
modules/edocument_peppol/edocument.py
| 7 +++++++
modules/edocument_peppol/edocument.xml
| 6 ++++++
modules/edocument_peppol/view/edocument_peppol_form.xml
| 1 +
modules/edocument_peppol_peppyrus/tests/scenario_edocument_peppol_peppyrus.rst
| 6 +-----
5 files changed, 16 insertions(+), 5 deletions(-)
diffs (76 lines):
diff -r 804f49879043 -r e6e5d9c22571 modules/edocument_peppol/CHANGELOG
--- a/modules/edocument_peppol/CHANGELOG Wed Feb 04 15:26:34 2026 +0100
+++ b/modules/edocument_peppol/CHANGELOG Thu Jan 15 10:35:05 2026 +0100
@@ -1,3 +1,4 @@
+* Add an "Update Status" button to the Peppol document
Version 7.8.0 - 2025-12-15
--------------------------
diff -r 804f49879043 -r e6e5d9c22571 modules/edocument_peppol/edocument.py
--- a/modules/edocument_peppol/edocument.py Wed Feb 04 15:26:34 2026 +0100
+++ b/modules/edocument_peppol/edocument.py Thu Jan 15 10:35:05 2026 +0100
@@ -146,6 +146,12 @@
'invisible': ~Eval('state').in_(['submitted', 'processing']),
'depends': ['state'],
},
+ update_status={
+ 'invisible': (
+ (Eval('state') != 'processing')
+ | (Eval('direction') != 'out')),
+ 'depends': ['state', 'direction'],
+ },
retry={
'invisible': Eval('state') != 'failed',
'depends': ['state'],
@@ -230,6 +236,7 @@
self.succeed()
@classmethod
+ @ModelView.button
def update_status(cls, documents=None):
if documents is None:
documents = cls.search([
diff -r 804f49879043 -r e6e5d9c22571 modules/edocument_peppol/edocument.xml
--- a/modules/edocument_peppol/edocument.xml Wed Feb 04 15:26:34 2026 +0100
+++ b/modules/edocument_peppol/edocument.xml Thu Jan 15 10:35:05 2026 +0100
@@ -138,6 +138,12 @@
<field name="string">Process</field>
</record>
+ <record model="ir.model.button"
id="edocument_peppol_update_status_button">
+ <field name="model">edocument.peppol</field>
+ <field name="name">update_status</field>
+ <field name="string">Update Status</field>
+ </record>
+
<record model="ir.model.button" id="edocument_peppol_retry_button">
<field name="model">edocument.peppol</field>
<field name="name">retry</field>
diff -r 804f49879043 -r e6e5d9c22571
modules/edocument_peppol/view/edocument_peppol_form.xml
--- a/modules/edocument_peppol/view/edocument_peppol_form.xml Wed Feb 04
15:26:34 2026 +0100
+++ b/modules/edocument_peppol/view/edocument_peppol_form.xml Thu Jan 15
10:35:05 2026 +0100
@@ -35,6 +35,7 @@
<button name="draft" icon="tryton-back"/>
<button name="submit" icon="tryton-forward"/>
<button name="process"/>
+ <button name="update_status"/>
<button name="retry" icon="tryton-launch"/>
</group>
</form>
diff -r 804f49879043 -r e6e5d9c22571
modules/edocument_peppol_peppyrus/tests/scenario_edocument_peppol_peppyrus.rst
---
a/modules/edocument_peppol_peppyrus/tests/scenario_edocument_peppol_peppyrus.rst
Wed Feb 04 15:26:34 2026 +0100
+++
b/modules/edocument_peppol_peppyrus/tests/scenario_edocument_peppol_peppyrus.rst
Thu Jan 15 10:35:05 2026 +0100
@@ -67,12 +67,8 @@
Check Peppol status::
- >>> cron, = Cron.find([
- ... ('method', '=', 'edocument.peppol|update_status'),
- ... ], limit=1)
>>> while peppol.state == 'processing':
- ... cron.click('run_once')
- ... peppol.reload()
+ ... peppol.click('update_status')
>>> peppol.state
'succeeded'