changes
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_move_form_inherit_fusion_ocr" model="ir.ui.view">
|
||||
<field name="name">account.move.form.inherit.fusion_ocr</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form"/>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
<xpath expr="//header" position="inside">
|
||||
<button name="action_request_ocr"
|
||||
type="object"
|
||||
string="Request OCR"
|
||||
class="oe_highlight"
|
||||
invisible="move_type not in ('in_invoice', 'in_refund') or ocr_state in ('processing', 'done')"/>
|
||||
<button name="action_request_ocr"
|
||||
type="object"
|
||||
string="Re-run OCR"
|
||||
invisible="move_type not in ('in_invoice', 'in_refund') or ocr_state not in ('done', 'failed', 'manual')"/>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//sheet" position="inside">
|
||||
<group string="Fusion OCR"
|
||||
invisible="move_type not in ('in_invoice', 'in_refund') or ocr_state == 'not_requested'">
|
||||
<group>
|
||||
<field name="ocr_state" widget="badge"
|
||||
decoration-success="ocr_state == 'done'"
|
||||
decoration-info="ocr_state == 'processing'"
|
||||
decoration-warning="ocr_state == 'manual'"
|
||||
decoration-danger="ocr_state == 'failed'"/>
|
||||
<field name="ocr_backend" readonly="1"/>
|
||||
<field name="ocr_confidence" readonly="1" widget="percentage"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="ocr_extracted_data" readonly="1" widget="text"/>
|
||||
</group>
|
||||
<field name="ocr_raw_text" readonly="1" nolabel="1"
|
||||
placeholder="Raw OCR text..."/>
|
||||
</group>
|
||||
</xpath>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="res_config_settings_view_form_inherit_fusion_ocr" model="ir.ui.view">
|
||||
<field name="name">res.config.settings.view.form.inherit.fusion_ocr</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="account.res_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
<xpath expr="//block[@id='account_vendor_bills']" position="after">
|
||||
<block title="Fusion Invoice OCR" id="fusion_ocr_section">
|
||||
<setting id="fusion_ocr_enabled_setting"
|
||||
string="Enable Invoice OCR"
|
||||
help="OCR vendor bill attachments via the configured backend.">
|
||||
<field name="fusion_ocr_enabled"/>
|
||||
<div class="content-group" invisible="not fusion_ocr_enabled">
|
||||
<div class="mt16">
|
||||
<label for="fusion_ocr_default_backend"
|
||||
string="Default OCR Backend" class="o_light_label"/>
|
||||
<field name="fusion_ocr_default_backend"/>
|
||||
</div>
|
||||
<div class="mt16">
|
||||
<field name="fusion_ocr_auto_run"/>
|
||||
<label for="fusion_ocr_auto_run"
|
||||
string="Auto-run OCR on attachment"/>
|
||||
</div>
|
||||
</div>
|
||||
</setting>
|
||||
</block>
|
||||
</xpath>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user