Refactory 06

This commit is contained in:
Oscar 2021-10-09 12:49:43 -05:00
parent c25314760c
commit f26cf50bca
5 changed files with 159 additions and 193 deletions

View File

@ -6,7 +6,9 @@ from datetime import datetime, timedelta
from decimal import Decimal from decimal import Decimal
from trytond.model import Workflow, ModelView, ModelSQL, fields from trytond.model import Workflow, ModelView, ModelSQL, fields
from trytond.wizard import Wizard, StateView, Button, StateTransition, StateReport from trytond.wizard import (
Wizard, StateView, Button, StateTransition, StateReport
)
from trytond.report import Report from trytond.report import Report
from trytond.pyson import Eval, If, In, Get, Not, Or, Equal, Bool from trytond.pyson import Eval, If, In, Get, Not, Or, Equal, Bool
from trytond.transaction import Transaction from trytond.transaction import Transaction
@ -15,7 +17,7 @@ from trytond.exceptions import UserError
from trytond.i18n import gettext from trytond.i18n import gettext
from constants import ( from constants import (
STATE_BOOKING, REGISTRATION_STATE, SEGMENT, GUARANTEE, SATISFACTION, STATE_BOOKING, REGISTRATION_STATE, SEGMENT, GUARANTEE, SATISFACTION,
MEDIA, PLAN, SOURCE, INVOICE_METHOD, COMPLEMENTARY, INVOICE_STATES, MEDIA, PLAN, SOURCE, INVOICE_METHOD, COMPLEMENTARY,
) )
STATES = { STATES = {
@ -145,13 +147,14 @@ class Booking(Workflow, ModelSQL, ModelView):
)) ))
cls._buttons.update({ cls._buttons.update({
'select_rooms': { 'select_rooms': {
'invisible': Eval('state') != 'offer', 'invisible': Eval('state').in_(['finished', 'cancelled', 'not_show']),
}, },
'create_guest': { 'create_guest': {
'invisible': Eval('state') != 'offer', 'invisible': Eval('state') != 'offer',
}, },
'cancel': { 'cancel': {
'invisible': Eval('state').in_(['cancel', '']) 'invisible': Eval('state').in_(
['cancelled', 'not_show', 'finished'])
}, },
'offer': { 'offer': {
'invisible': Eval('state').in_(['offer', 'confirmed']) 'invisible': Eval('state').in_(['offer', 'confirmed'])
@ -163,8 +166,7 @@ class Booking(Workflow, ModelSQL, ModelView):
'invisible': Eval('state') != 'confirmed', 'invisible': Eval('state') != 'confirmed',
}, },
'pay_advance': { 'pay_advance': {
'invisible': 'invisible': Eval('state').in_(['finished', 'cancelled']),
Eval('registration_state').in_(['check_out', 'offer']),
}, },
'send_email': { 'send_email': {
'invisible': Eval('state') != 'confirmed' 'invisible': Eval('state') != 'confirmed'
@ -248,15 +250,13 @@ class Booking(Workflow, ModelSQL, ModelView):
@ModelView.button @ModelView.button
@Workflow.transition('offer') @Workflow.transition('offer')
def offer(cls, records): def offer(cls, records):
for record in records: pass
record.delete_occupancy()
@classmethod @classmethod
@ModelView.button @ModelView.button
@Workflow.transition('cancelled') @Workflow.transition('cancelled')
def cancel(cls, records): def cancel(cls, records):
for record in records: pass
record.cancel_occupancy()
@classmethod @classmethod
@ModelView.button @ModelView.button
@ -302,18 +302,6 @@ class Booking(Workflow, ModelSQL, ModelView):
number = config.booking_sequence.get() number = config.booking_sequence.get()
cls.write([booking], {'number': number}) cls.write([booking], {'number': number})
def cancel_occupancy(self):
Operation = Pool().get('hotel.operation')
ops = Operation.search([('origin', '=', str(self))])
if ops:
Operation.cancel(ops)
def delete_occupancy(self):
Operation = Pool().get('hotel.operation')
for l in self.lines:
if l.operation:
Operation.delete([l.operation])
def update_folio(self, state): def update_folio(self, state):
Line = Pool().get('hotel.folio') Line = Pool().get('hotel.folio')
Line.write(list(self.lines), {'registration_state': state}) Line.write(list(self.lines), {'registration_state': state})

View File

@ -198,70 +198,6 @@ this repository contains the full copyright notices and license terms. -->
<field name="perm_delete" eval="True"/> <field name="perm_delete" eval="True"/>
</record> </record>
<record model="ir.ui.view" id="board_folio_view_tree">
<field name="model">hotel.folio</field>
<field name="type">tree</field>
<field name="name">board_folio_tree</field>
</record>
<record model="ir.ui.view" id="board_folio_view_form">
<field name="model">hotel.folio</field>
<field name="type">form</field>
<field name="name">board_folio_form</field>
</record>
<record model="ir.action.act_window" id="act_board_folio_view">
<field name="name">Board Folios</field>
<field name="res_model">hotel.folio</field>
<field name="search_value"
eval="[('create_date', '>=', DateTime(hour=0, minute=0, second=0, microsecond=0, delta_years=-1))]"
pyson="1"/>
</record>
<record model="ir.action.act_window.view" id="act_hotel_board_folio_tree_view">
<field name="sequence" eval="1"/>
<field name="view" ref="board_folio_view_tree"/>
<field name="act_window" ref="act_board_folio_view"/>
</record>
<record model="ir.action.act_window.view" id="act_hotel_board_folio_form_view">
<field name="sequence" eval="2"/>
<field name="view" ref="board_folio_view_form"/>
<field name="act_window" ref="act_board_folio_view"/>
</record>
<menuitem parent="menu_booking_form" sequence="30"
action="act_board_folio_view" id="menu_hotel_board_folio"/>
<record model="ir.action.act_window.domain" id="act_guest_moves_form_domain_arriving_today">
<field name="name">Arriving Today</field>
<field name="sequence" eval="50"/>
<field name="domain" eval="[
('arrival_date', '=', Date()),
]" pyson="1"/>
<field name="act_window" ref="act_board_folio_view"/>
</record>
<record model="ir.action.act_window.domain" id="act_guest_moves_form_domain_leaving_today">
<field name="name">Leaving Today</field>
<field name="sequence" eval="70"/>
<field name="domain" eval="[
('departure_date', '=', Date()),
]" pyson="1"/>
<field name="act_window" ref="act_board_folio_view"/>
</record>
<record model="ir.action.act_window.domain" id="act_guest_moves_form_domain_no_show_today">
<field name="name">No Show Yesterday</field>
<field name="sequence" eval="90"/>
<field name="domain" eval="[
('arrival_date', '=', Date()),
('booking.registration_state', 'in', ['no_show']),
]" pyson="1"/>
<field name="act_window" ref="act_board_folio_view"/>
</record>
<record model="ir.action.act_window.domain" id="act_guest_moves_form_domain_all">
<field name="name">All</field>
<field name="sequence" eval="90"/>
<field name="domain" eval="[
('arrival_date', '>=', Date()),
]" pyson="1"/>
<field name="act_window" ref="act_board_folio_view"/>
</record>
<!-- <record model="ir.action.act_window" id="act_open_booking_sales_form"> <!-- <record model="ir.action.act_window" id="act_open_booking_sales_form">
<field name="name">Sales</field> <field name="name">Sales</field>
<field name="res_model">sale.sale</field> <field name="res_model">sale.sale</field>

148
folio.py
View File

@ -126,16 +126,32 @@ class Folio(ModelSQL, ModelView):
], ],
cls._buttons.update({ cls._buttons.update({
'check_in': { 'check_in': {
'invisible': Eval('registration_state').in_(['check_in', 'check_out']), 'invisible': Eval('registration_state') != 'pending',
}, },
'check_out': { 'check_out': {
'invisible': Eval('registration_state').in_(['check_out', 'pending']), 'invisible': Eval('registration_state') != 'check_in',
}, },
'bill': { 'bill': {
'invisible': Eval('registration_state') != 'check_out', 'invisible': Eval('registration_state') != 'check_out',
} }
}) })
@classmethod
def search_rec_name(cls, name, clause):
_, operator, value = clause
if operator.startswith('!') or operator.startswith('not '):
bool_op = 'AND'
else:
bool_op = 'OR'
domain = [
bool_op,
('main_guest', operator, value),
('registration_card', operator, value),
('product.name', operator, value),
('party.name', operator, value),
]
return domain
@classmethod @classmethod
@ModelView.button @ModelView.button
def check_in(cls, records): def check_in(cls, records):
@ -1462,11 +1478,6 @@ class OperationMaintenance(Workflow, ModelSQL, ModelView):
}, },
}) })
@classmethod
def trigger_create(cls, records):
for mant in records:
mant.create_operation()
@staticmethod @staticmethod
def default_kind(): def default_kind():
return 'maintenance' return 'maintenance'
@ -1493,35 +1504,14 @@ class OperationMaintenance(Workflow, ModelSQL, ModelView):
@Workflow.transition('confirmed') @Workflow.transition('confirmed')
def confirm(cls, records): def confirm(cls, records):
for mant in records: for mant in records:
mant.update_operation({'state': 'confirmed'}) pass
@classmethod @classmethod
@ModelView.button @ModelView.button
@Workflow.transition('finished') @Workflow.transition('finished')
def finish(cls, records): def finish(cls, records):
for mant in records: for mant in records:
mant.update_operation({'state': 'finished'}) pass
def delete_operation(self):
Operation = Pool().get('hotel.operation')
Operation.delete([self.operation])
def create_operation(self):
Operation = Pool().get('hotel.operation')
values = {
'kind': 'maintenance',
'room': self.room,
'start_date': self.start_date,
'end_date': self.end_date,
'state': self.state,
'origin': str(self)
}
operation, = Operation.create([values])
self.write([self], {'operation': operation.id})
def update_operation(self, values):
Operation = Pool().get('hotel.operation')
Operation.write([self.operation], values)
@classmethod @classmethod
def write(cls, records, values): def write(cls, records, values):
@ -1788,13 +1778,13 @@ class ChangeRoomStart(ModelView):
class ChangeRoom(Wizard): class ChangeRoom(Wizard):
'Change Room' 'Change Room'
__name__ = 'hotel.operation.change_room' __name__ = 'hotel.folio.change_room'
""" """
this is the wizard that allows the front desk employee to transfer this is the wizard that allows the front desk employee to transfer
original room, and create a new operation occupany. original room, and create a new operation occupany.
""" """
start = StateView('hotel.operation.change_room.ask', start = StateView('hotel.folio.change_room.ask',
'hotel.operation_change_room_view_form', [ 'hotel.folio_change_room_view_form', [
Button('Cancel', 'end', 'tryton-cancel'), Button('Cancel', 'end', 'tryton-cancel'),
Button('Change', 'change', 'tryton-ok'), Button('Change', 'change', 'tryton-ok'),
] ]
@ -1803,9 +1793,9 @@ class ChangeRoom(Wizard):
def transition_change(self): def transition_change(self):
pool = Pool() pool = Pool()
Operation = pool.get('hotel.operation') Folio = pool.get('hotel.folio')
FolioCharge = pool.get('hotel.folio.charge') FolioCharge = pool.get('hotel.folio.charge')
operation = Operation(Transaction().context.get('active_id')) operation = Folio(Transaction().context.get('active_id'))
new_operation = { new_operation = {
'reference': operation.reference, 'reference': operation.reference,
@ -1824,26 +1814,26 @@ class ChangeRoom(Wizard):
'lines': [] 'lines': []
} }
lines_to_transfer = [] lines_to_transfer = []
_operation, = Operation.create([new_operation]) # _operation, = Operation.create([new_operation])
if self.start.tranfer_charges: # if self.start.tranfer_charges:
for line in operation.lines: # for line in operation.lines:
if line.state is None: # if line.state is None:
lines_to_transfer.append(line) # lines_to_transfer.append(line)
#
if lines_to_transfer: # if lines_to_transfer:
FolioCharge.write([lines_to_transfer], {'operation': _operation.id}) # FolioCharge.write([lines_to_transfer], {'operation': _operation.id})
#
operation.end_date = self.start.from_date # operation.end_date = self.start.from_date
operation.state = 'closed' # operation.state = 'closed'
operation.target = _operation.id # operation.target = _operation.id
operation.save() # operation.save()
return 'end' return 'end'
class TransferOperationStart(ModelView): class TransferOperationStart(ModelView):
'Transfer Operation' 'Transfer Operation'
__name__ = 'hotel.operation.transfer_operation.ask' __name__ = 'hotel.folio.transfer_operation.ask'
operation = fields.Many2One('hotel.operation', 'Operation', folio = fields.Many2One('hotel.folio', 'Folio',
required=True, domain=[ required=True, domain=[
('state', 'in', ['draft', 'open']), ('state', 'in', ['draft', 'open']),
]) ])
@ -1856,13 +1846,13 @@ class TransferOperationStart(ModelView):
class TransferOperation(Wizard): class TransferOperation(Wizard):
'Transfer Operation' 'Transfer Operation'
__name__ = 'hotel.operation.transfer_operation' __name__ = 'hotel.folio.transfer_operation'
""" """
this is the wizard that allows the front desk employee to transfer this is the wizard that allows the front desk employee to transfer
original room, and create a new operation occupany. original room, and create a new operation occupany.
""" """
start = StateView('hotel.operation.transfer_operation.ask', start = StateView('hotel.folio.transfer_operation.ask',
'hotel.operation_transfer_operation_view_form', [ 'hotel.folio_transfer_operation_view_form', [
Button('Cancel', 'end', 'tryton-cancel'), Button('Cancel', 'end', 'tryton-cancel'),
Button('Transfer', 'transfer', 'tryton-ok'), Button('Transfer', 'transfer', 'tryton-ok'),
] ]
@ -1875,12 +1865,12 @@ class TransferOperation(Wizard):
def transition_transfer(self): def transition_transfer(self):
pool = Pool() pool = Pool()
Operation = pool.get('hotel.operation') Operation = pool.get('hotel.folio')
FolioCharge = pool.get('hotel.folio.charge') FolioCharge = pool.get('hotel.folio.charge')
current_op = Operation(Transaction().context.get('active_id')) current_op = Operation(Transaction().context.get('active_id'))
target_op = self.start.operation target_op = self.start.folio
if target_op.id == current_op.id: if target_op.id == current_op.id:
raise AccessError(gettext('hotel.msg_operation_current')) raise AccessError(gettext('hotel.msg_folio_current'))
lines_to_transfer = [] lines_to_transfer = []
if self.start.tranfer_charges: if self.start.tranfer_charges:
@ -1902,16 +1892,16 @@ class TransferOperation(Wizard):
class TransferChargeStart(ModelView): class TransferChargeStart(ModelView):
'Transfer Charge' 'Transfer Charge'
__name__ = 'hotel.operation.transfer_charge.ask' __name__ = 'hotel.folio.transfer_charge.ask'
operation = fields.Many2One('hotel.operation', 'Operation', folio = fields.Many2One('hotel.folio', 'Operation',
required=True, domain=[('state', '=', 'check_in')]) required=True, domain=[('state', '=', 'check_in')])
class TransferCharge(Wizard): class TransferCharge(Wizard):
'Transfer Operation' 'Transfer Operation'
__name__ = 'hotel.operation.transfer_charge' __name__ = 'hotel.folio.transfer_charge'
start = StateView('hotel.operation.transfer_charge.ask', start = StateView('hotel.folio.transfer_charge.ask',
'hotel.operation_transfer_charge_view_form', [ 'hotel.folio_transfer_charge_view_form', [
Button('Cancel', 'end', 'tryton-cancel'), Button('Cancel', 'end', 'tryton-cancel'),
Button('Transfer', 'transfer', 'tryton-ok'), Button('Transfer', 'transfer', 'tryton-ok'),
] ]
@ -1938,55 +1928,55 @@ class OperationByConsumerReport(Report):
def get_context(cls, records, header, data): def get_context(cls, records, header, data):
report_context = super().get_context(records, header, data) report_context = super().get_context(records, header, data)
pool = Pool() pool = Pool()
Operation = pool.get('hotel.operation') Folio = pool.get('hotel.folio')
user = pool.get('res.user')(Transaction().user) user = pool.get('res.user')(Transaction().user)
consumer_lines = [] consumer_lines = []
total_amount = 0 total_amount = 0
if records: if records:
line = records[0] line = records[0]
operation = Operation(line.operation.id) folio = Folio(line.folio.id)
total_amount = operation.room_amount total_amount = folio.room_amount
for l in operation.lines: for l in folio.lines:
if l.invoice_to.id == line.invoice_to.id: if l.invoice_to.id == line.invoice_to.id:
consumer_lines.append(l) consumer_lines.append(l)
total_amount += l.amount total_amount += l.amount
setattr(operation, 'lines', consumer_lines) setattr(folio, 'lines', consumer_lines)
setattr(operation, 'total_amount', total_amount) setattr(folio, 'total_amount', total_amount)
report_context['records'] = [operation] report_context['records'] = [folio]
report_context['company'] = user.company report_context['company'] = user.company
return report_context return report_context
class OperationBill(Wizard): class OperationBill(Wizard):
'Operation Bill' 'Operation Bill'
__name__ = 'hotel.operation.bill' __name__ = 'hotel.folio.bill'
start_state = 'create_bill' start_state = 'create_bill'
create_bill = StateTransition() create_bill = StateTransition()
def transition_create_bill(self): def transition_create_bill(self):
Operation = Pool().get('hotel.operation') Folio = Pool().get('hotel.folio')
ids = Transaction().context['active_ids'] ids = Transaction().context['active_ids']
operations = Operation.browse(ids) folios = Folio.browse(ids)
Operation.bill(operations) Folio.bill(folios)
return 'end' return 'end'
class OperationVoucher(ModelSQL): class OperationVoucher(ModelSQL):
'Operation - Voucher' 'Operation - Voucher'
__name__ = 'hotel.operation-account.voucher' __name__ = 'hotel.folio-account.voucher'
_table = 'operation_vouchers_rel' _table = 'folio_vouchers_rel'
operation = fields.Many2One('hotel.operation', 'Operation', folio = fields.Many2One('hotel.folio', 'Folio',
ondelete='CASCADE', select=True, required=True) ondelete='CASCADE', select=True, required=True)
voucher = fields.Many2One('account.voucher', 'Voucher', select=True, voucher = fields.Many2One('account.voucher', 'Voucher', select=True,
domain=[('voucher_type', '=', 'receipt')], ondelete='RESTRICT', domain=[('voucher_type', '=', 'receipt')], ondelete='RESTRICT',
required=True) required=True)
@classmethod @classmethod
def set_voucher_origin(cls, voucher_id, operation_id): def set_voucher_origin(cls, voucher_id, folio_id):
cls.create([{ cls.create([{
'voucher': voucher_id, 'voucher': voucher_id,
'operation': operation_id, 'folio': folio_id,
}]) }])
@ -2029,7 +2019,7 @@ class StatisticsByMonthReport(Report):
@classmethod @classmethod
def get_context(cls, records, header, data): def get_context(cls, records, header, data):
report_context = super().get_context(records, header, data) report_context = super().get_context(records, header, data)
Operation = Pool().get('hotel.operation') Operation = Pool().get('hotel.folio')
Period = Pool().get('account.period') Period = Pool().get('account.period')
Company = Pool().get('company.company') Company = Pool().get('company.company')
Rooms = Pool().get('hotel.room') Rooms = Pool().get('hotel.room')
@ -2068,7 +2058,7 @@ class StatisticsByMonthReport(Report):
reason_other = [] reason_other = []
reason_other_foreign = [] reason_other_foreign = []
total_guests = [] total_guests = []
operations = Operation.search(['OR', folios = Operation.search(['OR',
[ [
('start_date', '>=', period.start_date), ('start_date', '>=', period.start_date),
('start_date', '<=', period.end_date), ('start_date', '<=', period.end_date),

View File

@ -27,6 +27,68 @@ this repository contains the full copyright notices and license terms. -->
<field name="action" ref="report_folio"/> <field name="action" ref="report_folio"/>
</record> </record>
<record model="ir.ui.view" id="board_folio_view_tree">
<field name="model">hotel.folio</field>
<field name="type">tree</field>
<field name="name">board_folio_tree</field>
</record>
<record model="ir.ui.view" id="board_folio_view_form">
<field name="model">hotel.folio</field>
<field name="type">form</field>
<field name="name">board_folio_form</field>
</record>
<record model="ir.action.act_window" id="act_board_folio_view">
<field name="name">Board Folios</field>
<field name="res_model">hotel.folio</field>
<field name="search_value"
eval="[('create_date', '>=', DateTime(hour=0, minute=0, second=0, microsecond=0, delta_years=-1))]"
pyson="1"/>
</record>
<record model="ir.action.act_window.view" id="act_hotel_board_folio_tree_view">
<field name="sequence" eval="1"/>
<field name="view" ref="board_folio_view_tree"/>
<field name="act_window" ref="act_board_folio_view"/>
</record>
<record model="ir.action.act_window.view" id="act_hotel_board_folio_form_view">
<field name="sequence" eval="2"/>
<field name="view" ref="board_folio_view_form"/>
<field name="act_window" ref="act_board_folio_view"/>
</record>
<menuitem parent="menu_booking_form" sequence="30"
action="act_board_folio_view" id="menu_hotel_board_folio"/>
<record model="ir.action.act_window.domain" id="act_guest_moves_form_domain_arriving_today">
<field name="name">Arriving Today</field>
<field name="sequence" eval="50"/>
<field name="domain" eval="[('arrival_date', '=', Date())]" pyson="1"/>
<field name="act_window" ref="act_board_folio_view"/>
</record>
<record model="ir.action.act_window.domain" id="act_guest_moves_form_domain_leaving_today">
<field name="name">Leaving Today</field>
<field name="sequence" eval="70"/>
<field name="domain" eval="[
('departure_date', '=', Date()),
]" pyson="1"/>
<field name="act_window" ref="act_board_folio_view"/>
</record>
<record model="ir.action.act_window.domain" id="act_guest_moves_form_domain_no_show_today">
<field name="name">No Show Yesterday</field>
<field name="sequence" eval="90"/>
<field name="domain" eval="[
('arrival_date', '=', Date()),
('booking.registration_state', 'in', ['no_show']),
]" pyson="1"/>
<field name="act_window" ref="act_board_folio_view"/>
</record>
<record model="ir.action.act_window.domain" id="act_guest_moves_form_domain_all">
<field name="name">All</field>
<field name="sequence" eval="90"/>
<field name="domain" eval="[
('arrival_date', '>=', Date()),
]" pyson="1"/>
<field name="act_window" ref="act_board_folio_view"/>
</record>
<!-- <record model="ir.ui.view" id="operation_view_tree"> <!-- <record model="ir.ui.view" id="operation_view_tree">
<field name="model">hotel.operation</field> <field name="model">hotel.operation</field>
<field name="type">tree</field> <field name="type">tree</field>

View File

@ -14,20 +14,16 @@ this repository contains the full copyright notices and license terms. -->
<field name="booking_date"/> <field name="booking_date"/>
<label name="price_list"/> <label name="price_list"/>
<field name="price_list" widget="selection"/> <field name="price_list" widget="selection"/>
<label name="payment_term"/>
<field name="payment_term"/>
<label name="media"/>
<field name="media"/>
<label name="party_seller"/> <label name="party_seller"/>
<field name="party_seller" widget="selection"/> <field name="party_seller" widget="selection"/>
<label name="plan"/> <label name="plan"/>
<field name="plan"/> <field name="plan"/>
<label name="breakfast_included"/> <!-- <label name="breakfast_included"/>
<field name="breakfast_included"/> <field name="breakfast_included"/> -->
<label name="taxes_exception"/>
<field name="taxes_exception"/>
<button name="select_rooms" string="Select Rooms" <button name="select_rooms" string="Select Rooms"
icon="tryton-open" colspan="2"/> icon="tryton-open" colspan="2"/>
<button name="pay_advance" string="Add Advance"
icon="tryton-open" colspan="2"/>
<button name="send_email" string="Send Email" <button name="send_email" string="Send Email"
icon="tryton-open" colspan="2"/> icon="tryton-open" colspan="2"/>
<notebook colspan="6"> <notebook colspan="6">
@ -83,36 +79,30 @@ this repository contains the full copyright notices and license terms. -->
<field name="vouchers" colspan="4"/> <field name="vouchers" colspan="4"/>
</page> </page>
</notebook> </notebook>
<group col="7" colspan="6" id="advances"> <group col="4" colspan="4" id="buttons">
<button name="pay_advance" string="Add Advance" icon="tryton-open" <label name="payment_term"/>
colspan="2"/> <field name="payment_term" widget="selection"/>
<label name="total_advance"/> <label name="media"/>
<field name="total_advance"/> <field name="media"/>
<button name="no_show" string="No Show" icon="tryton-cancel"/> <label name="taxes_exception"/>
<field name="taxes_exception"/>
<label name="state"/> <label name="state"/>
<field name="state"/> <field name="state"/>
<button name="cancel" string="Cancel" icon="tryton-cancel"/>
<button name="not_show" string="Not Show" icon="tryton-cancel"/>
<button name="offer" string="Offer" icon="tryton-clear"/>
<button name="confirm" string="Confirm" icon="tryton-forward"/>
</group> </group>
<group col="8" colspan="6" id="amounts"> <group col="2" colspan="2" id="amounts">
<label name="untaxed_amount"/> <label name="untaxed_amount"/>
<field name="untaxed_amount"/> <field name="untaxed_amount"/>
<label name="tax_amount"/> <label name="tax_amount"/>
<field name="tax_amount"/> <field name="tax_amount"/>
<label name="total_amount"/> <label name="total_amount"/>
<field name="total_amount"/> <field name="total_amount"/>
<label name="total_advance"/>
<field name="total_advance"/>
<label name="pending_to_pay"/> <label name="pending_to_pay"/>
<field name="pending_to_pay"/> <field name="pending_to_pay"/>
</group> </group>
<group col="4" colspan="6" id="buttons">
<button name="offer" string="Offer"
icon="tryton-clear"/>
<button name="cancel" string="Cancel"
icon="tryton-cancel"/>
<button name="not_show" string="Not Show"
icon="tryton-cancel"/>
<button name="confirm" string="Confirm"
icon="tryton-forward"/>
<!-- <label name="satisfaction"/>
<field name="satisfaction"/> -->
</group>
</form> </form>