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 #3206

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 @@ -34,6 +34,11 @@ class FatturaPAAttachment(models.Model):
default='ready',
track_visibility='onchange'
)
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
11 changes: 11 additions & 0 deletions l10n_it_fatturapa_out/views/attachment_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,17 @@
</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 @@ -23,7 +23,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
4 changes: 1 addition & 3 deletions l10n_it_fatturapa_pec/models/fatturapa_attachment_out.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import logging
import re

from odoo import api, fields, models, _
from odoo import api, models, _
from odoo.exceptions import UserError

_logger = logging.getLogger(__name__)
Expand All @@ -18,8 +18,6 @@
class FatturaPAAttachmentOut(models.Model):
_inherit = 'fatturapa.attachment.out'

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

@api.multi
def parse_pec_response(self, message_dict):
message_dict['model'] = self._name
Expand Down
27 changes: 0 additions & 27 deletions l10n_it_fatturapa_pec/views/fatturapa_attachment_out.xml

This file was deleted.

5 changes: 5 additions & 0 deletions l10n_it_sdi_channel/views/fatturapa_attachment_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
<button name="send_to_sdi" states="ready" string="Send to SdI" type="object" class="oe_highlight"/>
<button name="reset_to_ready" states="sender_error" string="Reset to ready" 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>