[MERGE] lp:~openerp-dev/openobject-addons/trunk-addons_issue2-stw
bzr revid: stw@openerp.com-20120725165856-x4gncnayenhte2eh
This commit is contained in:
commit
bf7514d6a6
|
@ -22,7 +22,7 @@
|
|||
{
|
||||
"name": "Calendar Layer",
|
||||
"version": "1.0",
|
||||
"depends": ["base", "base_status", "mail"],
|
||||
"depends": ["base", "base_status", "mail", "base_action_rule"],
|
||||
'description': """
|
||||
This is a full-featured calendar system.
|
||||
========================================
|
||||
|
|
|
@ -1028,8 +1028,8 @@ class calendar_event(osv.osv):
|
|||
'id': fields.integer('ID', readonly=True),
|
||||
'sequence': fields.integer('Sequence'),
|
||||
'name': fields.char('Description', size=64, required=False, states={'done': [('readonly', True)]}),
|
||||
'date': fields.datetime('Date', states={'done': [('readonly', True)]}),
|
||||
'date_deadline': fields.datetime('Deadline', states={'done': [('readonly', True)]}),
|
||||
'date': fields.datetime('Date', states={'done': [('readonly', True)]}, required=True,),
|
||||
'date_deadline': fields.datetime('Deadline', states={'done': [('readonly', True)]}, required=True,),
|
||||
'create_date': fields.datetime('Created', readonly=True),
|
||||
'duration': fields.float('Duration', states={'done': [('readonly', True)]}),
|
||||
'description': fields.text('Description', states={'done': [('readonly', True)]}),
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<field name="place_of_birth"/>
|
||||
</field>
|
||||
<field name="bank_account_id" position="replace">
|
||||
<field name="bank_account_id" context="{'display_partner':True, 'partner_id':partner_id}"/>
|
||||
<field name="bank_account_id" context="{'display_partner':True}"/>
|
||||
</field>
|
||||
</data>
|
||||
</field>
|
||||
|
|
|
@ -281,7 +281,6 @@
|
|||
<button string="Cancel" name="survey_req_cancel" states="draft,waiting_answer" type="object" icon="gtk-cancel"/>
|
||||
<button name="%(survey.action_view_survey_question_message)d" string="Answer Survey" type="action" states="waiting_answer,done,cancel" icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response,'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}" class="oe_highlight"/>
|
||||
<button name="action_print_survey" string="Print Survey" type="object" states="draft" icon="gtk-print" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0}" attrs="{'readonly':[('survey_id','=',False)]}" class="oe_highlight"/>
|
||||
<button name="action_print_survey" string="Print Survey" type="object" icon="gtk-print" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0}" attrs="{'readonly':[('survey_id','=',False)]}" class="oe_highlight"/>
|
||||
<button string="Send Reminder Email" name="%(mail.action_email_compose_message_wizard)d" icon="terp-mail-message-new" type="action" states="waiting_answer" class="oe_highlight"/>
|
||||
<field name="state" widget="statusbar" statusbar_visible="waiting_answer,done"/>
|
||||
</header>
|
||||
|
|
|
@ -579,7 +579,6 @@
|
|||
name="Leave Meetings"
|
||||
src_model="hr.holidays"
|
||||
res_model="crm.meeting"
|
||||
domain="[('leave_id', '=', active_id)]"
|
||||
view_mode="tree,form,calendar,gantt"
|
||||
view_type="form"/>
|
||||
|
||||
|
|
|
@ -634,7 +634,7 @@
|
|||
<field name="child_ids"/>
|
||||
</page>
|
||||
<page string="Inputs">
|
||||
<field name="input_ids" mode="tree, form">
|
||||
<field name="input_ids" mode="tree">
|
||||
<tree string="Input Data" editable="bottom">
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
|
@ -767,22 +767,6 @@
|
|||
|
||||
<!-- Shortcuts -->
|
||||
|
||||
<act_window name="Payslips"
|
||||
domain="[('employee_id', '=', active_id)]"
|
||||
context="{'search_default_employee_id': [active_id], 'default_employee_id': active_id}"
|
||||
res_model="hr.payslip"
|
||||
src_model="hr.employee"
|
||||
view_id ="view_hr_payslip_tree"
|
||||
id="act_hr_employee_payslip_list"
|
||||
groups="base.group_hr_manager"/>
|
||||
|
||||
<act_window name="Payslip Computation Details"
|
||||
domain="[('slip_id', '=', active_id)]"
|
||||
context="{'default_slip_id': active_id}"
|
||||
res_model="hr.payslip.line"
|
||||
src_model="hr.payslip"
|
||||
id="act_payslip_lines"/>
|
||||
|
||||
<act_window name="Payslip Lines"
|
||||
domain="[('register_id', '=', active_id)]"
|
||||
context="{'default_register_id': active_id, 'search_default_register_id': 1}"
|
||||
|
|
|
@ -448,6 +448,14 @@ class mrp_production(osv.osv):
|
|||
result[prod.id] = prod.date_planned[:10]
|
||||
return result
|
||||
|
||||
def _src_id_default(self, cr, uid, ids, context=None):
|
||||
src_location_id = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'stock_location_stock', context=context)
|
||||
return src_location_id.id
|
||||
|
||||
def _dest_id_default(self, cr, uid, ids, context=None):
|
||||
dest_location_id = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'stock_location_stock', context=context)
|
||||
return dest_location_id.id
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Reference', size=64, required=True),
|
||||
'origin': fields.char('Source Document', size=64, help="Reference of the document that generated this production order request."),
|
||||
|
@ -496,6 +504,8 @@ class mrp_production(osv.osv):
|
|||
'product_qty': lambda *a: 1.0,
|
||||
'name': lambda x, y, z, c: x.pool.get('ir.sequence').get(y, z, 'mrp.production') or '/',
|
||||
'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'mrp.production', context=c),
|
||||
'location_src_id': _src_id_default,
|
||||
'location_dest_id': _dest_id_default
|
||||
}
|
||||
_sql_constraints = [
|
||||
('name_uniq', 'unique(name, company_id)', 'Reference must be unique per Company!'),
|
||||
|
@ -567,10 +577,12 @@ class mrp_production(osv.osv):
|
|||
if bom_id:
|
||||
bom_point = bom_obj.browse(cr, uid, bom_id, context=context)
|
||||
routing_id = bom_point.routing_id.id or False
|
||||
|
||||
product_uom_id = product.uom_id and product.uom_id.id or False
|
||||
result = {
|
||||
'product_uom': product.uom_id and product.uom_id.id or False,
|
||||
'product_uom': product_uom_id,
|
||||
'bom_id': bom_id,
|
||||
'routing_id': routing_id
|
||||
'routing_id': routing_id,
|
||||
}
|
||||
return {'value': result}
|
||||
|
||||
|
|
Loading…
Reference in New Issue