bzr revid: nel@silver-20081029122009-gi3nfa0rwtnlpnnr
This commit is contained in:
Najlaa 2008-10-29 13:20:09 +01:00
commit be1af7edda
33 changed files with 452 additions and 239 deletions

View File

@ -456,7 +456,9 @@ class account_journal(osv.osv):
'groups_id': fields.many2many('res.groups', 'account_journal_group_rel', 'journal_id', 'group_id', 'Groups'),
'currency': fields.many2one('res.currency', 'Currency', help='The currency used to enter statement'),
'entry_posted': fields.boolean('Skip \'Draft\' State for Created Entries', help='Check this box if you don\'t want that new account moves pass through the \'draft\' state and goes direclty to the \'posted state\' without any manual validation.'),
'company_id': fields.related('default_credit_account_id','company_id',type='many2one', relation="res.company", string="Company"),
}
_defaults = {
'active': lambda *a: 1,
'user_id': lambda self,cr,uid,context: uid,

View File

@ -150,7 +150,7 @@
<field name="check_total" required="2"/>
<field name="currency_id" on_change="onchange_currency_id(currency_id)" select="2"/>
<field colspan="4" default_get="{'check_total': check_total, 'invoice_line': invoice_line, 'address_invoice_id': address_invoice_id, 'partner_id': partner_id, 'price_type': 'price_type' in dir() and price_type or False}" name="invoice_line" nolabel="1">
<tree string="Invoice lines">
<tree string="Invoice lines" editable="top">
<field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, price_unit, parent.address_invoice_id)"/>
<field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(parent.partner_id,account_id)"/>
<field name="invoice_line_tax_id" view_mode="2"/>
@ -239,6 +239,9 @@
<field name="partner_id" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term)" select="1"/>
<field domain="[('partner_id','=',partner_id)]" name="address_invoice_id"/>
<field name="currency_id" on_change="onchange_currency_id(currency_id)" select="2"/>
<field name="date_invoice" on_change="onchange_payment_term_date_invoice(payment_term, date_invoice)" select="1"/>
<field name="period_id"/>
<label align="0.0" colspan="2" string="(keep empty to use the current period)"/>
</group>
<notebook colspan="4">
<page string="Invoice">
@ -284,9 +287,6 @@
<field name="origin" select="2"/>
<field colspan="4" domain="[('partner_id','=',partner_id)]" name="address_contact_id"/>
<field name="move_id"/>
<field name="date_invoice" on_change="onchange_payment_term_date_invoice(payment_term, date_invoice)" select="1"/>
<field name="period_id"/>
<label align="0.0" colspan="2" string="(keep empty to use the current period)"/>
<separator colspan="4" string="Additionnal Information"/>
<field colspan="4" name="comment" nolabel="1"/>
</page>

View File

@ -236,6 +236,7 @@
<tree string="Account Journal">
<field name="code"/>
<field name="name"/>
<field name="company_id"/>
</tree>
</field>
</record>
@ -979,9 +980,21 @@
<wizard id="action_account_bank_reconcile_tree" menu="False" model="account.move.line" name="account.move.bank.reconcile" string="Bank reconciliation"/>
<menuitem action="action_account_bank_reconcile_tree" id="menu_action_account_bank_reconcile_check_tree" parent="account.next_id_30" type="wizard"/>
<act_window domain="[('account_id', '=', active_id)]" id="act_account_acount_move_line_open" name="Entries" res_model="account.move.line" src_model="account.account"/>
<act_window
domain="[('account_id', '=', active_id)]"
id="act_account_acount_move_line_open"
name=""
context="{'account_id': active_id}"
res_model="account.move.line"
src_model="account.account"/>
<act_window domain="[('account_id', '=', active_id),('reconcile_id','=',False)]" id="act_account_acount_move_line_open_unreconciled" name="Unreconciled entries" res_model="account.move.line" src_model="account.account"/>
<act_window
domain="[('account_id', '=', active_id),('reconcile_id','=',False)]"
id="act_account_acount_move_line_open_unreconciled"
name="Unreconciled entries"
res_model="account.move.line"
context="{'account_id': active_id}"
src_model="account.account"/>
<act_window domain="[('reconcile_id', '=', active_id)]" id="act_account_acount_move_line_reconcile_open" name="Reconciled entries" res_model="account.move.line" src_model="account.move.reconcile"/>
@ -1267,7 +1280,7 @@
</record>
<record id="action_move_line_tree1" model="ir.actions.act_window">
<field name="name">Entries</field>
<field name="name" eval="False"/>
<field name="res_model">account.move.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>

View File

@ -162,7 +162,7 @@ your own chart of account.
-->
<record id="sales_journal" model="account.journal">
<field name="name">Sales Journal</field>
<field name="name">x Sales Journal</field>
<field name="code">SAJ</field>
<field name="type">sale</field>
<field name="view_id" ref="account_journal_view"/>
@ -172,7 +172,7 @@ your own chart of account.
<field name="user_id" ref="base.user_root"/>
</record>
<record id="expenses_journal" model="account.journal">
<field name="name">Expenses Journal</field>
<field name="name">x Expenses Journal</field>
<field name="code">EXJ</field>
<field name="type">purchase</field>
<field name="view_id" ref="account_journal_view"/>
@ -183,7 +183,7 @@ your own chart of account.
</record>
<record id="bank_journal" model="account.journal">
<field name="name">Bank Journal</field>
<field name="name">x Bank Journal</field>
<field name="code">BNK</field>
<field name="type">cash</field>
<field name="view_id" ref="account_journal_bank_view"/>

View File

