bzr revid: fp@tinyerp.com-20080917075113-x8mpx0v9qwx4e4na
This commit is contained in:
Fabien Pinckaers 2008-09-17 09:51:13 +02:00
commit cc98c75061
8 changed files with 81 additions and 50 deletions

View File

@ -1758,7 +1758,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
'company_id':fields.many2one('res.company','Company',required=True),
'chart_template_id': fields.many2one('account.chart.template','Chart Template',required=True),
'bank_accounts_id': fields.one2many('account.bank.accounts.wizard', 'bank_account_id', 'Bank Accounts',required=True),
'code_digits':fields.integer('No. of Digits for Account Code',required=True),
'code_digits':fields.integer('# of Digits',required=True,help="No. of Digits to use for account code"),
}
def action_create(self, cr, uid, ids, context=None):
@ -1980,7 +1980,22 @@ class wizard_multi_charts_accounts(osv.osv_memory):
#create the property
property_obj.create(cr, uid, vals)
return {}
return {
'view_type': 'form',
"view_mode": 'form',
'res_model': 'ir.module.module.configuration.wizard',
'type': 'ir.actions.act_window',
'target':'new',
}
def action_cancel(self,cr,uid,ids,conect=None):
return {
'view_type': 'form',
"view_mode": 'form',
'res_model': 'ir.module.module.configuration.wizard',
'type': 'ir.actions.act_window',
'target':'new',
}
wizard_multi_charts_accounts()

View File

@ -1336,7 +1336,7 @@
<field name="date2"/>
<separator string="" colspan="4"/>
<label string="" colspan="2"/>
<group col="4" colspan="4">
<group col="2" colspan="2">
<button icon="gtk-cancel" special="cancel" string="Don't Create" name="action_cancel" type="object"/>
<button icon="gtk-ok" name="action_create" string="Create" type="object"/>
</group>
@ -1576,15 +1576,16 @@
<!-- Wizard for Multi Charts of Accounts -->
<record id="view_wizard_multi_chart" model="ir.ui.view">
<field name="name">Create Multiple Charts of Accounts</field>
<field name="name">Generate Chart of Accounts from a Chart Template</field>
<field name="model">wizard.multi.charts.accounts</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Create Multiple Charts of Accounts">
<form string="Generate Chart of Accounts from a Chart Template">
<separator col="4" colspan="4" string="Generate Chart of Accounts from a Chart Template"/>
<field name="company_id" />
<field name="chart_template_id" />
<field name ="code_digits" />
<field colspan="4" mode="tree" name="bank_accounts_id" nolabel="1" widget="one2many_list">
<field name ="code_digits" />
<field name="chart_template_id" colspan="4"/>
<field colspan="4" mode="tree" name="bank_accounts_id" nolabel="1" widget="one2many_list">
<form string="Bank Information">
<field name="acc_no"/>
<field name="currency_id"/>
@ -1594,8 +1595,10 @@
<field name="currency_id"/>
</tree>
</field>
<group col="4" colspan="4">
<button icon="gtk-cancel" special="cancel" type="object" string="Cancel"/>
<separator string="" colspan="4"/>
<label string="" colspan="2"/>
<group col="2" colspan="2">
<button icon="gtk-cancel" special="cancel" type="object" name="action_cancel" string="Cancel"/>
<button icon="gtk-ok" name="action_create" string="Create" type="object"/>
</group>
</form>

View File

@ -102,6 +102,15 @@ class res_partner_job(osv.osv):
res[id.id] = id.address_id.partner_id.id
return res
def search(self, cr, user, args, offset=0, limit=None, order=None,
context=None, count=False):
for arg in args:
if arg[0]=='address_id':
self._order = 'sequence_partner'
if arg[0]=='contact_id':
self._order = 'sequence_contact'
return super(res_partner_job,self).search(cr, user, args, offset, limit, order, context, count)
_name = 'res.partner.job'
_description ='Contact Function'
_order = 'sequence_contact'

View File

@ -664,8 +664,8 @@ class mrp_procurement(osv.osv):
'name': fields.char('Name', size=64, required=True),
'origin': fields.char('Origin', size=64),
'priority': fields.selection([('0','Not urgent'),('1','Normal'),('2','Urgent'),('3','Very Urgent')], 'Priority', required=True),
'date_planned': fields.date('Scheduled date', required=True),
'date_close': fields.date('Date Closed'),
'date_planned': fields.datetime('Scheduled date', required=True),
'date_close': fields.datetime('Date Closed'),
'product_id': fields.many2one('product.product', 'Product', required=True),
'product_qty': fields.float('Quantity', required=True),
'product_uom': fields.many2one('product.uom', 'Product UoM', required=True),

View File

