bzr revid: apa@tinyerp.com-20100423092946-0a2tkwajwh7odaux
This commit is contained in:
apa-tiny 2010-04-23 14:59:46 +05:30
commit 0a77d5671e
13 changed files with 154 additions and 227 deletions

View File

@ -310,6 +310,7 @@ class base_action_rule_line(osv.osv):
('create','Creation Date'),
('action_last','Last Action Date'),
('date','Date'),
('deadline', 'Deadline'),
], 'Trigger Date', size=16),
'trg_date_range': fields.integer('Delay after trigger date',help="Delay After Trigger Date,\
specifies you can put a negative number " \

View File

@ -620,7 +620,9 @@ class crm_case(osv.osv):
cases = self.browse(cr, uid, ids)
cases[0].state # to fill the browse record cache
self.__history(cr, uid, cases, _('Close'))
self.write(cr, uid, ids, {'state': 'done', 'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')})
self.write(cr, uid, ids, {'state': 'done',
'date_closed': time.strftime('%Y-%m-%d %H:%M:%S'),
'probability' : 100.0})
#
# We use the cache of cases to keep the old case state
#
@ -681,7 +683,9 @@ class crm_case(osv.osv):
cases = self.browse(cr, uid, ids)
cases[0].state # to fill the browse record cache
self.__history(cr, uid, cases, _('Cancel'))
self.write(cr, uid, ids, {'state': 'cancel', 'active': True})
self.write(cr, uid, ids, {'state': 'cancel',
'active': True,
'probability' : 0.0})
self._action(cr, uid, cases, 'cancel')
return True
@ -764,7 +768,7 @@ class crm_case_history(osv.osv):
_columns = {
'description': fields.text('Description'),
'note': fields.function(_note_get, method=True, string="Description", type="text"),
'email_to': fields.char('Email TO', size=84),
'email_to': fields.char('Email To', size=84),
'email_from' : fields.char('Email From', size=84),
'log_id': fields.many2one('crm.case.log','Log',ondelete='cascade'),
'message_id': fields.char('Message Id', size=1024, readonly=True, help="Message Id on Email Server.", select=True),

View File

@ -144,7 +144,7 @@ class crm_cases(osv.osv):
select = ids
for case in self.browse(cr, uid, select):
user_email = (case.user_id and case.user_id.address_id and case.user_id.address_id.email) or False
res += [(user_email, case.email_from, case.email_cc, getattr(case,'priority') and case.priority or False)]
res += [(user_email, case.email_from, case.email_cc or False, getattr(case,'priority') and case.priority or False)]
if isinstance(ids, (str, int, long)):
return len(res) and res[0] or False
return res

View File

@ -27,7 +27,7 @@ import time
import mx.DateTime
AVAILABLE_STATES = [
('draft','New'),
('draft','Draft'),
('open','Open'),
('cancel', 'Lost'),
('done', 'Converted'),
@ -190,6 +190,7 @@ class crm_opportunity(osv.osv):
_defaults = {
'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.opportunity', context=c),
'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
'state' : 'draft',
}
def action_makeMeeting(self, cr, uid, ids, context=None):

View File

@ -183,6 +183,7 @@ class email_parser(object):
'email_cc': msg_cc,
'user_id': False,
'description': message['body'],
'state' : 'draft',
}
data.update(self.partner_get(msg_from))

View File

