Fix
This commit is contained in:
parent
4bf13d93a1
commit
8971250f22
|
@ -6,6 +6,7 @@ from . import category
|
|||
from . import service_order
|
||||
from . import party
|
||||
from . import invoice
|
||||
from . import api_log
|
||||
|
||||
|
||||
def register():
|
||||
|
@ -20,6 +21,7 @@ def register():
|
|||
invoice.InvoiceLaboratoryOrder,
|
||||
invoice.Invoice,
|
||||
invoice.InvoiceLine,
|
||||
api_log.ApiLog,
|
||||
service_order.CreateInvoiceStart,
|
||||
module='laboratory', type_='model')
|
||||
Pool.register(
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from trytond.model import ModelView, ModelSQL, fields
|
||||
|
||||
|
||||
STATES = {'readonly': True}
|
||||
|
||||
|
||||
class ApiLog(ModelSQL, ModelView):
|
||||
"API Log"
|
||||
__name__ = "api.log"
|
||||
endpoint = fields.Char("Endpoint", states=STATES)
|
||||
number = fields.Char('Number Doc', states=STATES)
|
||||
record_date = fields.Date('Record Date', states=STATES)
|
||||
msg_response = fields.Char('Msg Response', states=STATES)
|
||||
request_json = fields.Text("Request Json", states=STATES)
|
||||
status = fields.Char('Status', states=STATES)
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super(ApiLog, cls).__setup__()
|
||||
cls._order.insert(0, ('record_date', 'DESC'))
|
|
@ -0,0 +1,68 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data>
|
||||
|
||||
<record model="ir.ui.view" id="api_log_view_tree">
|
||||
<field name="model">api.log</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="priority">20</field>
|
||||
<field name="name">api_log_tree</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="api_log_view_form">
|
||||
<field name="model">api.log</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">api_log_form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_api_log_tree">
|
||||
<field name="name">Api Log</field>
|
||||
<field name="res_model">api.log</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_api_log_tree_view1">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view" ref="api_log_view_tree"/>
|
||||
<field name="act_window" ref="act_api_log_tree"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_api_log_tree_view2">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view" ref="api_log_view_form"/>
|
||||
<field name="act_window" ref="act_api_log_tree"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_api_log_form">
|
||||
<field name="name">Api Log</field>
|
||||
<field name="res_model">api.log</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_api_log_form_view1">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view" ref="api_log_view_tree"/>
|
||||
<field name="act_window" ref="act_api_log_form"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_api_log_form_view2">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view" ref="api_log_view_form"/>
|
||||
<field name="act_window" ref="act_api_log_form"/>
|
||||
</record>
|
||||
<menuitem parent="menu_laboratory" sequence="2"
|
||||
action="act_api_log_tree" id="menu_api_log_tree"/>
|
||||
|
||||
<record model="ir.model.access" id="access_laboratory_api_log">
|
||||
<field name="model" search="[('model', '=', 'api.log')]"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_laboratory_api_log_admin">
|
||||
<field name="model" search="[('model', '=', 'api.log')]"/>
|
||||
<field name="group" ref="group_laboratory_admin"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="True"/>
|
||||
<field name="perm_create" eval="True"/>
|
||||
<field name="perm_delete" eval="True"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</tryton>
|
|
@ -12,3 +12,4 @@ xml:
|
|||
category.xml
|
||||
service_order.xml
|
||||
invoice.xml
|
||||
api_log.xml
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<form>
|
||||
<label name="endpoint"/>
|
||||
<field name="endpoint"/>
|
||||
<label name="number"/>
|
||||
<field name="number"/>
|
||||
<label name="record_date"/>
|
||||
<field name="record_date"/>
|
||||
<label name="msg_response"/>
|
||||
<field name="msg_response"/>
|
||||
<label name="status"/>
|
||||
<field name="status"/>
|
||||
<newline />
|
||||
<separator string="Request" id="request_json" colspan="4"/>
|
||||
<field name="request_json" colspan="4"/>
|
||||
</form>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tree>
|
||||
<field name="record_date"/>
|
||||
<field name="endpoint"/>
|
||||
<field name="number"/>
|
||||
<field name="msg_response"/>
|
||||
<field name="status"/>
|
||||
</tree>
|
Loading…
Reference in New Issue