@ -78,7 +78,7 @@ class process_process(osv.osv):
if node.flow_start:
start.append(node.id)
for tr in node.transition_ids:
for tr in node.transition_out:
data = {}
data['name'] = tr.name
data['source'] = tr.source_node_id.id
@ -89,10 +89,11 @@ class process_process(osv.osv):
button['name'] = b.name
buttons.append(button)
data['roles'] = roles = []
for r in tr.role_ids:
role = {}
role['name'] = r.name
roles.append(role)
for r in tr.transition_ids:
if r.role_id:
role = {}
role['name'] = r.role_id.name
roles.append(role)
transitions[tr.id] = data
g = tools.graph(nodes.keys(), map(lambda x: (x['source'], x['target']), transitions.values()))
@ -130,7 +131,8 @@ class process_node(osv.osv):
'model_id': fields.many2one('ir.model', 'Object', ondelete='set null'),
'model_states': fields.char('States Expression', size=128),
'flow_start': fields.boolean('Starting Flow'),
'transition_ids': fields.one2many('process.transition', 'source_node_id', 'Transitions'),
'transition_in': fields.one2many('process.transition', 'target_node_id', 'Starting Transitions'),
'transition_out': fields.one2many('process.transition', 'source_node_id', 'Ending Transitions'),
}
_defaults = {
'kind': lambda *args: 'state',
@ -147,7 +149,7 @@ class process_transition(osv.osv):
'source_node_id': fields.many2one('process.node', 'Source Node', required=True, ondelete='cascade'),
'target_node_id': fields.many2one('process.node', 'Target Node', required=True, ondelete='cascade'),
'action_ids': fields.one2many('process.transition.action', 'transition_id', 'Buttons'),
'role_ids': fields.many2many('res.roles', 'process_transition_roles_rel', 'process_transition_id', 'role_id', 'Roles Required'),
'transition_ids': fields.many2many('workflow.transition', 'process_transition_ids', 'ptr_id', 'wtr_id', 'Workflow Transitions'),
'note': fields.text('Description'),
}
process_transition()

View File

@ -33,8 +33,8 @@
<field name="model_states"/>
</group>
<notebook colspan="4">
<page string="Transitions">
<field name="transition_ids" colspan="4" nolabel="1">
<page string="Outgoing Transitions">
<field name="transition_out" colspan="4" nolabel="1">
<tree string="Transitions">
<field name="name"/>
<field name="target_node_id"/>
@ -62,7 +62,7 @@
</field>
</page>
<page string="Roles Required">
<field name="role_ids" colspan="4" nolabel="1"/>
<field name="transition_ids" colspan="4" nolabel="1"/>
</page>
<page string="Extra Information">
<field name="note" colspan="4" nolabel="1"/>
@ -130,30 +130,33 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Process Transition">
<field name="name" select="1"/>
<newline/>
<field name="source_node_id" select="1"/>
<field name="target_node_id" select="1"/>
<group string="Details">
<field name="name" select="1"/>
<newline/>
<field name="source_node_id" select="1"/>
<field name="target_node_id" select="1"/>
</group>
<notebook colspan="4">
<page string="Actions">
<field name="action_ids" nolabel="1" colspan="4">
<tree string="Actions">
<field name="name"/>
<field name="state"/>
<field name="action"/>
</tree>
<form string="Actions">
<field name="name" colspan="4"/>
<newline/>
<field name="state"/>
<field name="action"/>
</form>
</field>
</page><page string="Roles">
<field name="role_ids" nolabel="1" colspan="4"/>
</page><page string="Notes">
<field name="note" nolabel="1" colspan="4"/>
</page>
<page string="Actions">
<field name="action_ids" nolabel="1" colspan="4">
<tree string="Actions">
<field name="name"/>
<field name="state"/>
<field name="action"/>
</tree>
<form string="Actions">
<field name="name" colspan="4"/>
<newline/>
<field name="state"/>
<field name="action"/>
</form>
</field>
</page>
<page string="Roles">
<field name="transition_ids" nolabel="1" colspan="4"/>
</page><page string="Notes">
<field name="note" nolabel="1" colspan="4"/>
</page>
</notebook>
</form>
</field>
@ -170,6 +173,5 @@
action="action_process_transition_form"
parent="menu_process"/>
</data>
</openerp>

View File

@ -30,8 +30,8 @@ from osv import fields, osv
import pooler
class config_install_extra_modules(osv.osv_memory):
_name='config.install_extra_modules.mrp'
class profile_manufacturing_config_install_modules_wizard(osv.osv_memory):
_name='profile.manufacturing.config.install_modules_wizard'
_columns = {
'mrp_jit':fields.boolean('Just in Time Scheduling',
help="The JIT module allows you to not run the scheduler "\
@ -94,7 +94,7 @@ class config_install_extra_modules(osv.osv_memory):
'type': 'ir.actions.act_window',
'target':'new',
}
config_install_extra_modules()
profile_manufacturing_config_install_modules_wizard()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -478,7 +478,7 @@
<field name="type">calendar</field>
<field name="priority" eval="2"/>
<field name="arch" type="xml">
<calendar string="Calendar View" date_start="date" color="state">
<calendar string="Calendar View" date_start="min_date" date_stop="max_date" color="address_id">
<field name="name"/>
<field name="type"/>
<field name="address_id"/>