mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[ADD] Checkin logo in res_compay information
This commit is contained in:
committed by
Dario Lodeiros
parent
4b8aa81ee3
commit
4131edb896
@@ -19,7 +19,16 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
from openerp import models, fields, api
|
||||
import base64
|
||||
from odoo import models, fields
|
||||
from odoo import modules
|
||||
|
||||
|
||||
def get_default_img():
|
||||
with open(modules.get_module_resource('hotel_l10n_es', 'static/src/img',
|
||||
'logo_bn.png'),
|
||||
'rb') as f:
|
||||
return base64.b64encode(f.read())
|
||||
|
||||
|
||||
class Inherit_res_company(models.Model):
|
||||
@@ -28,19 +37,21 @@ class Inherit_res_company(models.Model):
|
||||
property_name = fields.Char('Property name',
|
||||
help='Name of the Hotel/Property.')
|
||||
ine_tourism = fields.Char('Tourism number',
|
||||
help='Registration number in the Ministry of \
|
||||
help='Registration number in the Ministry of \
|
||||
Tourism. Used for INE statistics.')
|
||||
ine_rooms = fields.Integer('Rooms Available', default=0,
|
||||
help='Used for INE statistics.')
|
||||
help='Used for INE statistics.')
|
||||
ine_seats = fields.Integer('Beds available', default=0,
|
||||
help='Used for INE statistics.')
|
||||
help='Used for INE statistics.')
|
||||
ine_permanent_staff = fields.Integer('Permanent Staff', default=0,
|
||||
help='Used for INE statistics.')
|
||||
help='Used for INE statistics.')
|
||||
ine_eventual_staff = fields.Integer('Eventual Staff', default=0,
|
||||
help='Used for INE statistics.')
|
||||
help='Used for INE statistics.')
|
||||
police_number = fields.Char('Police number', size=10,
|
||||
help='Used to generate the name of the file that \
|
||||
will be given to the police. 10 Caracters')
|
||||
help='Used to generate the name of the file that \
|
||||
will be given to the police. 10 Caracters')
|
||||
ine_category_id = fields.Many2one('tourism.category',
|
||||
help='Hotel category in the Ministry of \
|
||||
help='Hotel category in the Ministry of \
|
||||
Tourism. Used for INE statistics.')
|
||||
checkin_img = fields.Binary(string="Image in checkin",
|
||||
default=get_default_img())
|
||||
|
||||
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- Hotel Settings -->
|
||||
<record id="view_company_form" model="ir.ui.view">
|
||||
<field name="name">view.company.form</field>
|
||||
<field name="model">res.company</field>
|
||||
@@ -18,6 +19,7 @@
|
||||
<field name="ine_eventual_staff" />
|
||||
<field name="police_number" />
|
||||
<field name="cardex_warning" />
|
||||
<field name="checkin_img" widget="image" class="oe_avatar"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
<div class="container-fluid" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<div class="row cabezera" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<div class="col-md-12 text-center" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<img src='/hotel_l10n_es/static/src/img/logo_alda_bn.png'
|
||||
style="width:100%; max-heigth:50px; margin:0 0 1em 0;"/>
|
||||
<img t-attf-src="data:image/*;base64,{{company.checkin_img}}" t-att-alt="company.name" />
|
||||
<p style="font-size:1.16em;">PART OF TRAVELERS ENTRY</p>
|
||||
<p class="numerocheck">Document number: <strong><span t-field="o.id"/></strong>/
|
||||
<span t-if="o.reservation_id.room_id.description_sale"><span t-field="o.reservation_id.folio_id"/> ( <span t-field="o.reservation_id.room_id.description_sale"/>)</span>
|
||||
|
||||
Reference in New Issue
Block a user