This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from odoo import models, fields, api | |
class OCRReceipt(models.Model): | |
_name = 'thaiocr.receipt' | |
_description = 'Thai OCR Module' | |
_order = 'date_billed desc, name' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- custom search --> | |
<record model="ir.ui.view" id="thaiocr_search"> | |
<field name="name">Thai OCR Search</field> | |
<field name="model">thaiocr.receipt</field> | |
<field name="arch" type="xml"> | |
<search> | |
<field name="name"/> | |
<field name="purchaser_id"/> | |
<filter string="No Purchaser" | |
name="without_purchaser" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- explicit form view definition --> | |
<record model="ir.ui.view" id="thaiocr_form"> | |
<field name="name">Thai OCR</field> | |
<field name="model">thaiocr.receipt</field> | |
<field name="arch" type="xml"> | |
<form> | |
<group> | |
<field name="name"/> | |
<field name="product_ids"/> | |
</group> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<record model="ir.ui.view" id="thaiocr_list"> | |
<field name="name">Thai OCR</field> | |
<field name="model">thaiocr.receipt</field> | |
<field name="arch" type="xml"> | |
<tree> | |
<field name="name"/> | |
<field name="store_id"/> | |
<field name="date_billed"/> | |
<field name="purchaser_id"/> | |
</tree> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- actions opening views on models --> | |
<record model="ir.actions.act_window" id="thaiocr_action_window"> | |
<field name="name">Thai OCR</field> | |
<field name="res_model">thaiocr.receipt</field> | |
<field name="view_mode">tree,form</field> | |
</record> | |
<!-- Top menu item --> | |
<menuitem name="Thai OCR" id="thaiocr_menu_root" action="thaiocr_action_window"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OCRReceipt(models.Model): | |
_name = 'thaiocr.receipt' | |
name = fields.Char('Receipt Title', required=True) | |
date_billed = fields.Date('Billed On') | |
store_id = fields.Many2one('res.partner', | |
string='Store', | |
index=True) | |
purchaser_id = fields.Many2one('res.partner', | |
string='Purchaser', | |
index=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[options] | |
# | |
# WARNING: | |
# If you use the Odoo Database utility to change the master password be aware | |
# that the formatting of this file WILL be LOST! A copy of this file named | |
# /etc/odoo/openerp-server.conf.template has been made in case this happens | |
# Note that the copy does not have any first boot changes | |
#----------------------------------------------------------------------------- | |
# Odoo Server Config File - TurnKey Linux |