@ -1,43 +1,39 @@
<openerp>
<data>
<data>
<!-- CRM Email Add CC Form View -->
<!-- CRM Email Add CC Form View -->
<record id="view_crm_email_add_cc_wizard" model="ir.ui.view">
<record id="view_crm_email_add_cc_wizard" model="ir.ui.view">
<field name="name">Add CC</field>
<field name="model">crm.email.add.cc</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Add CC">
<field name="name" width="200" />
<field name="subject" width="200" />
<separator colspan="4" string="" />
<group col="2" colspan="2" attrs="{ 'invisible' : [('name','!=','user')]}">
<field name="user_id"
attrs="{ 'required' : [('name','=','user')]}"
on_change="on_change_email(user_id, partner_id)" />
</group>
<newline />
<group col="2" colspan="2"
attrs="{ 'invisible' : [('name','!=','partner')]}">
<field name="partner_id"
attrs="{'required' : [('name','=','partner')]}"
on_change="on_change_email(user_id, partner_id)" />
</group>
<newline />
<field name="email" attrs="{ 'required' : [('name','=','email')]}" />
<newline />
<separator colspan="4" string="" />
<group col="2" colspan="4">
<label string="" />
<button name="add_cc" string="_Add"
type="object" icon="gtk-ok" />
</group>
</form>
<form string="Forward">
<field name="name" width="200" />
<field name="subject" colspan="4" />
<separator colspan="4" string="" />
<group col="2" colspan="2" attrs="{ 'invisible' : [('name','!=','user')]}">
<field name="user_id"
attrs="{ 'required' : [('name','=','user')]}"
on_change="on_change_email(user_id, partner_id)" />
</group>
<newline />
<group col="2" colspan="2"
attrs="{ 'invisible' : [('name','!=','partner')]}">
<field name="partner_id"
attrs="{'required' : [('name','=','partner')]}"
on_change="on_change_email(user_id, partner_id)" />
</group>
<field colspan="4" name="email" attrs="{ 'required' : [('name','=','email')]}" />
<separator colspan="4" string="" />
<group col="1" colspan="4">
<button name="add_cc" string="_Forward" type="object" icon="gtk-ok" />
</group>
</form>
</field>
</record>
<!-- CRM Email Add CC Action -->
<!-- CRM Email Add CC Action -->
<record id="action_view_crm_email_add_cc_wizard" model="ir.actions.act_window">
<field name="name">Add CC</field>
@ -48,5 +44,5 @@
<field name="target">new</field>
</record>
</data>
</data>
</openerp>

View File