@ -79,8 +79,7 @@ class account_invoice(osv.osv):
def _get_journal_analytic(self, cr, uid, type_inv, context={}):
type2journal = {'out_invoice': 'sale', 'in_invoice': 'purchase', 'out_refund': 'sale', 'in_refund': 'purchase'}
tt = type2journal.get(type_inv, 'sale')
cr.execute("select id from account_analytic_journal where type=%s limit 1", (tt,))
result = cr.fetchone()
result = self.pool.get('account_analytic_journal').search(cr, uid, [('type','=',tt)], context=context)
if not result:
raise osv.except_osv(_('No Analytic Journal !'),("You have to define an analytic journal of type '%s' !") % (tt,))
return result[0]

View File

@ -411,7 +411,7 @@
<blockTable colWidths="120.0,91.0,29.0" style="Table_eclu_Taxes_Total">
<tr>
<td>
<para style="terp_default_Bold_9">Total (excl. taxes):</para>
<para style="terp_default_Bold_9">Net Total:</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed) ]]</para>
@ -443,7 +443,7 @@
<blockTable colWidths="119.0,93.0,28.0" style="Table_Total_Include_Taxes">
<tr>
<td>
<para style="terp_default_Bold_9">Total (inclu. taxes):</para>
<para style="terp_default_Bold_9">Total:</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(o.amount_total) ]]</para>

View File

@ -101,6 +101,7 @@
<newline/>
<field name="phone"/>
<field name="fax"/>
<field name="email"/>
<newline/>
<field name="job_ids" mode="tree,form" colspan="4">
<tree string="Contacts" editable="top">
@ -111,6 +112,7 @@
<field name="email"/>
</tree>
<form string="Contacts">
<field name="name"/>
<field name="sequence_partner"/>
<field name="contact_id"/>
<field name="function_id"/>

View File

@ -416,6 +416,8 @@ class document_directory_content(osv.osv):
'sequence': lambda *args: 1,
'include_name': lambda *args: 1,
}
def process_write_pdf(self, cr, uid, node, context={}):
return True
def process_read_pdf(self, cr, uid, node, context={}):
report = self.pool.get('ir.actions.report.xml').browse(cr, uid, node.content.report_id.id)
srv = netsvc.LocalService('report.'+report.report_name)

View File

@ -12,6 +12,43 @@ import netsvc
import os
from service import security
class file_wrapper(StringIO.StringIO):
def __init__(self, sstr='', ressource_id=False, dbname=None, uid=1, name=''):
StringIO.StringIO.__init__(self, sstr)
self.ressource_id = ressource_id
self.name = name
self.dbname = dbname
self.uid = uid
def close(self, *args, **kwargs):
db,pool = pooler.get_db_and_pool(self.dbname)
cr = db.cursor()
uid =self.uid
val = self.getvalue()
val2 = {
'datas': base64.encodestring(val),
'file_size': len(val),
}
pool.get('ir.attachment').write(cr, uid, [self.ressource_id], val2)
cr.commit()
StringIO.StringIO.close(self, *args, **kwargs)
class content_wrapper(StringIO.StringIO):
def __init__(self, dbname, uid, pool, node, name=''):
StringIO.StringIO.__init__(self, '')
self.dbname = dbname
self.uid = uid
self.node = node
self.pool = pool
self.name = name
def close(self, *args, **kwargs):
db,pool = pooler.get_db_and_pool(self.dbname)
cr = db.cursor()
getattr(self.pool.get('document.directory.content'), 'process_write_'+self.node.content.extension[1:])(cr, self.uid, self.node, self.getvalue())
StringIO.StringIO.close(self, *args, **kwargs)
cr.commit()
cr.close()
class abstracted_fs:
"""A class used to interact with the file system, providing a high
level, cross-platform interface compatible with both Windows and
@ -114,31 +151,17 @@ class abstracted_fs:
# Ok
def create(self, node, objname, mode):
cr = node.cr
uid = node.uid
pool = pooler.get_pool(cr.dbname)
child = node.child(objname)
if child:
if child.type in ('collection','database'):
raise OSError(1, 'Operation not permited.')
if child.type=='content':
s = content_wrapper(cr.dbname, uid, pool, child)
return s
try:
class file_wrapper(StringIO.StringIO):
def __init__(self, sstr='', ressource_id=False, dbname=None, uid=1, name=''):
StringIO.StringIO.__init__(self, sstr)
self.ressource_id = ressource_id
self.name = name
self.dbname = dbname
self.uid = uid
def close(self, *args, **kwargs):
db,pool = pooler.get_db_and_pool(self.dbname)
cr = db.cursor()
uid =self.uid
val = self.getvalue()
val2 = {
'datas': base64.encodestring(val),
'file_size': len(val),
}
pool.get('ir.attachment').write(cr, uid, [self.ressource_id], val2)
cr.commit()
StringIO.StringIO.close(self, *args, **kwargs)
cr = node.cr
uid = node.uid
pool = pooler.get_pool(cr.dbname)
fobj = pool.get('ir.attachment')
ext = objname.find('.') >0 and objname.split('.')[1] or False

View File

@ -35,6 +35,7 @@ import StringIO
import base64
import datetime
import time
import random
ICS_TAGS = {
'summary':'normal',
@ -70,8 +71,46 @@ class document_directory_content(osv.osv):
_defaults = {
'ics_domain': lambda *args: '[]'
}
def process_write_ics(self, cr, uid, node, data, context={}):
import vobject
parsedCal = vobject.readOne(data)
fields = {}
fobj = self.pool.get('document.directory.content')
content = fobj.browse(cr, uid, node.content.id, context)
idomain = {}
for d in eval(content.ics_domain):
idomain[d[0]]=d[2]
for n in content.ics_field_ids:
fields[n.name] = n.field_id.name
if 'uid' not in fields:
return True
for child in parsedCal.getChildren():
result = {}
uuid = None
for event in child.getChildren():
if event.name.lower()=='uid':
uuid = event.value
if event.name.lower() in fields:
if ICS_TAGS[event.name.lower()]=='normal':
result[fields[event.name.lower()]] = event.value.encode('utf8')
elif ICS_TAGS[event.name.lower()]=='date':
result[fields[event.name.lower()]] = event.value.strftime('%Y-%m-%d %H:%M:%S')
if not uuid:
continue
fobj = self.pool.get(content.ics_object_id.model)
id = fobj.search(cr, uid, [(fields['uid'], '=', uuid.encode('utf8'))], context=context)
if id:
fobj.write(cr, uid, id, result, context=context)
else:
r = idomain.copy()
r.update(result)
fobj.create(cr, uid, r, context=context)
return True
def process_read_ics(self, cr, uid, node, context={}):
print 'READ ICS'
import vobject
obj_class = self.pool.get(node.content.ics_object_id.model)
# Can be improved to use context and active_id !
@ -81,20 +120,24 @@ class document_directory_content(osv.osv):
for obj in obj_class.browse(cr, uid, ids, context):
event = cal.add('vevent')
for field in node.content.ics_field_ids:
value = getattr(obj, field.field_id.name)
if (not value) and field.name=='uid':
value = 'OpenERP-'+str(random.randint(1999999999, 9999999999))
obj_class.write(cr, uid, [obj.id], {field.field_id.name: value})
if ICS_TAGS[field.name]=='normal':
value = getattr(obj, field.field_id.name) or ''
event.add(field.name).value = value
value = value or ''
event.add(field.name).value = value and value.decode('utf8') or ''
elif ICS_TAGS[field.name]=='date':
dt = getattr(obj, field.field_id.name) or time.strftime('%Y-%m-%d %H:%M:%S')
dt = value or time.strftime('%Y-%m-%d %H:%M:%S')
if len(dt)==10:
if field.name=='dtend':
dt = dt+' 10:00:00'
else:
dt = dt+' 09:00:00'
dt = dt+' 09:00:00'
value = datetime.datetime.strptime(dt, '%Y-%m-%d %H:%M:%S')
if field.name=='dtend':
value += datetime.timedelta(hours=2)
event.add(field.name).value = value
s= StringIO.StringIO(cal.serialize())
s= StringIO.StringIO(cal.serialize().encode('utf8'))
s.name = node
cr.commit()
return s
document_directory_content()

View File

@ -8,7 +8,6 @@
This module allow you
* to manage your events and their registrations
* to create retro planning for managing your events
* to use emails to automaticly confirm and send acknowledgements for any registration to an event
* ...
@ -19,7 +18,7 @@
Events \ Reporting
""",
"depends" : [
"project","crm","base_contact","account_budget",
"crm","base_contact","account_budget",
],
"demo_xml" : ["event_demo.xml"],
"init_xml" : ["event_data.xml"],

