parent
efcafbb313
commit
c6eae9c717
|
@ -17,6 +17,6 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
import claim_delivery
|
||||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# OpenERP, Open Source Management Solution
|
||||||
|
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero General Public License as
|
||||||
|
# published by the Free Software Foundation, either version 3 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 Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
from osv import fields, osv
|
||||||
|
|
||||||
|
class stock_picking(osv.osv):
|
||||||
|
_inherit = "stock.picking"
|
||||||
|
_columns = {
|
||||||
|
'partner_id': fields.related('address_id','partner_id',type='many2one', relation="res.partner", string="Partner"),
|
||||||
|
}
|
||||||
|
stock_picking()
|
|
@ -1,12 +1,32 @@
|
||||||
<openerp>
|
<openerp>
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
|
<record id="view_picking_delivery" model="ir.ui.view">
|
||||||
|
<field name="name">stock.picking.delivery.form20</field>
|
||||||
|
<field name="model">stock.picking</field>
|
||||||
|
<field name="type">form</field>
|
||||||
|
<field name="priority" eval="2"/>
|
||||||
|
<field name="inherit_id" ref="stock.view_picking_delivery_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//form/group/field[@name='date']" position="after">
|
||||||
|
<field name="partner_id" invisible="1"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<act_window
|
<act_window
|
||||||
id="act_claim_from_delivery"
|
id="action_claim_from_delivery"
|
||||||
name="Claim"
|
name="Claim"
|
||||||
|
domain="[]"
|
||||||
target="current"
|
target="current"
|
||||||
view_mode="form"
|
view_mode="form"
|
||||||
res_model="crm.claim"
|
res_model="crm.claim"
|
||||||
src_model="stock.picking"/>
|
src_model="stock.picking"/>
|
||||||
|
|
||||||
|
|
||||||
|
<record id="action_claim_from_delivery" model="ir.actions.act_window">
|
||||||
|
<field name="context">{'default_partner_address_id': address_id, 'default_partner_id': partner_id}</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
</data>
|
</data>
|
||||||
</openerp>
|
</openerp>
|
||||||
|
|
|
@ -74,7 +74,8 @@ class crm_claim(osv.osv, crm.crm_case):
|
||||||
'company_id': fields.many2one('res.company', 'Company'),
|
'company_id': fields.many2one('res.company', 'Company'),
|
||||||
'partner_id': fields.many2one('res.partner', 'Partner'),
|
'partner_id': fields.many2one('res.partner', 'Partner'),
|
||||||
'partner_address_id': fields.many2one('res.partner.address', 'Partner Contact', \
|
'partner_address_id': fields.many2one('res.partner.address', 'Partner Contact', \
|
||||||
domain="[('partner_id','=',partner_id)]"),
|
# domain="[('partner_id','=',partner_id)]"
|
||||||
|
),
|
||||||
'email_cc': fields.text('Watchers Emails', size=252, help="These people will receive a copy of the future communication between partner and users by email"),
|
'email_cc': fields.text('Watchers Emails', size=252, help="These people will receive a copy of the future communication between partner and users by email"),
|
||||||
'email_from': fields.char('Email', size=128, help="These people will receive email."),
|
'email_from': fields.char('Email', size=128, help="These people will receive email."),
|
||||||
'partner_name': fields.char("Employee's Name", size=64),
|
'partner_name': fields.char("Employee's Name", size=64),
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
import datetime
|
import datetime
|
||||||
from osv import fields, osv
|
from osv import fields, osv
|
||||||
import pooler
|
import pooler
|
||||||
|
import time
|
||||||
|
|
||||||
class stock_production_lot(osv.osv):
|
class stock_production_lot(osv.osv):
|
||||||
_name = 'stock.production.lot'
|
_name = 'stock.production.lot'
|
||||||
|
|
|
@ -68,5 +68,13 @@ class stock_move_split_lines_exist(osv.osv_memory):
|
||||||
_columns = {
|
_columns = {
|
||||||
'date': fields.date('Date'),
|
'date': fields.date('Date'),
|
||||||
}
|
}
|
||||||
|
def on_change_product(self, cr, uid, ids, product_id):
|
||||||
|
if not product_id:
|
||||||
|
return {'value':{'date': False}}
|
||||||
|
day_life = self.pool.get('product.product').browse(cr, uid, product_id).life_time
|
||||||
|
date_life = (datetime.datetime.now() + datetime.timedelta(days=day_life))
|
||||||
|
return {'value':{'date': date_life.strftime('%Y-%m-%d')
|
||||||
|
}}
|
||||||
|
|
||||||
|
|
||||||
stock_move_split_lines_exist()
|
stock_move_split_lines_exist()
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
<field name="inherit_id" ref="stock.view_split_in_lots"/>
|
<field name="inherit_id" ref="stock.view_split_in_lots"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<data>
|
<data>
|
||||||
|
<xpath expr="//form/group/field[@name='line_exist_ids']/tree/field[@name='prodlot_id']" position="replace">
|
||||||
|
<field name="prodlot_id" on_change="on_change_product(parent.product_id)"/>
|
||||||
|
</xpath>
|
||||||
<xpath expr="//form/group/field[@name='line_exist_ids']/tree/field[@name='quantity']" position="after">
|
<xpath expr="//form/group/field[@name='line_exist_ids']/tree/field[@name='quantity']" position="after">
|
||||||
<field name="date"/>
|
<field name="date"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|
Loading…
Reference in New Issue