Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] Spostamento codice per migliorare disaccoppiamento #3207

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions l10n_it_fatturapa_out/models/attachment.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ class FatturaPAAttachment(models.Model):
default="ready",
tracking=True,
)
sending_user = fields.Many2one(
comodel_name="res.users",
string="Sending User",
readonly=True,
)
sending_date = fields.Datetime("Sent Date", readonly=True)
delivered_date = fields.Datetime("Delivered Date", readonly=True)

Expand Down
25 changes: 25 additions & 0 deletions l10n_it_fatturapa_out/views/attachment_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,31 @@
</field>
</group>
</group>
<div name="creation_div" position="after">
<label
for="sending_user"
string="Sent by"
attrs="{'invisible': [('sending_user' ,'=', False)]}"
/>
<div
name="sending_user"
attrs="{'invisible': [('sending_user' ,'=', False)]}"
>
<field name="sending_user" readonly="1" class="oe_inline" /> on
<field name="sending_date" readonly="1" class="oe_inline" />
</div>
<label
for="delivered_date"
string="Delivered"
attrs="{'invisible': [('delivered_date' ,'=', False)]}"
/>
<div
name="delivered_date"
attrs="{'invisible': [('delivered_date' ,'=', False)]}"
>
<field name="delivered_date" readonly="1" class="oe_inline" />
</div>
</div>
</field>
</record>

Expand Down
1 change: 0 additions & 1 deletion l10n_it_fatturapa_pec/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
],
"data": [
"security/ir.model.access.csv",
"views/fatturapa_attachment_out.xml",
"views/fetchmail_view.xml",
"views/company_view.xml",
"views/sdi_view.xml",
Expand Down
2 changes: 0 additions & 2 deletions l10n_it_fatturapa_pec/models/fatturapa_attachment_out.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
class FatturaPAAttachmentOut(models.Model):
_inherit = "fatturapa.attachment.out"

sending_user = fields.Many2one("res.users", "Sending User", readonly=True)

def _message_type_ns(
self, root, id_sdi, message_id, receipt_dt, fatturapa_attachment_out
):
Expand Down
48 changes: 0 additions & 48 deletions l10n_it_fatturapa_pec/views/fatturapa_attachment_out.xml

This file was deleted.

9 changes: 9 additions & 0 deletions l10n_it_sdi_channel/views/fatturapa_attachment_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@
type="object"
/>
</header>
<page name="history" position="inside">
<group
name="last_sdi_response"
string="Last Response from Exchange System"
attrs="{'invisible':[('state', '=', 'ready')]}"
>
<field name="last_sdi_response" nolabel="1" />
</group>
</page>
</field>
</record>
</odoo>