View File

@ -45,24 +45,6 @@ class crm_case_log(osv.osv):
}
crm_case_log()
class one2many_mod_task(fields.one2many):
def get(self, cr, obj, ids, name, user=None, offset=0, context=None, values=None):
if not context:
context = {}
if not values:
values = {}
res = {}
for id in ids:
res[id] = []
for id in ids:
query = "select project_id from event_event where id = %i" %id
cr.execute(query)
project_ids = [ x[0] for x in cr.fetchall()]
ids2 = obj.pool.get(self._obj).search(cr, user, [(self._fields_id,'in',project_ids),('state','<>','done')], limit=self._limit)
for r in obj.pool.get(self._obj)._read_flat(cr, user, ids2, [self._fields_id], context=context, load='_classic_write'):
res[id].append( r['id'] )
return res
class event_type(osv.osv):
_name = 'event.type'
_description= 'Event type'
@ -130,9 +112,6 @@ class event(osv.osv):
reg_ids = self.pool.get('event.registration').search(cr, uid, [('event_id','=',eve.id)])
if reg_ids:
self.pool.get('event.registration').write(cr, uid, reg_ids, {'date_deadline':vals['date_begin']})
#change the date of the project
if eve.project_id:
self.pool.get('project.project').write(cr, uid, [eve.project_id.id], {'date_end':eve.date_begin})
#change the description of the registration linked to this event
if 'mail_auto_confirm' in vals:
@ -156,8 +135,6 @@ class event(osv.osv):
'register_min': fields.integer('Minimum Registrations'),
'register_current': fields.function(_get_register, method=True, string='Confirmed Registrations'),
'register_prospect': fields.function(_get_prospect, method=True, string='Unconfirmed Registrations'),
'project_id': fields.many2one('project.project', 'Project', readonly=True),
'task_ids': one2many_mod_task('project.task', 'project_id', "Project tasks", readonly=True, domain="[('state','&lt;&gt;', 'done')]"),
'date_begin': fields.datetime('Beginning date', required=True),
'date_end': fields.datetime('Ending date', required=True),
'state': fields.selection([('draft','Draft'),('confirm','Confirmed'),('done','Done'),('cancel','Canceled')], 'Status', readonly=True, required=True),
@ -178,7 +155,7 @@ event()
class event_registration(osv.osv):
def _history(self, cr, uid,ids,keyword, history=False, email=False, context={}):
for case in ids:
for case in self.browse(cr, uid, ids):
data = {
'name': keyword,
'som': case.som.id,
@ -192,14 +169,12 @@ class event_registration(osv.osv):
def button_reg_close(self, cr, uid, ids, *args):
self.write(cr, uid, ids, {'state':'done',})
cases = self.browse(cr, uid, ids)
self._history(cr, uid, cases, 'Done', history=True)
self._history(cr, uid, ids, 'Done', history=True)
return True
def button_reg_cancel(self, cr, uid, ids, *args):
self.write(cr, uid, ids, {'state':'cancel',})
cases = self.browse(cr, uid, ids)
self._history(cr, uid, cases, 'Cancel', history=True)
self._history(cr, uid, ids, 'Cancel', history=True)
return True
def create(self, cr, uid, *args, **argv):
@ -208,7 +183,7 @@ class event_registration(osv.osv):
args[0]['date_deadline']= event.date_begin
args[0]['description']= event.mail_confirm
res = super(event_registration, self).create(cr, uid, *args, **argv)
self._history(cr, uid,self.browse(cr, uid, [res]), 'Created', history=True)
self._history(cr, uid,[res], 'Created', history=True)
return res
def write(self, cr, uid, *args, **argv):

View File

@ -71,9 +71,6 @@
<field name="register_min" select="2"/>
<field name="register_max" select="2"/>
<field name="budget_id"/>
<separator string="Tasks management" colspan="4"/>
<field name="project_id"/>
<button string="Create Retro-Planning" name="%(event.event_wiz)d" type="action"/>
<separator string="Status" colspan="4"/>
<field name="state" select="1"/>
<group col="4" colspan="2">
@ -99,18 +96,6 @@
<separator string="Registrations" colspan="4"/>
<field name="register_current"/>
<field name="register_prospect"/>
<separator string="Remaining Tasks" colspan="4"/>
<field name="task_ids" colspan="4" nolabel="1" widget="one2many_list" >
<tree string="All tasks" colors="red:date_deadline&lt;current_date and state=='draft';blue:date_deadline==current_date and state=='draft';grey:state=='cancel' or state=='close'">
<field name="sequence"/>
<field name="name"/>
<field name="user_id" />
<field name="date_deadline" />
<field name="planned_hours" widget="float_time"/>
<field name="effective_hours" widget="float_time"/>
<field name="state" />
</tree>
</field>
</page>
</notebook>
</form>

View File

@ -1,17 +1,6 @@
<?xml version="1.0" ?>
<openerp>
<data>
<wizard string="Project"
model="event.event"
name="event.project"
id="event_wiz"
menu="False"/>
<wizard
string="Tasks"
model="event.event"
name="wizard_event_tasks"
id="wizard_event_task"/>
<wizard
string="Registrations"

View File

@ -5,4 +5,3 @@
"access_event_registration","event.registration","model_event_registration","crm.group_crm_user",1,1,1,1
"access_report_event_registration","report.event.registration","model_report_event_registration","crm.group_crm_user",1,0,0,0
"access_report_event_type_registration","report.event.type.registration","model_report_event_type_registration","crm.group_crm_user",1,0,0,0
"access_project_project_crm_user","project.project crm user","project.model_project_project","crm.group_crm_user",1,0,0,0

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
5 access_event_registration event.registration model_event_registration crm.group_crm_user 1 1 1 1
6 access_report_event_registration report.event.registration model_report_event_registration crm.group_crm_user 1 0 0 0
7 access_report_event_type_registration report.event.type.registration model_report_event_type_registration crm.group_crm_user 1 0 0 0
access_project_project_crm_user project.project crm user project.model_project_project crm.group_crm_user 1 0 0 0

View File

@ -1,6 +1,5 @@
# -*- encoding: utf-8 -*-
import event_registration
import project_wizard
import make_invoice
import event_registrations_partner
import confirm_registration

View File

@ -53,7 +53,7 @@ def _confirm(self, cr, uid, data, context):
def _check_confirm(self, cr, uid, data, context):
registration_obj = pooler.get_pool(cr.dbname).get('event.registration')
registration_obj.write(cr, uid, [data['id']], {'state':'open',})
registration_obj._history(cr, uid, reg, 'Open', history=True)
registration_obj._history(cr, uid, [data['id']], 'Open', history=True)
registration_obj.mail_user(cr,uid,[data['id']])
return {}

View File

@ -30,35 +30,5 @@ class wizard_event_registration(wizard.interface):
}
wizard_event_registration("wizard_event_registration")
def _event_tasks(self, cr, uid, data, context):
event_id = data['id']
cr.execute('''SELECT project_id FROM event_event WHERE id = %d '''% (event_id, ))
res = cr.fetchone()
if not res[0]:
raise wizard.except_wizard('Error !', 'No project defined for this event.\nYou can create one with the retro-planning button !')
value = {
'domain': [('project_id', '=', res[0])],
'name': 'Tasks',
'view_type': 'form',
'view_mode': 'tree,form,calendar',
'res_model': 'project.task',
'context': { },
'type': 'ir.actions.act_window'
}
return value
class wizard_event_tasks(wizard.interface):
states = {
'init': {
'actions': [],
'result': {
'type': 'action',
'action': _event_tasks,
'state': 'end'
}
},
}
wizard_event_tasks("wizard_event_tasks")
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -71,23 +71,25 @@ def _makeInvoices(self, cr, uid, data, context):
continue
if (not reg.tobe_invoiced):
inv_reject = inv_reject + 1
inv_rej_reason += "ID "+str(reg.id)+": Registration Cannot Be Invoiced. \n"
inv_rej_reason += "ID "+str(reg.id)+": Registration is set as 'Cannot be invoiced'. \n"
continue
if reg.invoice_id:
inv_reject = inv_reject + 1
inv_rej_reason += "ID "+str(reg.id)+": Registration Already Has an Invoice Linked. \n"
inv_rej_reason += "ID "+str(reg.id)+": Registration already has an invoice linked. \n"
continue
if not reg.event_id.product_id:
inv_reject = inv_reject + 1
inv_rej_reason += "ID "+str(reg.id)+": Event Related Doesn't Have any Product. \n"
continue
if not reg.partner_address_id:
inv_reject = inv_reject + 1
inv_rej_reason += "ID "+str(reg.id)+": Registration Doesn't Have any Contact. \n"
inv_rej_reason += "ID "+str(reg.id)+": Event related doesn't have any product defined. \n"
continue
if not reg.partner_invoice_id:
inv_reject = inv_reject + 1
inv_rej_reason += "ID "+str(reg.id)+": Registration Doesn't Have any Partner to Invoice. \n"
inv_rej_reason += "ID "+str(reg.id)+": Registration doesn't have any partner to invoice. \n"
continue
partner_address_list = reg.partner_invoice_id and pool_obj.get('res.partner').address_get(cr, uid, [reg.partner_invoice_id.id], adr_pref=['invoice'])
partner_address_id = partner_address_list['invoice']
if not partner_address_id:
inv_reject = inv_reject + 1
inv_rej_reason += "ID "+str(reg.id)+": Registered partner doesn't have an address to make the invoice. \n"
continue
inv_create = inv_create + 1
@ -117,8 +119,8 @@ def _makeInvoices(self, cr, uid, data, context):
'reference': False,
'account_id': reg.partner_invoice_id.property_account_receivable.id,
'partner_id': reg.partner_invoice_id.id,
'address_invoice_id':reg.partner_address_id.id,
'address_contact_id':reg.partner_address_id.id,
'address_invoice_id':partner_address_id,
'address_contact_id':partner_address_id,
'invoice_line': [(6,0,[inv_id])],
'currency_id' :reg.partner_invoice_id.property_product_pricelist.currency_id.id,
'comment': "",
@ -129,7 +131,7 @@ def _makeInvoices(self, cr, uid, data, context):
inv_id = inv_obj.create(cr, uid, inv)
list_inv.append(inv_id)
obj_event_reg.write(cr, uid,reg.id, {'invoice_id' : inv_id,'state':'done'})
obj_event_reg._history(cr, uid,[reg], 'Invoiced', history=True)
obj_event_reg._history(cr, uid,[reg.id], 'Invoiced', history=True)
return {'inv_created' : str(inv_create) , 'inv_rejected' : str(inv_reject) , 'invoice_ids': list_inv, 'inv_rej_reason': inv_rej_reason}