@ -51,74 +51,82 @@ class crm_lead2opportunity(osv.osv_memory):
@return : Dictionary value for created Opportunity form
"""
value = {}
record_id = context and context.get('active_id', False) or False
if record_id:
lead_obj = self.pool.get('crm.lead')
opp_obj = self. pool.get('crm.opportunity')
data_obj = self.pool.get('ir.model.data')
history_obj = self.pool.get('crm.case.history')
model_obj = self.pool.get('ir.model')
if not record_id:
return {}
# Get Opportunity views
result = data_obj._get_id(cr, uid, 'crm', 'view_crm_case_opportunities_filter')
res = data_obj.read(cr, uid, result, ['res_id'])
id2 = data_obj._get_id(cr, uid, 'crm', 'crm_case_form_view_oppor')
id3 = data_obj._get_id(cr, uid, 'crm', 'crm_case_tree_view_oppor')
if id2:
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
if id3:
id3 = data_obj.browse(cr, uid, id3, context=context).res_id
lead_obj = self.pool.get('crm.lead')
opp_obj = self. pool.get('crm.opportunity')
data_obj = self.pool.get('ir.model.data')
history_obj = self.pool.get('crm.case.history')
model_obj = self.pool.get('ir.model')
lead = lead_obj.browse(cr, uid, record_id, context=context)
model_ids = model_obj.search(cr, uid, [('model', '=', 'crm.opportunity')])
# Get Opportunity views
result = data_obj._get_id(cr, uid, 'crm', 'view_crm_case_opportunities_filter')
res = data_obj.read(cr, uid, result, ['res_id'])
id2 = data_obj._get_id(cr, uid, 'crm', 'crm_case_form_view_oppor')
id3 = data_obj._get_id(cr, uid, 'crm', 'crm_case_tree_view_oppor')
if id2:
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
if id3:
id3 = data_obj.browse(cr, uid, id3, context=context).res_id
lead = lead_obj.browse(cr, uid, record_id, context=context)
model_ids = model_obj.search(cr, uid, [('model', '=', 'crm.opportunity')])
for this in self.browse(cr, uid, ids, context=context):
new_opportunity_id = opp_obj.create(cr, uid, {
'name': this.name,
'referred': this.referred,
'planned_revenue': this.planned_revenue,
'probability': this.probability,
'partner_id': lead.partner_id and lead.partner_id.id or False ,
'section_id': lead.section_id and lead.section_id.id or False,
'description': lead.description or False,
'date_deadline': lead.date_deadline or False,
'partner_address_id': lead.partner_address_id and \
lead.partner_address_id.id or False ,
'priority': lead.priority,
'phone': lead.phone,
'email_from': lead.email_from
})
new_opportunity = opp_obj.browse(cr, uid, new_opportunity_id)
vals = {
'partner_id': this.partner_id and this.partner_id.id or False,
}
if not lead.opportunity_id:
vals.update({'opportunity_id' : new_opportunity.id})
for this in self.browse(cr, uid, ids, context=context):
new_opportunity_id = opp_obj.create(cr, uid, {
'name': this.name,
'referred': lead.referred,
'planned_revenue': this.planned_revenue,
'probability': this.probability,
'partner_id': lead.partner_id and lead.partner_id.id or False,
'section_id': lead.section_id and lead.section_id.id or False,
'description': lead.description or False,
'date_deadline': lead.date_deadline or False,
'partner_address_id': lead.partner_address_id and lead.partner_address_id.id or False ,
'priority': lead.priority,
'phone': lead.phone,
'email_from': lead.email_from
})
new_opportunity = opp_obj.browse(cr, uid, new_opportunity_id)
vals = {
'partner_id': this.partner_id and this.partner_id.id or False,
}
if not lead.opportunity_id:
vals.update({'opportunity_id' : new_opportunity.id})
lead_obj.write(cr, uid, [lead.id], vals)
lead_obj.case_close(cr, uid, [lead.id])
# Copy lead history to opportunity
for his_id in lead.history_line:
history_ids = history_obj.copy(cr, uid, his_id.id, \
{'model_id': model_ids[0], \
'res_id': new_opportunity_id})
model_opportunity_id = self.pool.get('ir.model').search(cr, uid, [('model', '=', 'crm.opportunity')], context=context)[0]
opp_obj.case_open(cr, uid, [new_opportunity_id])
for model in ('crm.case.log', 'crm.case.history'):
log_proxy = self.pool.get(model)
log_ids = log_proxy.search(cr, uid, [('model_id.model', '=', 'crm.lead'),('res_id', '=', lead.id)], context=context)
for log_id in log_ids:
log_proxy.copy(cr, uid, log_id, {'model_id':model_opportunity_id}, context=context)
value = {
'name': _('Opportunity'),
'view_type': 'form',
'view_mode': 'form,tree',
'res_model': 'crm.opportunity',
'res_id': int(new_opportunity_id),
'view_id': False,
'views': [(id2, 'form'), (id3, 'tree'), (False, 'calendar'), (False, 'graph')],
'type': 'ir.actions.act_window',
'search_view_id': res['res_id']
}
lead_obj.write(cr, uid, [lead.id], vals)
lead_obj.case_close(cr, uid, [lead.id])
# Copy lead history to opportunity
for his_id in lead.history_line:
history_ids = history_obj.copy(cr, uid, his_id.id, \
{'model_id': model_ids[0], \
'res_id': new_opportunity_id})
#opp_obj.case_open(cr, uid, [new_opportunity_id])
value = {
'name': _('Opportunity'),
'view_type': 'form',
'view_mode': 'form,tree',
'res_model': 'crm.opportunity',
'res_id': int(new_opportunity_id),
'view_id': False,
'views': [(id2, 'form'), (id3, 'tree'), (False, 'calendar'), (False, 'graph')],
'type': 'ir.actions.act_window',
'search_view_id': res['res_id']
}
return value
_columns = {

View File

@ -9,26 +9,26 @@
<field name="model">crm.send.mail</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Send New Mail" col="4">
<field name="email_to" />
<field name="email_cc"/>
<field name="subject" colspan="4"/>
<group colspan="4" string="Extended Options" expand="1">
<field name="email_from" />
<field name="doc1" filename="doc1_fname"/>
<field name="doc1_fname"/>
<field name="doc2" filename="doc2_fname" />
<field name="doc2_fname"/>
<field name="doc3" filename="doc3_fname" />
<field name="doc3_fname"/>
</group>
<separator string="" colspan="4"/>
<field name="text" nolabel="1" colspan="4"/>
<newline/>
<field name="state" />
<separator string=" " colspan="4"/>
<group colspan="4" col="3" >
<label string=" " />
<form string="Send New Mail" col="2">
<field name="email_from" />
<field name="email_to" />
<field name="email_cc" />
<field name="subject" />
<notebook colspan="2">
<page string="Message">
<field name="text" nolabel="1" colspan="4"/>
</page>
<page string="Attachments">
<field name="doc1" filename="doc1_fname"/>
<field name="doc1_fname"/>
<field name="doc2" filename="doc2_fname" />
<field name="doc2_fname"/>
<field name="doc3" filename="doc3_fname" />
<field name="doc3_fname"/>
</page>
</notebook>
<group colspan="2" col="4" >
<field name="state" />
<button name="action_cancel" string="_Cancel" icon="gtk-cancel" special="cancel" />
<button name="action_send" type="object" string="_Send" icon="gtk-go-forward" />
</group>

View File

@ -56,7 +56,7 @@
'hr_holidays_wizard.xml',
'hr_holidays_report.xml',
'report/hr_holidays_report_view.xml',
'report/available_holidays_view.xml'
'report/available_holidays_view.xml',
'wizard/hr_holidays_summary_department_view.xml',
'wizard/hr_holidays_summary_employees_view.xml',
#'process/hr_holidays_process.xml'

View File

@ -28,7 +28,7 @@
When a purchase order is created, you now have the opportunity to save the related requisition.
This new object will regroup and will allow you to easily keep track and order all your purchase orders.
""",
"depends" : ["purchase"],
"depends" : ["purchase","mrp"],
"init_xml" : [],
"demo_xml" : [],
"update_xml" : ["wizard/purchase_requisition_partner_view.xml",

View File

@ -49,7 +49,7 @@ class purchase_requisition(osv.osv):
'user_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).id ,
'name': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'purchase.order.requisition'),
}
purchase_tender()
def tender_cancel(self, cr, uid, ids, context={}):
purchase_order_obj = self.pool.get('purchase.order')
@ -129,6 +129,7 @@ class purchase_order(osv.osv):
purchase_order()
class product_product(osv.osv):
_inherit = 'product.product'
_columns = {

View File

@ -74,9 +74,9 @@
<group col="8" colspan="4">
<field name="state" select="1" readonly ="1"/>
<button name="tender_in_progress" states="draft" string="Confirm" type="object" icon="gtk-apply" />
<button name="tender_cancel" states="draft,in_progress" string="Cancel" type="object" icon="gtk-cancel" />
<button name="tender_reset" states="done,cancel" string="Reset to Draft" type="object" icon="gtk-convert" />
<button name="tender_done" states="in_progress" string="Done" type="object" icon="gtk-jump-to" />
<button name="tender_cancel" states="draft,in_progress" string="Cancel" type="object" icon="gtk-cancel" />
</group>

View File

@ -266,7 +266,7 @@
<field name="arch" type="xml">
<search string="Product Lots Filter">
<group col="10" colspan="4">
<filter icon="terp-stock" string="Available" domain="[('stock_available', '&gt;', 0)]" help="Available Product Lots" default="1" />
<filter icon="terp-stock" name="available" string="Available" domain="[('stock_available', '&gt;', 0)]" help="Available Product Lots" />
<separator orientation="vertical"/>
<field name="prefix" select="1"/>
<field name="name" select="1"/>
@ -289,7 +289,7 @@
<field name="view_type">form</field>
<field name="view_id" ref="view_production_lot_tree"/>
<field name="search_view_id" ref="search_product_lot_filter" />
<field name="context">{'full':'1'}</field>
<field name="context">{'full':'1',"search_default_available":1}</field>
</record>
<menuitem action="action_production_lot_form" id="menu_action_production_lot_form" parent="menu_traceability" groups="base.group_extended"/>
@ -423,6 +423,7 @@
</form>
</field>
</record>
<record id="view_location_search" model="ir.ui.view">
<field name="name">stock.location.search</field>
<field name="model">stock.location</field>
@ -622,9 +623,9 @@
states="draft,waiting,confirmed,assigned" />
<button name="%(stock.move_scrap)d"
string="Scrap Products" type="action"
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" />
string="Scrap Products" type="action"
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" />
</tree>
<form string="Stock Moves">
<notebook colspan="4">
@ -665,10 +666,6 @@
</notebook>
</form>
</field>
<group col="7" colspan="4">
<label colspan="6"/>
<button name="%(act_split_moves)d" string="Split Entry Lines in two" type="action" icon="gtk-justify-fill"/>
</group>
<group col="10" colspan="4">
<field name="state" readonly="1"/>
<button name="draft_force_assign" states="draft" string="Confirm (Do Not Process Now)" type="object" icon="gtk-apply"/>
@ -702,7 +699,7 @@
<field name="arch" type="xml">
<search string="Search Stock Picking">
<group col="10" colspan="4">
<filter icon="terp-stock" string="Available" domain="[('state','=','assigned')]" help="Available Pickings" default="1" />
<filter icon="terp-stock" name="available" string="Available" domain="[('state','=','assigned')]" help="Available Pickings"/>
<filter icon="terp-stock" string="Confirmed" domain="[('state','=','confirmed')]" help="Confirmed Pickings"/>
<separator orientation="vertical"/>
<filter icon="terp-stock" string="Back Order" domain="[('backorder_id', '!=', False)]" help="Has Back Order" />
@ -753,7 +750,6 @@
<field name="backorder_id" readonly="1"/>
<field name="date" />
<field name="min_date" select="1"/>
<field name="type"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
</group>
<notebook colspan="4">
@ -777,9 +773,9 @@
groups="base.group_extended"
states="draft,waiting,confirmed,assigned" />
<button name="%(stock.move_scrap)d"
string="Scrap Products" type="action"
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" />
string="Scrap Products" type="action"
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" />
</tree>
<form string="Stock Moves">
<notebook colspan="4">
@ -815,10 +811,6 @@
</notebook>
</form>
</field>
<group col="7" colspan="4">
<label colspan="6"/>
<button name="%(act_split_moves)d" string="Split in Two" type="action" states="assigned,confirmed,draft,auto" icon="gtk-justify-fill"/>
</group>
<group col="10" colspan="4">
<field name="state" readonly="1"/>
<button name="draft_force_assign" states="draft" string="Process Later" type="object" icon="gtk-ok"/>
@ -852,7 +844,7 @@
<field name="arch" type="xml">
<search string="Search Stock Delivery">
<group col="10" colspan="4">
<filter icon="terp-stock" string="Available" domain="[('state','=','assigned')]" help="Assigned Orders" default="1"/>
<filter icon="terp-stock" name="available" string="Available" domain="[('state','=','assigned')]" help="Assigned Orders" />
<filter icon="terp-stock" string="Confirmed" domain="[('state','=','confirmed')]" help="Confirmed Orders"/>
<separator orientation="vertical"/>
<filter icon="terp-stock" string="Back Order" domain="[('backorder_id','!=',False)]" help="Back Order"/>
@ -878,7 +870,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar</field>
<field name="domain">[('type','=','delivery')]</field>
<field name="context">{'contact_display': 'partner'}</field>
<field name="context">{'contact_display': 'partner',"search_default_available":1}</field>
<field name="search_view_id" ref="view_stock_delivery_filter"/>
</record>
<record id="action_picking_tree_delivery_view1" model="ir.actions.act_window.view">
@ -999,10 +991,6 @@
</notebook>
</form>
</field>
<group col="7" colspan="4">
<label colspan="6"/>
<button name="%(act_split_moves)d" string="Split in Two" type="action" icon="gtk-justify-fill"/>
</group>
<group col="10" colspan="4">
<field name="state" readonly="1"/>
<button name="draft_force_assign" states="draft" string="Process Later" type="object" icon="gtk-ok"/>
@ -1013,9 +1001,6 @@
<button name="button_cancel" states="assigned,confirmed,draft" string="Cancel" icon="gtk-cancel"/>
</group>
</page>
<page string="Delivery Info">
<field colspan="4" name="delivery_line" nolabel="1"/>
</page>
<page string="Notes">
<field colspan="4" name="note" nolabel="1"/>
</page>
@ -1136,9 +1121,9 @@
type="action" icon="gtk-justify-fill"
states="draft,waiting,confirmed,assigned" />
<button name="%(stock.move_scrap)d"
string="Scrap Products" type="action"
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" />
string="Scrap Products" type="action"
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" />
</tree>
<form string="Stock Moves">
<notebook colspan="4">
@ -1193,9 +1178,6 @@
<button name="button_cancel" states="assigned,confirmed,draft" string="Cancel" icon="gtk-cancel"/>
</group>
</page>
<page string="Delivery Info">
<field colspan="4" name="delivery_line" nolabel="1"/>
</page>
<page string="Notes">
<field colspan="4" name="note" nolabel="1"/>
</page>
@ -1211,7 +1193,7 @@
<field name="arch" type="xml">
<search string="Input Picking List">
<group col="8" colspan="4">
<filter icon="terp-stock" string="Available" domain="[('state','=','assigned')]" help="Assigned Incoming Orders" default="1" />
<filter icon="terp-stock" name="available" string="Available" domain="[('state','=','assigned')]" help="Assigned Incoming Orders" />
<separator orientation="vertical"/>
<filter icon="terp-stock" string="Back Order" domain="[('backorder_id', '!=', False)]" help="Has Back Order" />
<separator orientation="vertical"/>
@ -1231,13 +1213,13 @@
<record id="action_picking_tree4" model="ir.actions.act_window">
<field name="name">Incoming shipments</field>
<field name="name">Incoming Shipments</field>
<field name="res_model">stock.picking</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar</field>
<field name="domain">[('type','=','in')]</field>
<field name="context">{'contact_display': 'partner'}</field>
<field name="context">{'contact_display': 'partner',"search_default_available":1}</field>
<field name="search_view_id" ref="view_picking_in_search"/>
</record>
<record id="action_invoice_tree5_view1" model="ir.actions.act_window.view">
@ -1267,7 +1249,7 @@
<search string="Internal Picking List">
<group col="8" colspan="4">
<filter icon="terp-stock" string="Available" domain="[('state','=','assigned')]" help="Assigned Internal Moves"/>
<filter icon="terp-stock" string="Confirmed" domain="[('state','=','confirmed')]" help="Confirmed Internal Moves" default="1" />
<filter icon="terp-stock" name="confirmed" string="Confirmed" domain="[('state','=','confirmed')]" help="Confirmed Internal Moves" />
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="origin" select="1"/>
@ -1290,7 +1272,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar</field>
<field name="domain">[('type','=','internal')]</field>
<field name="context">{'contact_display': 'partner'}</field>
<field name="context">{'contact_display': 'partner',"search_default_confirmed":1}</field>
<field name="search_view_id" ref="view_picking_internal_search"/>
</record>
<menuitem action="action_picking_tree6" id="menu_action_picking_tree6" parent="menu_stock_warehouse_mgmt" sequence="2"/>
@ -1413,24 +1395,6 @@
</record>
<menuitem action="action_move_form2" id="menu_action_move_form2" parent="menu_traceability" sequence="1"/>
<record id="action_picking_all" model="ir.actions.act_window">
<field name="name">Picking lists</field>
<field name="res_model">stock.picking</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar</field>
<field name="search_view_id" ref="view_stock_picking_filter"/>
<field name="domain">[('type','=','out')]</field>
<field name="context">{'contact_display': 'partner'}</field>
</record>
<record id="action_picking_out_tree_view" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_picking_out_tree"/>
<field name="act_window_id" ref="action_picking_all"/>
</record>
<menuitem action="action_picking_all" id="menu_action_picking_all" parent="menu_stock_warehouse_mgmt" sequence="3"/>
====================================
Reception Picking (By Stock Move)
====================================
@ -1517,7 +1481,7 @@
<field name="arch" type="xml">
<search string="Stock Moves">
<group col="8" colspan="4">
<filter icon="terp-stock" string="To Receive" domain="[('state','in',('confirmed','assigned'))]" default="1" help="Stock to be received"/>
<filter icon="terp-stock" name="receive" string="To Receive" domain="[('state','in',('confirmed','assigned'))]" help="Stock to be received"/>
<filter icon="terp-stock" string="Back Orders" domain="[('backorder_id','!=',False)]" help="Back Orders"/>
<filter icon="terp-stock" string="Planned Today" domain="[('date_planned::date','=',time.strftime('%%Y-%%m-%%d'))]" help="Orders planned for today"/>
<separator orientation="vertical"/>
@ -1543,6 +1507,7 @@
<field name="view_mode">tree,form</field>
<field name="domain">[('picking_id','!=',False),('picking_id.type','=','in')]</field>
<field name="view_id" ref="view_move_tree_reception_picking"/>
<field name="context">{"search_default_receive":1}</field>
<field name="search_view_id" ref="view_move_search_reception_picking"/>
</record>
@ -1716,56 +1681,6 @@
<field name="view_mode">graph,tree</field>
<field name="view_id" ref="view_move_delivery_products_planned_graph"/>
</record>
<!-- Product Delivered -->
<record id="view_stock_delivery_form" model="ir.ui.view">
<field name="name">stock.delivery.from</field>
<field name="model">stock.delivery</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Product">
<field name="name"/>
<field name="date"/>
<field name="partner_id"/>
<field name="address_id"/>
<field name="picking_id"/>
<separator string="Product Delivered Information" colspan="4" />
<field name="move_delivered" colspan="4" nolabel="1" widget="one2many" mode="tree,form">
<tree string="Stock Moves" editable="top">
<field name="picking_id" string="Reference"/>
<field name="origin" string="Latest Requisition"/>
<field name="partner_id" string="Supplier"/>
<field name="product_id"/>
<field name="product_qty" />
<field name="product_uom" string="UOM"/>
<field name="prodlot_id" string="Lot"/>
</tree>
</field>
</form>
</field>
</record>
<record id="view_stock_delivery_tree" model="ir.ui.view">
<field name="name">stock.delivery.tree</field>
<field name="model">stock.delivery</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Delivered Product">
<field name="name"/>
<field name="date"/>
<field name="partner_id"/>
<field name="address_id"/>
</tree>
</field>
</record>
<record id="action_stock_delivery" model="ir.actions.act_window">
<field name="name">Delivered Products</field>
<field name="res_model">stock.delivery</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="view_id" ref="view_stock_delivery_tree"/>
</record>
<menuitem action="action_stock_delivery" id="menu_action_picking_all" parent="menu_traceability" sequence="4"/>
</data>
</openerp>