View File

@ -0,0 +1,5 @@
# -*- encoding: utf-8 -*-
import event
import wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,24 @@
# -*- encoding: utf-8 -*-
{
"name" : "Event - Project",
"version" : "0.1",
"author" : "Tiny",
"category" : "Generic Modules/Association",
"description": """Organization and management of events.
This module allow you to create retro planning for managing your events.
""",
"depends" : [
"project_retro_planning","event",
],
"demo_xml" : [],
"init_xml" : [],
"update_xml" : [
"event_wizard.xml",
"event_view.xml",
],
"active" : False,
"installable" : True,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,73 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2007 TINY SPRL. (http://tiny.be) All Rights Reserved.
#
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from osv import fields, osv
import time
import netsvc
import pooler
import tools
class one2many_mod_task(fields.one2many):
def get(self, cr, obj, ids, name, user=None, offset=0, context=None, values=None):
if not context:
context = {}
if not values:
values = {}
res = {}
for id in ids:
res[id] = []
for id in ids:
query = "select project_id from event_event where id = %i" %id
cr.execute(query)
project_ids = [ x[0] for x in cr.fetchall()]
ids2 = obj.pool.get(self._obj).search(cr, user, [(self._fields_id,'in',project_ids),('state','<>','done')], limit=self._limit)
for r in obj.pool.get(self._obj)._read_flat(cr, user, ids2, [self._fields_id], context=context, load='_classic_write'):
res[id].append( r['id'] )
return res
class event(osv.osv):
_inherit = 'event.event'
def write(self, cr, uid, ids,vals, *args, **kwargs):
if 'date_begin' in vals and vals['date_begin']:
for eve in self.browse(cr, uid, ids):
self.pool.get('project.project').write(cr, uid, [eve.project_id.id], {'date_end':eve.date_begin})
return super(event,self).write(cr, uid, ids,vals, *args, **kwargs)
_columns = {
'project_id': fields.many2one('project.project', 'Project', readonly=True),
'task_ids': one2many_mod_task('project.task', 'project_id', "Project tasks", readonly=True, domain="[('state','&lt;&gt;', 'done')]"),
}
event()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,45 @@
<?xml version="1.0"?>
<openerp>
<data>
<!-- EVENTS -->
<record model="ir.ui.view" id="view_event_form_inherited">
<field name="name">Events</field>
<field name="model">event.event</field>
<field name="inherit_id" ref="event.view_event_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="budget_id" position="after">
<separator string="Tasks management" colspan="4"/>
<field name="project_id"/>
<button string="Create Retro-Planning" name="%(event_wiz)d" type="action"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_event_form_inherited2">
<field name="name">Events</field>
<field name="model">event.event</field>
<field name="inherit_id" ref="event.view_event_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="register_prospect" position="after">
<separator string="Remaining Tasks" colspan="4"/>
<field name="task_ids" colspan="4" nolabel="1" widget="one2many_list" >
<tree string="All tasks" colors="red:date_deadline&lt;current_date and state=='draft';blue:date_deadline==current_date and state=='draft';grey:state=='cancel' or state=='close'">
<field name="sequence"/>
<field name="name"/>
<field name="user_id" />
<field name="date_deadline" />
<field name="planned_hours" widget="float_time"/>
<field name="effective_hours" widget="float_time"/>
<field name="state" />
</tree>
</field>
</field>
</field>
</record>
</data>
</openerp>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" ?>
<openerp>
<data>
<wizard string="Project"
model="event.event"
name="event.project"
id="event_wiz"
menu="False"/>
<wizard
string="Tasks"
model="event.event"
name="wizard_event_tasks"
id="wizard_event_task"/>
</data>
</openerp>

View File

@ -0,0 +1,6 @@
# -*- encoding: utf-8 -*-
import project_wizard
import event_task
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,36 @@
# -*- encoding: utf-8 -*-
import wizard
import pooler
def _event_tasks(self, cr, uid, data, context):
event_id = data['id']
cr.execute('''SELECT project_id FROM event_event WHERE id = %d '''% (event_id, ))
res = cr.fetchone()
if not res[0]:
raise wizard.except_wizard('Error !', 'No project defined for this event.\nYou can create one with the retro-planning button !')
value = {
'domain': [('project_id', '=', res[0])],
'name': 'Tasks',
'view_type': 'form',
'view_mode': 'tree,form,calendar',
'res_model': 'project.task',
'context': { },
'type': 'ir.actions.act_window'
}
return value
class wizard_event_tasks(wizard.interface):
states = {
'init': {
'actions': [],
'result': {
'type': 'action',
'action': _event_tasks,
'state': 'end'
}
},
}
wizard_event_tasks("wizard_event_tasks")
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -542,17 +542,16 @@ class Invoice(osv.osv):
def action_cancel(self, cr, uid, ids, context=None):
'''Create a 'date_cancel' on the membership_line object'''
if context is None:
context = {}
member_line_obj = self.pool.get('membership.membership_line')
today = time.strftime('%Y-%m-%d')
for invoice in self.browse(cr, uid, ids):
mlines = member_line_obj.search(cr,uid,
[('account_invoice_line','in',
[ l.id for l in invoice.invoice_line])], context)
member_line_obj.write(cr,uid,mlines, {'date_cancel':today}, context)
return super(Invoice, self).action_cancel(cr, uid, ids, context)
Invoice()

View File

@ -274,7 +274,7 @@
<field name="product_qty"/>
<field name="product_uom"/>
<field name="method"/>
<field name="routing_id"/>
<field name="routing_id" groups="base.group_extended"/>
<field name="date_start"/>
<field name="date_stop"/>
</tree>

View File

@ -283,6 +283,11 @@ class product_template(osv.osv):
res = cr.fetchone()
return res and res[0] or False
def _default_category(self, cr, uid, context={}):
if 'categ_id' in context and context['categ_id']:
return context['categ_id']
return False
_defaults = {
'type': lambda *a: 'product',
'list_price': lambda *a: 1,
@ -298,6 +303,7 @@ class product_template(osv.osv):
'uom_po_id': _get_uom_id,
'uos_coeff' : lambda *a: 1.0,
'mes_type' : lambda *a: 'fixed',
'categ_id' : _default_category,
}
def _check_uom(self, cursor, user, ids):

View File

@ -273,6 +273,11 @@ class task(osv.osv):
def onchange_planned(self, cr, uid, ids, planned, effective):
return {'value':{'remaining_hours': planned-effective}}
def _default_project(self, cr, uid, context={}):
if 'project_id' in context and context['project_id']:
return context['project_id']
return False
#_sql_constraints = [
# ('remaining_hours', 'CHECK (remaining_hours>=0)', 'Please increase and review remaining hours ! It can not be smaller than 0.'),
#]
@ -313,6 +318,7 @@ class task(osv.osv):
'sequence': lambda *a: 10,
'active': lambda *a: True,
'date_start': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
'project_id': _default_project,
}
_order = "sequence, priority, date_deadline, id"

View File

@ -439,6 +439,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar,graph</field>
<field name="domain">[('project_id', 'child_of', [active_id])]</field>
<field name="context">{'project_id':active_id}</field>
</record>
<record id="ir_project_task_open" model="ir.values">
<field eval=" 'tree_but_open'" name="key2"/>

View File

@ -8,8 +8,8 @@
<record id="process_process_salesworkflow0" model="process.process">
<field eval="1" name="active"/>
<field eval="&quot;&quot;&quot;Sales flow for services companies.&quot;&quot;&quot;" name="note"/>
<field eval="&quot;&quot;&quot;Sales Workflow&quot;&quot;&quot;" name="name"/>
<field eval="'From the quotation to the delivery and invoices.'" name="note"/>
<field eval="'Sales Workflow'" name="name"/>
</record>
<!--
@ -19,92 +19,84 @@
<record id="process_node_order0" model="process.node">
<field name="menu_id" ref="sale.menu_sale_order"/>
<field name="model_id" ref="sale.model_sale_order"/>
<field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Order&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;After confirming order, Create the invoice.&quot;&quot;&quot;" name="note"/>
<field eval="'subflow'" name="kind"/>
<field eval="'Order'" name="name"/>
<field eval="'After confirming order, Create the invoice.'" name="note"/>
<field name="process_id" ref="account.process_process_invoiceworkflow0"/>
<field name="subflow_id" ref="process_process_salesworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field name="model_states">object.state=='draft'</field>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_saleorderprocurement0" model="process.node">
<field name="menu_id" ref="sale.menu_sale_order"/>
<field name="model_id" ref="sale.model_sale_order"/>
<field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Sale Order Procurement&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Procurement for each line&quot;&quot;&quot;" name="note"/>
<field eval="'subflow'" name="kind"/>
<field eval="'Sale Order Procurement'" name="name"/>
<field eval="'Procurement for each line'" name="note"/>
<field name="process_id" ref="mrp.process_process_procurementworkflow0"/>
<field name="subflow_id" ref="process_process_salesworkflow0"/>
<field eval="&quot;&quot;&quot;object.state in ('draft', 'waiting_date', 'manual', 'progress', 'shipping_except', 'invoice_except', 'done', 'cancel')&quot;&quot;&quot;" name="model_states"/>
<field name="model_states">object.state in ('draft','waiting_date','manual','progress','shipping_except','invoice_except','done','cancel')</field>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_quotation0" model="process.node">
<field name="menu_id" ref="sale.menu_action_order_tree10"/>
<field name="model_id" ref="sale.model_sale_order"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Quotation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Quotations are sale order in draft state.&quot;&quot;&quot;" name="note"/>
<field eval="'state'" name="kind"/>
<field eval="'Quotation'" name="name"/>
<field eval="'Quotations are sales order in draft state.'" name="note"/>
<field name="process_id" ref="process_process_salesworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field name="model_states">object.state=='draft'</field>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_saleorder0" model="process.node">
<field name="menu_id" ref="sale.menu_action_order_tree9"/>
<field name="model_id" ref="sale.model_sale_order"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Sale Order&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Manages the delivery and invoicing progress.&quot;&quot;&quot;" name="note"/>
<field eval="'Sale Order'" name="name"/>
<field eval="'Confirmed by the customer.'" name="note"/>
<field name="process_id" ref="process_process_salesworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='manual'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
<field name="model_states">object.state in ('waiting_date','manual','progress')</field>
</record>
<record id="process_node_packinglist0" model="process.node">
<field name="menu_id" ref="stock.menu_picking_waiting"/>
<field name="model_id" ref="stock.model_stock_picking"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Packing List&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The worker packs the requested items.&quot;&quot;&quot;" name="note"/>
<field eval="'Packing List'" name="name"/>
<field eval="'The worker have to pack the requested products.'" name="note"/>
<field name="process_id" ref="process_process_salesworkflow0"/>
<field eval="&quot;&quot;&quot;object.state in ('assigned', 'confirmed')&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
<field name="model_states">object.state in ('assigned', 'confirmed')</field>
</record>
<record id="process_node_deliveryorder0" model="process.node">
<field name="menu_id" ref="stock.menu_picking_waiting_delivery"/>
<field name="model_id" ref="stock.model_stock_picking"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Delivery Order&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The transporter take the box and deliver it.&quot;&quot;&quot;" name="note"/>
<field eval="'state'" name="kind"/>
<field eval="'Delivery Order'" name="name"/>
<field eval="'The delivery order document, when boxes leaves the warehouse.'" name="note"/>
<field name="process_id" ref="process_process_salesworkflow0"/>
<field eval="&quot;&quot;&quot;object.state in ('done', 'assigned')&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
<field name="model_states">object.state in ('done')</field>
</record>
<record id="process_node_invoice0" model="process.node">
<field name="menu_id" ref="account.menu_invoice_draft"/>
<field name="model_id" ref="account.model_account_invoice"/>
<field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Invoice&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;In case you invoice based on sale order.&quot;&quot;&quot;" name="note"/>
<field eval="'subflow'" name="kind"/>
<field eval="'Invoice'" name="name"/>
<field eval="'Invoice based on the sale order.'" name="note"/>
<field name="process_id" ref="process_process_salesworkflow0"/>
<field name="subflow_id" ref="account.process_process_invoiceworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_invoiceafterdelivery0" model="process.node">
<field name="menu_id" ref="account.menu_invoice_draft"/>
<field name="model_id" ref="account.model_account_invoice"/>
<field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Invoice after delivery&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;In case you invoice based on deliveries (subflow)&quot;&quot;&quot;" name="note"/>
<field eval="'subflow'" name="kind"/>
<field eval="'Invoice on Packing'" name="name"/>
<field eval="'In case you invoice based on packings'" name="note"/>
<field name="process_id" ref="process_process_salesworkflow0"/>
<field name="subflow_id" ref="account.process_process_invoiceworkflow0"/>
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
@ -115,8 +107,8 @@
<record id="process_condition_conditionafterdelivery0" model="process.condition">
<field name="model_id" ref="sale.model_sale_order"/>
<field name="node_id" ref="process_node_invoiceafterdelivery0"/>
<field eval="&quot;&quot;&quot;object.order_policy=='postpaid'&quot;&quot;&quot;" name="model_states"/>
<field eval="&quot;&quot;&quot;condition_after_delivery&quot;&quot;&quot;" name="name"/>
<field name="model_states">object.order_policy=='postpaid'</field>
<field eval="'condition_after_delivery'" name="name"/>
</record>
<!--
@ -124,21 +116,21 @@
-->
<record id="res_roles_salesman0" model="res.roles">
<field eval="&quot;&quot;&quot;Salesman&quot;&quot;&quot;" name="name"/>
<field eval="'Salesman'" name="name"/>
</record>
<record id="sale.trans_draft_router" model="workflow.transition">
<field name="role_id" ref="res_roles_salesman0"/>
</record>
<record id="sale.trans_wait_invoice_invoice_manual" model="workflow.transition">
<record id="sale.trans_wait_invoice_invoice_manual" model="workflow.transition">
<field name="role_id" ref="res_roles_salesman0"/>
</record>
<record id="process_transition_confirmquotation0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Confirm Quotation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Whenever confirm button is clicked, the draft state is moved to manual. that is, quotation is moved to sale order.&quot;&quot;&quot;" name="note"/>
<field eval="'Confirm Quotation'" name="name"/>
<field eval="'Whenever confirm button is clicked, the draft state is moved to manual. that is, quotation is moved to sale order.'" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_saleorder0"/>
<field model="process.node" name="source_node_id" ref="process_node_quotation0"/>
<field eval="[(6,0,[ref('sale.trans_draft_router')])]" name="transition_ids"/>
@ -146,24 +138,24 @@
<record id="process_transition_packing0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Packing&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Packing list is created when 'Assign' is being clicked after confirming the sale order. This transaction moves the sale order to packing list.&quot;&quot;&quot;" name="note"/>
<field eval="'Packing'" name="name"/>
<field eval="'Packing list is created when the Assign button is being clicked after confirming the sale order. This transaction moves the sale order to packing list.'" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_packinglist0"/>
<field model="process.node" name="source_node_id" ref="process_node_saleorder0"/>
</record>
<record id="process_transition_deliver0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Deliver&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Confirming the packing list moves them to delivery order. This can be done by clicking on 'Validate' button.&quot;&quot;&quot;" name="note"/>
<field eval="'Deliver'" name="name"/>
<field eval="'Confirming the packing list moves them to delivery order. This can be done by clicking on the Validate button.'" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_deliveryorder0"/>
<field model="process.node" name="source_node_id" ref="process_node_packinglist0"/>
</record>
<record id="process_transition_invoice0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Invoice&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Invoice is created when 'Create Invoice' is being clicked after confirming the sale order. This transaction moves the sale order to invoices.&quot;&quot;&quot;" name="note"/>
<field eval="'Invoice'" name="name"/>
<field eval="'Invoice is created when Create Invoice is being clicked after confirming the sale order. This transaction moves the sale order to invoices.'" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_invoice0"/>
<field model="process.node" name="source_node_id" ref="process_node_saleorder0"/>
<field eval="[(6,0,[ref('sale.trans_wait_invoice_invoice_manual')])]" name="transition_ids"/>
@ -171,8 +163,8 @@
<record id="process_transition_invoiceafterdelivery0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Invoice after delivery&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;When you select Shipping Ploicy = 'Automatic Invoice after delivery' , it will automatic create after delivery.&quot;&quot;&quot;" name="note"/>
<field eval="'Invoice after delivery'" name="name"/>
<field eval="'When you select Shipping Ploicy = Automatic Invoice after delivery , it will automatic create after delivery.'" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_invoiceafterdelivery0"/>
<field model="process.node" name="source_node_id" ref="process_node_deliveryorder0"/>
</record>
@ -180,8 +172,8 @@
<record id="process_transition_saleprocurement0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Sale Procurement&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;In sale order , procuerement for each line and it comes into the procurement order&quot;&quot;&quot;" name="note"/>
<field eval="'Sale Procurement'" name="name"/>
<field eval="'In sale order , procuerement for each line and it comes into the procurement order'" name="note"/>
<field model="process.node" name="target_node_id" ref="mrp.process_node_procureproducts0"/>
<field model="process.node" name="source_node_id" ref="process_node_saleorderprocurement0"/>
</record>
@ -189,8 +181,8 @@
<record id="process_transition_saleinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Sale Invoice&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Confirm sale order and Create invoice.&quot;&quot;&quot;" name="note"/>
<field eval="'Sale Invoice'" name="name"/>
<field eval="'Confirm sale order and Create invoice.'" name="note"/>
<field model="process.node" name="target_node_id" ref="account.process_node_draftinvoices0"/>
<field model="process.node" name="source_node_id" ref="process_node_order0"/>
</record>
@ -200,72 +192,72 @@
-->
<record id="process_transition_action_confirm0" model="process.transition.action">
<field eval="&quot;&quot;&quot;action_wait&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Confirm&quot;&quot;&quot;" name="name"/>
<field eval="'action_wait'" name="action"/>
<field eval="'object'" name="state"/>
<field eval="'Confirm'" name="name"/>
<field name="transition_id" ref="process_transition_confirmquotation0"/>
</record>
<record id="process_transition_action_cancel0" model="process.transition.action">
<field eval="&quot;&quot;&quot;action_cancel&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Cancel&quot;&quot;&quot;" name="name"/>
<field eval="'action_cancel'" name="action"/>
<field eval="'object'" name="state"/>
<field eval="'Cancel'" name="name"/>
<field name="transition_id" ref="process_transition_confirmquotation0"/>
</record>
<record id="process_transition_action_assign0" model="process.transition.action">
<field eval="&quot;&quot;&quot;action_assign&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Assign&quot;&quot;&quot;" name="name"/>
<field eval="'action_assign'" name="action"/>
<field eval="'object'" name="state"/>
<field eval="'Assign'" name="name"/>
<field name="transition_id" ref="process_transition_packing0"/>
</record>
<record id="process_transition_action_forceassignation0" model="process.transition.action">
<field eval="&quot;&quot;&quot;force_assign&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Force Assignation&quot;&quot;&quot;" name="name"/>
<field eval="'force_assign'" name="action"/>
<field eval="'object'" name="state"/>
<field eval="'Force Assignation'" name="name"/>
<field name="transition_id" ref="process_transition_packing0"/>
</record>
<record id="process_transition_action_cancel1" model="process.transition.action">
<field eval="&quot;&quot;&quot;action_cancel&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Cancel&quot;&quot;&quot;" name="name"/>
<field eval="'action_cancel'" name="action"/>
<field eval="'object'" name="state"/>
<field eval="'Cancel'" name="name"/>
<field name="transition_id" ref="process_transition_packing0"/>
</record>
<record id="process_transition_action_cancelassignation0" model="process.transition.action">
<field eval="&quot;&quot;&quot;cancel_assign&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Cancel Assignation&quot;&quot;&quot;" name="name"/>
<field eval="'cancel_assign'" name="action"/>
<field eval="'object'" name="state"/>
<field eval="'Cancel Assignation'" name="name"/>
<field name="transition_id" ref="process_transition_deliver0"/>
</record>
<record id="process_transition_action_validate0" model="process.transition.action">
<field eval="&quot;&quot;&quot;test_finnished&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Validate&quot;&quot;&quot;" name="name"/>
<field eval="'test_finnished'" name="action"/>
<field eval="'object'" name="state"/>
<field eval="'Validate'" name="name"/>
<field name="transition_id" ref="process_transition_deliver0"/>
</record>
<record id="process_transition_action_cancel2" model="process.transition.action">
<field eval="&quot;&quot;&quot;action_cancel&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Cancel&quot;&quot;&quot;" name="name"/>
<field eval="'action_cancel'" name="action"/>
<field eval="'object'" name="state"/>
<field eval="'Cancel'" name="name"/>
<field name="transition_id" ref="process_transition_deliver0"/>
</record>
<record id="process_transition_action_createinvoice0" model="process.transition.action">
<field eval="&quot;&quot;&quot;action_invoice_create&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Create Invoice&quot;&quot;&quot;" name="name"/>
<field eval="'action_invoice_create'" name="action"/>
<field eval="'object'" name="state"/>
<field eval="'Create Invoice'" name="name"/>
<field name="transition_id" ref="process_transition_invoice0"/>
</record>
<record id="process_transition_action_cancelorder0" model="process.transition.action">
<field eval="&quot;&quot;&quot;action_cancel&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Cancel Order&quot;&quot;&quot;" name="name"/>
<record id="process_transition_action_cancelorder0" model="process.transition.action">
<field eval="'action_cancel'" name="action"/>
<field eval="'object'" name="state"/>
<field eval="'Cancel Order'" name="name"/>
<field name="transition_id" ref="process_transition_invoice0"/>
</record>