bzr revid: mra@mra-laptop-20100615095622-oxd3xfz0h08m9yd6
bzr revid: mra@mra-laptop-20100615122035-a5zu8ovaxgx8aeuv
bzr revid: mra@mra-laptop-20100616044441-myd62p9t21rn8a9i
bzr revid: mra@mra-laptop-20100616071323-7h2ekpnawkpapnfj
bzr revid: mra@mra-laptop-20100616084057-aboupsh6dzm4s3mn
This commit is contained in:
Mustufa Rangwala
2010-06-16 14:10:57 +05:30
62 changed files with 2263 additions and 343 deletions
+3 -3
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-06-04 16:42+0000\n"
"PO-Revision-Date: 2010-06-15 07:00+0000\n"
"Last-Translator: eLBati - albatos.com <lorenzo.battistini@albatos.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-11 03:42+0000\n"
"X-Launchpad-Export-Date: 2010-06-16 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -1176,7 +1176,7 @@ msgstr ""
#. module: account
#: field:account.payment.term,line_ids:0
msgid "Terms"
msgstr "Periodi"
msgstr "Condizioni"
#. module: account
#: rml:account.vat.declaration:0
@@ -400,13 +400,5 @@
src_model="res.partner.address"
/>
<menuitem icon="terp-purchase" id="base.menu_purchase_root"
name="Procurement Management" sequence="7" />
<menuitem id="base.menu_procurement_management_supplier"
name="Suppliers" parent="base.menu_purchase_root" sequence="3" />
<menuitem name="Contacts" id="menu_partner_contact_supplier_form"
action="action_partner_contact_form"
parent="base.menu_procurement_management_supplier" sequence="2" />
</data>
</openerp>
+11 -11
View File
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-04-09 18:42+0000\n"
"Last-Translator: Nicola Pedron <Unknown>\n"
"PO-Revision-Date: 2010-06-15 12:50+0000\n"
"Last-Translator: Rinux <Unknown>\n"
"Language-Team: Italian <it@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:20+0000\n"
"X-Launchpad-Export-Date: 2010-06-16 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_module_quality
@@ -33,7 +33,7 @@ msgstr ""
#. module: base_module_quality
#: model:ir.module.module,shortdesc:base_module_quality.module_meta_information
msgid "Base module quality"
msgstr ""
msgstr "Modulo base di qualità"
#. module: base_module_quality
#: field:module.quality.check,name:0
@@ -63,7 +63,7 @@ msgstr ""
#. module: base_module_quality
#: field:module.quality.detail,ponderation:0
msgid "Ponderation"
msgstr ""
msgstr "Ponderazione"
#. module: base_module_quality
#: help:module.quality.detail,ponderation:0
@@ -110,7 +110,7 @@ msgstr ""
#. module: base_module_quality
#: wizard_field:quality_detail_save,init,module_file:0
msgid "Save report"
msgstr ""
msgstr "Salva report"
#. module: base_module_quality
#: wizard_field:quality_detail_save,init,name:0
@@ -120,12 +120,12 @@ msgstr ""
#. module: base_module_quality
#: field:module.quality.detail,score:0
msgid "Score (%)"
msgstr ""
msgstr "Punteggio (%)"
#. module: base_module_quality
#: help:quality_detail_save,init,name:0
msgid "Save report as .html format"
msgstr ""
msgstr "Salva report come formato .html"
#. module: base_module_quality
#: view:module.quality.detail:0
@@ -146,12 +146,12 @@ msgstr ""
#. module: base_module_quality
#: view:module.quality.detail:0
msgid "Save Report"
msgstr ""
msgstr "Salva report"
#. module: base_module_quality
#: model:ir.actions.wizard,name:base_module_quality.create_quality_check_id
msgid "Quality Check"
msgstr ""
msgstr "Controllo di qualità"
#. module: base_module_quality
#: model:ir.model,name:base_module_quality.model_module_quality_detail
@@ -182,4 +182,4 @@ msgstr ""
#. module: base_module_quality
#: field:module.quality.detail,quality_check_id:0
msgid "Quality"
msgstr ""
msgstr "Qualità"
+12 -12
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-04-24 15:45+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-06-15 14:17+0000\n"
"Last-Translator: Niels Huylebroeck <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:15+0000\n"
"X-Launchpad-Export-Date: 2010-06-16 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: board
@@ -26,50 +26,50 @@ msgstr ""
#. module: board
#: model:ir.model,name:board.model_board_board
msgid "board.board"
msgstr ""
msgstr "board.board"
#. module: board
#: field:board.note,user_id:0
msgid "Author"
msgstr ""
msgstr "Auteur"
#. module: board
#: model:ir.module.module,shortdesc:board.module_meta_information
msgid "Dashboard main module"
msgstr ""
msgstr "Algemene dashboard module"
#. module: board
#: view:board.note:0
#: field:board.note,note:0
msgid "Note"
msgstr ""
msgstr "Notitie"
#. module: board
#: field:board.board.line,width:0
msgid "Width"
msgstr ""
msgstr "Breedte"
#. module: board
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
msgstr "Ongeldige modelnaam in de actie-definitie."
#. module: board
#: field:board.board.line,name:0
msgid "Title"
msgstr ""
msgstr "Titel"
#. module: board
#: model:ir.actions.act_window,name:board.action_view_board_list_form
#: model:ir.ui.menu,name:board.menu_view_board_form
msgid "Dashboard Definition"
msgstr ""
msgstr "Dashboard definitie"
#. module: board
#: model:ir.actions.act_window,name:board.action_view_board_note_form
#: model:ir.ui.menu,name:board.menu_view_board_note_form
msgid "Publish a note"
msgstr ""
msgstr "Publiceer een opmerking"
#. module: board
#: wizard_view:board.board.menu.create,init:0
+1 -1
View File
@@ -17,6 +17,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import claim_delivery
# 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>
<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
id="act_claim_from_delivery"
id="action_claim_from_delivery"
name="Claim"
domain="[]"
target="current"
view_mode="form"
res_model="crm.claim"
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>
</openerp>
+2 -1
View File
@@ -74,7 +74,8 @@ class crm_claim(osv.osv, crm.crm_case):
'company_id': fields.many2one('res.company', 'Company'),
'partner_id': fields.many2one('res.partner', 'Partner'),
'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_from': fields.char('Email', size=128, help="These people will receive email."),
'partner_name': fields.char("Employee's Name", size=64),
+11 -4
View File
@@ -92,11 +92,18 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Claims">
<group colspan="4" col="4">
<field name="name"/>
<field name="date" string="Date of Claim"/>
<field name="date_deadline" string="Deadline"/>
<group colspan="4" col="4">
<group colspan="1" col="2">
<field name="name" />
</group>
<group colspan="1" col="2">
<field name="date" string="Date of Claim"/>
</group>
<group colspan="1" col="2">
<field name="date_deadline" string="Deadline"/><newline/>
</group>
</group>
<group colspan="4" col="4">
<notebook>
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-15 03:32+0000\n"
"X-Launchpad-Export-Date: 2010-06-16 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: google_map
@@ -208,10 +208,7 @@ class marketing_campaign_activity(osv.osv):
'start': fields.boolean('Start',help= "This activity is launched when the campaign starts."),
'condition': fields.char('Condition', size=256, required=True,
help="Python condition to know if the activity can be launched"),
'type': fields.selection([('email', 'E-mail'),
('paper', 'Paper'),
('action', 'Action'),
('subcampaign', 'Sub-Campaign')],
'type': fields.selection(_actions_type,
'Type', required=True,
help="Describe type of action to be performed on the Activity.Eg : Send email,Send paper.."),
'email_template_id': fields.many2one('email.template','Email Template'),
@@ -412,7 +409,10 @@ class marketing_campaign_workitem(osv.osv):
self.write(cr, uid, wi.id, {'state': 'done'})
self.process_chain(cr, uid, wi.id, context)
else:
self.write(cr, uid, wi.id, {'state': 'exception'})
vals = {'state': 'exception'}
if type(result) == type({}) and 'error_msg' in result:
vals['error_msg'] = result['error_msg']
self.write(cr, uid, wi.id, vals)
except Exception,e:
self.write(cr, uid, wi.id, {'state': 'exception', 'error_msg': str(e)})
else :
@@ -20,5 +20,5 @@
##############################################################################
import marketing_campaign_mailchimp
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
import wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -32,6 +32,7 @@
'init_xml': [],
'update_xml': [
'marketing_campaign_mailchimp_view.xml',
'wizard/create_list_view.xml',
],
'demo_xml': [],
'installable': True,
@@ -18,16 +18,19 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
import urllib
import urllib2
import simplejson as json
import time
from datetime import datetime
from osv import fields, osv
from marketing_campaign.marketing_campaign import _intervalTypes
mailchimp_url = 'http://%s.api.mailchimp.com/1.2'
class marketing_campaign_mailchimp_account(osv.osv): #{{{
_name = "marketing.campaign.mailchimp.account"
class mailchimp_account(osv.osv):
_name = "mailchimp.account"
_columns = {
'name': fields.char('Account Name', size=64),
@@ -52,12 +55,10 @@ class marketing_campaign_mailchimp_account(osv.osv): #{{{
params['password'] = mailchimp_account.password
else :
params['apikey'] = mailchimp_account.apikey
params = '&'.join(map(lambda x : '%s=%s' %(x, params[x]), params))
url = mailchimp_url%mailchimp_account.data_center+ '/?method=%s'%method
req = urllib2.Request(url, params)
handle = urllib2.urlopen(req)
response = json.loads(handle.read())
return response
params = urllib.urlencode(params, doseq=True)
response = urllib2.urlopen(url, params)
return json.loads(response.read())
def button_approve(self, cr, uid, ids, context):
acc_obj = self.browse(cr, uid, ids)[0]
@@ -80,33 +81,57 @@ class marketing_campaign_mailchimp_account(osv.osv): #{{{
def button_cancel(self, cr, uid, ids, context):
self.write(cr, uid, ids, {'state': 'cancelled'})
return True
marketing_campaign_mailchimp_account() #}}}
def add_partner_list(self, cr, uid, account_id, list_id, partner_ids):
vals = {} # just dictionary with partner_id and updated in list or not
for partner in self.pool.get('res.partner').browse(cr, uid, partner_ids):
params = {'id' : list_id,
'email_address' : partner.email,
'email_type':'text',
'merge_vars[FNAME]':partner.name ,
'merge_vars[date]' : time.strftime('%Y-%m-%d'),
'merge_vars[phone]' : partner.phone,
'merge_vars[website]' : partner.website,
'merge_vars[address][country]' : partner.country.code,
'merge_vars[address][city]' : partner.city,
'double_optin':False}
vals[partner.id] = self.get_response(cr, uid, account_id,
'listSubscribe', params)
return vals
mailchimp_account()
#class marketing_campaign_mailchimp_list(osv.osv_memory): #{{{
# _name = "marketing.campaign.mailchimp.list"
#
# _columns = {
# 'name': fields.char('Name', size=64),
# 'mailchimp_account_id': fields.many2one('marketing.campaign.mailchimp.account', 'Account'),
# 'list_id': fields.char('List Id', size=64,),
# }
#
# _defaults = {
# 'state': lambda *a: 'draft'
# }
#
#marketing_campaign_mailchimp_list() #}}}
class mailchimp_list(osv.osv_memory):
_name = "mailchimp.list"
_description = "Mailchimp list"
_columns = {
'mailchimp_account_id': fields.many2one('mailchimp.account',
'Mailchimp Account', required=True),
'name': fields.char('Name', size=64)
}
mailchimp_list()
class marketing_campaign(osv.osv):
_inherit = "marketing.campaign"
class marketing_campaign_segment(osv.osv): #{{{
_inherit = "marketing.campaign.segment"
_columns = {
'synchro': fields.boolean('Mailchimp Synchro'),
'mailchimp_account_id': fields.many2one(
'marketing.campaign.mailchimp.account', 'Account'),
'mailchimp.account', 'Account'),
'mailchimp_campaign': fields.char('campaign', size=64),
}
marketing_campaign()
class marketing_campaign_activity(osv.osv):
_inherit = "marketing.campaign.activity"
_columns = {
'mailchimp_account_id': fields.many2one(
'mailchimp.account', 'Account'),
'mailchimp_list': fields.char('List', size=64),
}
}
def onchange_mailchimp(self, cr, uid, ids, mailchimp_account_id):
if mailchimp_account_id:
@@ -116,16 +141,70 @@ class marketing_campaign_segment(osv.osv): #{{{
def onchange_mailchimp_list(self, cr, uid, ids, mailchimp_account_id,
mailchimp_list):
if mailchimp_account_id and mailchimp_list:
lists = self.pool.get('marketing.campaign.mailchimp.account').get_response(cr,
lists = self.pool.get('mailchimp.account').get_response(cr,
uid, mailchimp_account_id, 'lists')
list_names = [list['name'] for list in lists]
list_names = [l['name'] for l in lists]
if mailchimp_list not in list_names:
raise osv.except_osv('Error!!!',"Lists doesn't exists")
else :
return {}
return {'value':{}}
marketing_campaign_segment() #}}}
def process_wi_mailchimp(self, cr, uid, activity, workitem, context={}):
mailchimp_account_id = activity.mailchimp_account_id.id
list_name = activity.mailchimp_list
mc_acc_obj = self.pool.get('mailchimp.account')
lists = mc_acc_obj.get_response(cr, uid, mailchimp_account_id, 'lists')
list_id = ''
for l in lists :
if l['name'] == list_name:
list_id = l['id']
break;
res_model = workitem.object_id.model
res_id = workitem.res_id
model_obj = self.pool.get(res_model).browse(cr, uid, res_id)
params ={}
if res_model == 'res.partner' :
params.update({'email_address' : model_obj.email,
'merge_vars[FNAME]':model_obj.name and model_obj.name or '',
'merge_vars[website]' : model_obj.website,
'merge_vars[address][country]' : model_obj.country.code,
})
elif res_model == 'crm.lead' :
params.update({'email_address' : model_obj.email_from,
'merge_vars[FNAME]':model_obj.partner_name and \
model_obj.partner_name or '',
'merge_vars[address][country]' : model_obj.country_id and \
model_obj.country_id.code or ''
})
if params['email_address'] :
user = mc_acc_obj.get_response(cr, uid, mailchimp_account_id,
'listMemberInfo',
{'id' : list_id,
'email_address': params['email_address']})
# if there s no user with the specify email it will return error code
# and thus we add that user otherwise user is alredy subscribe and there
# is no need to subscribe user again
if 'error' in user:
params.update({'id' : list_id,
'email_type':'text',
'double_optin':False,
'merge_vars[date]' : time.strftime('%Y-%m-%d'),
'merge_vars[address][city]' : model_obj.city and model_obj.city or '',
'merge_vars[phone]' : model_obj.phone and model_obj.phone or '',
})
res = mc_acc_obj.get_response(cr, uid, mailchimp_account_id, 'listSubscribe', params)
# handle mailchimp error
return True
else :
return {'error_msg' : "Invalid Email Address"}
def __init__(self, *args):
res = super(marketing_campaign_activity, self).__init__(*args)
self._actions.update({'mailchimp' : self.process_wi_mailchimp})
self._actions_type.append(('mailchimp', 'Mailchimp'))
return res
marketing_campaign_activity()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -4,23 +4,38 @@
<!--
================================================================
Marketing Segments Inherited View - mailchimp
Marketing Activity Inherited View - mailchimp
================================================================
-->
<record model="ir.ui.view" id="view_marketing_campaign_segment_form_inherit">
<field name="name">marketing.campaign.segment.form.inherit</field>
<field name="model">marketing.campaign.segment</field>
<record model="ir.ui.view" id="view_marketing_campaign_activity_form_inherit">
<field name="name">marketing.campaign.activity.form.inherit</field>
<field name="model">marketing.campaign.activity</field>
<field name="type">form</field>
<field name="inherit_id" ref="marketing_campaign.view_marketing_campaign_segment_form"/>
<field name="inherit_id" ref="marketing_campaign.view_marketing_campaign_activity_form"/>
<field name="arch" type="xml">
<field name="date_done" position="after">
<separator string="Mailchimp Synchronization" colspan="4"/>
<field name="synchro"/>
<group colspan="2" attrs="{'invisible':[('synchro','!=',True)]}">
<field name="mailchimp_account_id" attrs="{'required':[('synchro','=',True)]}" domain="[('state','=','approved')]" on_change="onchange_mailchimp(mailchimp_account_id)"/>
<field name="mailchimp_list" attrs="{'required':[('synchro','=',True)]}" on_change="onchange_mailchimp_list(mailchimp_account_id,mailchimp_list)"/>
</group>
<field name="type" position="after">
<group colspan="2" ><!--attrs="{'invisible':[('type','!=','mailchimp')]}"-->
<field name="mailchimp_account_id" attrs="{'required':[('type','=','mailchimp')]}" domain="[('state','=','approved')]" on_change="onchange_mailchimp(mailchimp_account_id)"/>
<field name="mailchimp_list" attrs="{'required':[('type','=','mailchimp')]}" on_change="onchange_mailchimp_list(mailchimp_account_id,mailchimp_list)"/>
</group>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_marketing_campaign_form_inherit">
<field name="name">marketing.campaign.form.inherit</field>
<field name="model">marketing.campaign</field>
<field name="type">form</field>
<field name="inherit_id" ref="marketing_campaign.view_marketing_campaign_form"/>
<field name="arch" type="xml">
<field name="type" position="after">
<group colspan="2" attrs="{'invisible':[('type','!=','mailchimp')]}">
<field name="mailchimp_account_id" attrs="{'required':[('type','=','mailchimp')]}" domain="[('state','=','approved')]" on_change="onchange_mailchimp(mailchimp_account_id)"/>
<field name="mailchimp_list" attrs="{'required':[('type','=','mailchimp')]}" on_change="onchange_mailchimp_list(mailchimp_account_id,mailchimp_list)"/>
</group>
</field>
</field>
</record>
@@ -35,9 +50,9 @@
<menuitem name="Tools" id="base.menu_tools" icon="STOCK_PREFERENCES" sequence="15"/>
<menuitem name="Mailchimps" id="menu_action_mailchimp" parent="base.menu_tools" />
<record model="ir.ui.view" id="view_marketing_campaign_mailchimp_account_tree">
<field name="name">marketing.campaign.mailchimp.account.tree</field>
<field name="model">marketing.campaign.mailchimp.account</field>
<record model="ir.ui.view" id="view_mailchimp_account_tree">
<field name="name">mailchimp.account.tree</field>
<field name="model">mailchimp.account</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="All Accounts">
@@ -49,9 +64,9 @@
</field>
</record>
<record model="ir.ui.view" id="view_marketing_campaign_mailchimp_account_form">
<field name="name">marketing.campaign.mailchimp.account.form</field>
<field name="model">marketing.campaign.mailchimp.account</field>
<record model="ir.ui.view" id="view_mailchimp_account_form">
<field name="name">mailchimp.account.form</field>
<field name="model">mailchimp.account</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Account">
@@ -71,16 +86,16 @@
</field>
</record>
<record model="ir.actions.act_window" id="action_marketing_campaign_mailchimp_account">
<record model="ir.actions.act_window" id="action_mailchimp_account">
<field name="name">All Mailchimp Accounts</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">marketing.campaign.mailchimp.account</field>
<field name="res_model">mailchimp.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_marketing_campaign_mailchimp_account_tree"/>
<field name="view_id" ref="view_mailchimp_account_tree"/>
</record>
<menuitem id="menu_action_marketing_campaign_mailchimp_account" parent="menu_action_mailchimp" action="action_marketing_campaign_mailchimp_account" sequence="40"/>
<menuitem id="menu_action_mailchimp_account" parent="menu_action_mailchimp" action="action_mailchimp_account" sequence="40"/>
</data>
</openerp>
+24
View File
@@ -0,0 +1,24 @@
# -*- 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/>.
#
##############################################################################
import create_list
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+64
View File
@@ -0,0 +1,64 @@
# -*- 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
from tools.translate import _
import netsvc
class create_list(osv.osv_memory):
_name = "create.list"
_description = "Create List of mailchimp"
# crm.lead remain
_columns = {
'mailchimp_account_id': fields.many2one('mailchimp.account',
'Mailchimp Account', required=True),
'mailchimp_list_id': fields.many2one('mailchimp.list', 'List'),
'list_name': fields.char('Name',size = 64),
'partner_ids': fields.many2many('res.partner',
'create_list_partner_rel',
'cust_list_id', 'partner_id',
'Partner'),
}
def onchange_mailchimp_account_id(self, cr, uid, ids, mailchimp_account_id,
action):
print mailchimp_account_id,action,
return {'value':{}}
def create_list(self, cr, uid, ids, context=None):
create_list_obj = self.browse(cr, uid, ids[0])
print create_list_obj.id
mailchimp_account_obj = self.pool.get('mailchimp.account')
account_id = create_list_obj.mailchimp_account_id
lists = mailchimp_account_obj.get_response(cr, uid, account_id.id, 'lists')
lists = dict([(l['name'],l['id']) for l in lists])
print lists
if create_list_obj.list_name not in lists.keys():
raise osv.except_osv(_('UserError'),
_('There is no list define in account %s') % (account_id.name))
list_id = lists[create_list_obj.list_name]
mailchimp_account_obj.add_partner_list(cr, uid, account_id.id, list_id,
create_list_obj.partner_ids)
return {}
create_list()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -0,0 +1,35 @@
<openerp>
<data>
<record id="view_create_list" model="ir.ui.view">
<field name="name">create.list.form</field>
<field name="model">create.list</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Update List">
<field name="mailchimp_account_id" on_change = "onchange_mailchimp_account_id(mailchimp_account_id,action)"/>
<field name="list_name" />
<newline/>
<separator string="Partner" colspan="4"/>
<field name="partner_ids" nolabel="1" colspan="4"/>
<!--group ">
<field name="mailchimp_list_id" />
</group-->
<group col="4" colspan="4">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="create_list" string="Update" type="object" icon="gtk-ok"/>
</group>
</form>
</field>
</record>
<record id="action_create_list" model="ir.actions.act_window">
<field name="name">Update List</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">create.list</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_create_list"/>
<field name="target">new</field>
</record>
<menuitem id="menu_action_mailchimp_create_list" parent="menu_action_mailchimp" action="action_create_list" sequence="40"/>
</data>
</openerp>
-41
View File
@@ -856,46 +856,5 @@
<menuitem action="resource.action_resource_calendar_form" id="menu_view_resource_calendar_search_mrp" parent="menu_mrp_configuration" sequence="1"/>
<menuitem action="resource.action_resource_calendar_leave_tree" id="menu_view_resource_calendar_leaves_search_mrp" parent="menu_pm_resources_mrp" sequence="1"/>
<!-- Display the BoMs in the product form -->
<record model="ir.ui.view" id="view_product_form_expiry">
<field name="name">product.normal.form</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view" />
<field name="type">form</field>
<field name="arch" type="xml">
<notebook position="inside">
<page string="Bill of Materials">
<field name="bom_ids" colspan="4" nolabel="1" widget="one2many_form">
<group colspan="4" col="6">
<field name="name" select="1" colspan="4"/>
<field name="code" select="1" string="BoM Reference" groups="base.group_extended"/>
<newline/>
<field name="product_uom"/>
<field name="product_qty"/>
<field name="routing_id" groups="base.group_extended"/>
<newline/>
<field name="product_uos" groups="product.group_uos"/>
<field name="product_uos_qty" groups="product.group_uos" />
<newline/>
<field name="type" groups="base.group_extended"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
</group>
<field colspan="4" name="bom_lines" nolabel="1" widget="one2many_list">
<tree string="Components" editable="bottom">
<field name="product_id" on_change="onchange_product_id(product_id, name)" select="1"/>
<field name="product_uom"/>
<field name="product_qty"/>
<field name="name" invisible="1"/>
<field name="date_start"/>
<field name="date_stop"/>
</tree>
</field>
</field>
</page>
</notebook>
</field>
</record>
</data>
</openerp>
+2 -2
View File
@@ -2,8 +2,8 @@
"access_mrp_workcenter","mrp.workcenter","model_mrp_workcenter","mrp.group_mrp_user",1,0,0,0
"access_mrp_routing","mrp.routing","model_mrp_routing","mrp.group_mrp_user",1,0,0,0
"access_mrp_routing_workcenter","mrp.routing.workcenter","model_mrp_routing_workcenter","mrp.group_mrp_user",1,0,0,0
"access_mrp_bom","mrp.bom","model_mrp_bom","mrp.group_mrp_user",1,0,0,0
"access_mrp_bom_revision","mrp.bom.revision","model_mrp_bom_revision","mrp.group_mrp_user",1,0,0,0
"access_mrp_bom","mrp.bom","model_mrp_bom","group_mrp_user",1,0,0,0
"access_mrp_bom_revision","mrp.bom.revision","model_mrp_bom_revision","group_mrp_user",1,0,0,0
"access_mrp_production","mrp.production","model_mrp_production","mrp.group_mrp_user",1,1,1,1
"access_mrp_production_workcenter_line","mrp.production.workcenter.line","model_mrp_production_workcenter_line","mrp.group_mrp_user",1,1,1,1
"access_mrp_production_product_line","mrp.production.product.line","model_mrp_production_product_line","mrp.group_mrp_user",1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_mrp_workcenter mrp.workcenter model_mrp_workcenter mrp.group_mrp_user 1 0 0 0
3 access_mrp_routing mrp.routing model_mrp_routing mrp.group_mrp_user 1 0 0 0
4 access_mrp_routing_workcenter mrp.routing.workcenter model_mrp_routing_workcenter mrp.group_mrp_user 1 0 0 0
5 access_mrp_bom mrp.bom model_mrp_bom mrp.group_mrp_user group_mrp_user 1 0 0 0
6 access_mrp_bom_revision mrp.bom.revision model_mrp_bom_revision mrp.group_mrp_user group_mrp_user 1 0 0 0
7 access_mrp_production mrp.production model_mrp_production mrp.group_mrp_user 1 1 1 1
8 access_mrp_production_workcenter_line mrp.production.workcenter.line model_mrp_production_workcenter_line mrp.group_mrp_user 1 1 1 1
9 access_mrp_production_product_line mrp.production.product.line model_mrp_production_product_line mrp.group_mrp_user 1 1 1 1
+3 -3
View File
@@ -182,14 +182,14 @@
-
!python {model: procurement.order}: |
from tools.translate import _
proc_ids = self.search(cr, uid, [('state','!=','cofirmed')])
proc_ids = self.search(cr, uid, [('state','!=','confirmed')])
assert proc_ids, _('No Procurements!')
-
The scheduler runs.
-
!function {model: procurement.order, name: run_scheduler}:
- model: procurement.order
search: "[('state','!=','cofirmed')]"
search: "[('state','!=','confirmed')]"
-
I am checking Internal picking. I see one picking for Orange juice and its
stock moves for Oranges, Sugar and Water made correctly.
@@ -247,4 +247,4 @@
picking_ids = pick_obj.search(cr, uid, [('type','=','in')])
self.view_init(cr, uid, ['date','partner_id','address_id'],context={'active_ids': picking_ids})
self.do_partial(cr, uid, [1], context={'active_ids': picking_ids})
+1 -1
View File
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-15 03:33+0000\n"
"X-Launchpad-Export-Date: 2010-06-16 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: mrp_operations
+669
View File
@@ -0,0 +1,669 @@
# Hindi translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-06-15 06:37+0000\n"
"Last-Translator: vir (Open ERP) <vir@tinyerp.com>\n"
"Language-Team: Hindi <hi@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-16 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Fees Line"
msgstr "मुक्त लाइन"
#. module: mrp_repair
#: field:mrp.repair.fee,repair_id:0
#: field:mrp.repair.line,repair_id:0
msgid "Repair Order Ref"
msgstr "मरम्मत के आदेश संदर्भ"
#. module: mrp_repair
#: field:mrp.repair.line,move_id:0
msgid "Inventory Move"
msgstr ""
#. module: mrp_repair
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "कार्य की परिभाषा में मॉडल का नाम अमान्य है."
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Untaxed amount"
msgstr "कर राशि के बिना"
#. module: mrp_repair
#: field:mrp.repair,state:0
msgid "Repair State"
msgstr ""
#. module: mrp_repair
#: rml:repair.order:0
msgid "Printing Date"
msgstr "मुद्रण दिनांक"
#. module: mrp_repair
#: field:mrp.repair.fee,product_uom_qty:0
#: rml:repair.order:0
msgid "Quantity"
msgstr "मात्रा"
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Set to Draft"
msgstr ""
#. module: mrp_repair
#: selection:mrp.repair,state:0
msgid "Invoice Exception"
msgstr "चालान अपवाद"
#. module: mrp_repair
#: field:mrp.repair,address_id:0
msgid "Delivery Address"
msgstr "वितरण पता"
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Make Invoice"
msgstr "चालान बनाएँ"
#. module: mrp_repair
#: field:mrp.repair.fee,price_subtotal:0
#: field:mrp.repair.line,price_subtotal:0
msgid "Subtotal"
msgstr "उप कुल"
#. module: mrp_repair
#: rml:repair.order:0
msgid "Invoice address :"
msgstr "चालान पता"
#. module: mrp_repair
#: field:mrp.repair,guarantee_limit:0
msgid "Guarantee limit"
msgstr "गारंटी की सीमा"
#. module: mrp_repair
#: field:mrp.repair,amount_tax:0
#: field:mrp.repair.fee,tax_id:0
#: field:mrp.repair.line,tax_id:0
msgid "Taxes"
msgstr ""
#. module: mrp_repair
#: rml:repair.order:0
msgid "Net Total :"
msgstr "नेट कुल:"
#. module: mrp_repair
#: rml:repair.order:0
msgid "VAT"
msgstr "वैट"
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Operations"
msgstr "संचालन"
#. module: mrp_repair
#: field:mrp.repair,move_id:0
msgid "Move"
msgstr "स्थानान्तर"
#. module: mrp_repair
#: model:ir.actions.act_window,name:mrp_repair.action_repair_order_tree
msgid "Repair Orders"
msgstr "मरम्मत के आदेश"
#. module: mrp_repair
#: model:ir.actions.report.xml,name:mrp_repair.report_mrp_repair
msgid "Quotation / Order"
msgstr ""
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Extra Info"
msgstr "अतिरिक्त जानकारी"
#. module: mrp_repair
#: field:mrp.repair,partner_id:0
msgid "Partner"
msgstr "साथी"
#. module: mrp_repair
#: model:ir.actions.act_window,name:mrp_repair.action_repair_quotation_tree
#: model:ir.ui.menu,name:mrp_repair.menu_repair_quotation
msgid "Repairs in quotation"
msgstr ""
#. module: mrp_repair
#: selection:mrp.repair,state:0
#: selection:mrp.repair.line,state:0
msgid "Confirmed"
msgstr "पुष्टि"
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Recreate Invoice"
msgstr "फिर से चालान बनाने"
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Repairs order"
msgstr "मरम्मत के आदेश"
#. module: mrp_repair
#: rml:repair.order:0
msgid "Repair Order N° :"
msgstr "मरम्मत के आदेश N °:"
#. module: mrp_repair
#: field:mrp.repair,prodlot_id:0
#: rml:repair.order:0
msgid "Lot Number"
msgstr ""
#. module: mrp_repair
#: selection:mrp.repair,state:0
msgid "Under Repair"
msgstr "मरम्मत के तहत"
#. module: mrp_repair
#: field:mrp.repair,fees_lines:0
msgid "Fees Lines"
msgstr "फीस लाइन्स"
#. module: mrp_repair
#: model:ir.model,name:mrp_repair.model_mrp_repair_fee
msgid "Repair Fees line"
msgstr "मरम्मत शुल्क लाइन"
#. module: mrp_repair
#: rml:repair.order:0
msgid "Fees Line(s)"
msgstr "फीस लाइन (ओं)"
#. module: mrp_repair
#: selection:mrp.repair,state:0
msgid "To be Invoiced"
msgstr ""
#. module: mrp_repair
#: rml:repair.order:0
msgid "Shipping address :"
msgstr "शिपिंग का पता"
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Start Repair"
msgstr "मरम्मत शुरू"
#. module: mrp_repair
#: field:mrp.repair.line,product_uom_qty:0
msgid "Quantity (UoM)"
msgstr "मात्रा (UoM)"
#. module: mrp_repair
#: field:mrp.repair.fee,to_invoice:0
#: field:mrp.repair.line,to_invoice:0
msgid "To Invoice"
msgstr ""
#. module: mrp_repair
#: model:ir.ui.menu,name:mrp_repair.menu_repair_order
msgid "Repairs"
msgstr "मरम्मत"
#. module: mrp_repair
#: field:mrp.repair,picking_id:0
msgid "Packing"
msgstr "पैकिंग"
#. module: mrp_repair
#: rml:repair.order:0
msgid "Total :"
msgstr "कुल:"
#. module: mrp_repair
#: field:mrp.repair,pricelist_id:0
msgid "Pricelist"
msgstr "मूल्य सूची"
#. module: mrp_repair
#: help:mrp.repair,state:0
msgid "Gives the state of the Repair Order"
msgstr "मरम्मत के आदेश की स्थिति देना"
#. module: mrp_repair
#: view:mrp.repair:0
#: field:mrp.repair,quotation_notes:0
msgid "Quotation Notes"
msgstr ""
#. module: mrp_repair
#: model:ir.actions.act_window,name:mrp_repair.action_repair_progress_tree
#: model:ir.ui.menu,name:mrp_repair.menu_repair_progress
msgid "Repairs in progress"
msgstr "मरम्मत में प्रगति"
#. module: mrp_repair
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "संरचना देखने के लिए अमान्य XML!"
#. module: mrp_repair
#: help:mrp.repair,guarantee_limit:0
msgid ""
"The garantee limit is computed as: last move date + warranty defined on "
"selected product. If the current date is below the garantee limit, each "
"operation and fee you will add will be set as 'not to invoiced' by default. "
"Note that you can change manually afterwards."
msgstr ""
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Repair Line"
msgstr ""
#. module: mrp_repair
#: rml:repair.order:0
msgid "N° :"
msgstr ""
#. module: mrp_repair
#: field:mrp.repair,invoice_method:0
msgid "Invoice Method"
msgstr ""
#. module: mrp_repair
#: field:mrp.repair,repaired:0
msgid "Repaired"
msgstr ""
#. module: mrp_repair
#: wizard_field:mrp.repair.make_invoice,init,group:0
msgid "Group by partner invoice address"
msgstr ""
#. module: mrp_repair
#: field:mrp.repair.fee,invoice_line_id:0
#: field:mrp.repair.line,invoice_line_id:0
msgid "Invoice Line"
msgstr ""
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Total amount"
msgstr ""
#. module: mrp_repair
#: selection:mrp.repair.line,state:0
msgid "Canceled"
msgstr ""
#. module: mrp_repair
#: selection:mrp.repair,invoice_method:0
msgid "Before Repair"
msgstr ""
#. module: mrp_repair
#: field:mrp.repair,location_id:0
msgid "Current Location"
msgstr ""
#. module: mrp_repair
#: wizard_button:mrp.repair.cancel,display,yes:0
msgid "Yes"
msgstr ""
#. module: mrp_repair
#: field:mrp.repair,invoiced:0
#: field:mrp.repair.fee,invoiced:0
#: field:mrp.repair.line,invoiced:0
msgid "Invoiced"
msgstr ""
#. module: mrp_repair
#: wizard_button:mrp.repair.cancel,display,end:0
msgid "No"
msgstr ""
#. module: mrp_repair
#: wizard_view:mrp.repair.make_invoice,init:0
#: wizard_button:mrp.repair.make_invoice,init,invoice:0
msgid "Create invoices"
msgstr ""
#. module: mrp_repair
#: selection:mrp.repair.line,type:0
#: rml:repair.order:0
msgid "Add"
msgstr ""
#. module: mrp_repair
#: selection:mrp.repair.line,state:0
msgid "Draft"
msgstr ""
#. module: mrp_repair
#: model:ir.actions.act_window,name:mrp_repair.action_repair_order_form
#: model:ir.ui.menu,name:mrp_repair.menu_repair_form
msgid "New Repair"
msgstr ""
#. module: mrp_repair
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
#. module: mrp_repair
#: field:mrp.repair,amount_untaxed:0
msgid "Untaxed Amount"
msgstr ""
#. module: mrp_repair
#: field:mrp.repair.line,state:0
msgid "Status"
msgstr ""
#. module: mrp_repair
#: rml:repair.order:0
msgid "Guarantee Limit"
msgstr ""
#. module: mrp_repair
#: field:mrp.repair,product_id:0
#: rml:repair.order:0
msgid "Product to Repair"
msgstr ""
#. module: mrp_repair
#: help:mrp.repair,pricelist_id:0
msgid "The pricelist comes from the selected partner, by default."
msgstr ""
#. module: mrp_repair
#: wizard_view:mrp.repair.cancel,display:0
msgid ""
"This operation will cancel the Repair process, but will not cancel it's "
"Invoice. Do you want to continue?"
msgstr ""
#. module: mrp_repair
#: selection:mrp.repair,state:0
msgid "Quotation"
msgstr ""
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Compute"
msgstr ""
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Confirm Repair"
msgstr ""
#. module: mrp_repair
#: rml:repair.order:0
msgid "Repair Quotation"
msgstr ""
#. module: mrp_repair
#: view:mrp.repair:0
msgid "End Repair"
msgstr ""
#. module: mrp_repair
#: view:mrp.repair:0
msgid "History"
msgstr ""
#. module: mrp_repair
#: model:ir.model,name:mrp_repair.model_mrp_repair
msgid "Repairs Order"
msgstr ""
#. module: mrp_repair
#: model:ir.actions.act_window,name:mrp_repair.action_repair_ready_tree
#: model:ir.ui.menu,name:mrp_repair.menu_repair_ready
msgid "Repairs Ready to Start"
msgstr ""
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Qty"
msgstr ""
#. module: mrp_repair
#: selection:mrp.repair,state:0
#: selection:mrp.repair.line,state:0
msgid "Done"
msgstr ""
#. module: mrp_repair
#: model:ir.actions.act_window,name:mrp_repair.action_repair_2binvoiced_tree
#: model:ir.ui.menu,name:mrp_repair.menu_repair_2binvoiced
msgid "Repairs to be invoiced"
msgstr ""
#. module: mrp_repair
#: field:mrp.repair,invoice_id:0
msgid "Invoice"
msgstr ""
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Fees"
msgstr ""
#. module: mrp_repair
#: selection:mrp.repair,state:0
#: wizard_button:mrp.repair.make_invoice,init,end:0
msgid "Cancel"
msgstr ""
#. module: mrp_repair
#: field:mrp.repair.line,location_dest_id:0
msgid "Dest. Location"
msgstr ""
#. module: mrp_repair
#: rml:repair.order:0
msgid "Operation Line(s)"
msgstr ""
#. module: mrp_repair
#: model:ir.model,name:mrp_repair.model_mrp_repair_line
msgid "Repair Operations Lines"
msgstr ""
#. module: mrp_repair
#: field:mrp.repair,location_dest_id:0
msgid "Delivery Location"
msgstr ""
#. module: mrp_repair
#: model:ir.module.module,shortdesc:mrp_repair.module_meta_information
msgid "Products Repairs Module"
msgstr ""
#. module: mrp_repair
#: help:mrp.repair,invoice_method:0
msgid ""
"This field allow you to change the workflow of the repair order. If value "
"selected is different from 'No Invoice', it also allow you to select the "
"pricelist and invoicing address."
msgstr ""
#. module: mrp_repair
#: field:mrp.repair.fee,price_unit:0
#: field:mrp.repair.line,price_unit:0
#: rml:repair.order:0
msgid "Unit Price"
msgstr ""
#. module: mrp_repair
#: wizard_view:mrp.repair.make_invoice,init:0
msgid "Do you really want to create the invoices ?"
msgstr ""
#. module: mrp_repair
#: field:mrp.repair.fee,name:0
#: field:mrp.repair.line,name:0
#: rml:repair.order:0
msgid "Description"
msgstr ""
#. module: mrp_repair
#: field:mrp.repair,operations:0
msgid "Operation Lines"
msgstr ""
#. module: mrp_repair
#: field:mrp.repair.fee,product_id:0
#: field:mrp.repair.line,product_id:0
msgid "Product"
msgstr ""
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Invoice Corrected"
msgstr ""
#. module: mrp_repair
#: help:mrp.repair,deliver_bool:0
msgid ""
"Check this box if you want to manage the delivery once the product is "
"repaired. If cheked, it will create a packing with selected product. Note "
"that you can select the locations in the Info tab, if you have the extended "
"view."
msgstr ""
#. module: mrp_repair
#: field:mrp.repair.line,type:0
msgid "Type"
msgstr ""
#. module: mrp_repair
#: rml:repair.order:0
msgid "Price"
msgstr ""
#. module: mrp_repair
#: field:mrp.repair,deliver_bool:0
msgid "Deliver"
msgstr ""
#. module: mrp_repair
#: view:mrp.repair:0
#: field:mrp.repair,internal_notes:0
msgid "Internal Notes"
msgstr ""
#. module: mrp_repair
#: rml:repair.order:0
msgid "Taxes:"
msgstr ""
#. module: mrp_repair
#: model:ir.actions.wizard,name:mrp_repair.wizard_mrp_repair_make_invoice
msgid "Make invoices"
msgstr ""
#. module: mrp_repair
#: field:mrp.repair,name:0
msgid "Repair Ref"
msgstr ""
#. module: mrp_repair
#: view:mrp.repair:0
msgid "UoM"
msgstr ""
#. module: mrp_repair
#: selection:mrp.repair.line,type:0
#: rml:repair.order:0
msgid "Remove"
msgstr ""
#. module: mrp_repair
#: wizard_view:mrp.repair.cancel,display:0
msgid "Cancel Repair...??"
msgstr ""
#. module: mrp_repair
#: field:mrp.repair.fee,product_uom:0
#: field:mrp.repair.line,product_uom:0
msgid "Product UoM"
msgstr ""
#. module: mrp_repair
#: field:mrp.repair,partner_invoice_id:0
msgid "Invoicing Address"
msgstr ""
#. module: mrp_repair
#: selection:mrp.repair,invoice_method:0
msgid "After Repair"
msgstr ""
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Invoicing"
msgstr ""
#. module: mrp_repair
#: field:mrp.repair.line,location_id:0
msgid "Source Location"
msgstr ""
#. module: mrp_repair
#: view:mrp.repair:0
msgid "Quality"
msgstr ""
#. module: mrp_repair
#: model:ir.actions.wizard,name:mrp_repair.action_cancel_repair
#: view:mrp.repair:0
msgid "Cancel Repair"
msgstr ""
#. module: mrp_repair
#: selection:mrp.repair,invoice_method:0
msgid "No Invoice"
msgstr ""
#. module: mrp_repair
#: view:mrp.repair:0
msgid "States"
msgstr ""
#. module: mrp_repair
#: help:mrp.repair,partner_id:0
msgid ""
"This field allow you to choose the parner that will be invoiced and delivered"
msgstr ""
#. module: mrp_repair
#: field:mrp.repair,amount_total:0
msgid "Total"
msgstr ""
#. module: mrp_repair
#: selection:mrp.repair,state:0
msgid "Ready to Repair"
msgstr ""
+9 -9
View File
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-12-08 11:46+0000\n"
"PO-Revision-Date: 2010-01-26 11:01+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"PO-Revision-Date: 2010-06-15 12:42+0000\n"
"Last-Translator: Rinux <Unknown>\n"
"Language-Team: Italian <it@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:21+0000\n"
"X-Launchpad-Export-Date: 2010-06-16 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
@@ -70,7 +70,7 @@ msgstr ""
#: model:ir.module.module,shortdesc:multi_company.module_meta_information
#: view:multi_company.default:0
msgid "Multi Company"
msgstr ""
msgstr "Multi Azienda"
#. module: multi_company
#: model:ir.module.module,description:multi_company.module_meta_information
@@ -133,17 +133,17 @@ msgstr ""
#. module: multi_company
#: model:ir.model,name:multi_company.model_multi_company_default
msgid "multi_company.default"
msgstr ""
msgstr "multi_azienda.default"
#. module: multi_company
#: help:multi_company.default,company_id:0
msgid "Company where the user is connected"
msgstr ""
msgstr "Azienda con la quale l'utente è connesso"
#. module: multi_company
#: model:ir.actions.act_window,name:multi_company.action_inventory_form
msgid "Default Company per Object"
msgstr ""
msgstr "Azienda Predefinita per Oggetto"
#. module: multi_company
#: field:multi_company.default,expression:0
@@ -173,12 +173,12 @@ msgstr ""
#. module: multi_company
#: help:multi_company.default,expression:0
msgid "Expression, must be True to match"
msgstr ""
msgstr "Espressione, deve essere Vero per corrispondere"
#. module: multi_company
#: model:ir.ui.menu,name:multi_company.menu_action_inventory_form
msgid "Default company per Object"
msgstr ""
msgstr "Azienda predefinitaa per Oggetto"
#. module: multi_company
#: code:addons/multi_company/multi_company.py:0
+1
View File
@@ -66,6 +66,7 @@ Main features :
'pos_report.xml',
# 'pos_wizard.xml',
'pos_view.xml',
'report/report_pos_order_view.xml',
'pos_sequence.xml',
'posrule_data.xml',
'pos_data.xml',
@@ -246,6 +246,9 @@ class account_bank_statement(osv.osv):
self.write(cr, uid, statement.id, {'balance_end_real':Decimal(str(val_statement_line))+Decimal(str(val2)),'closing_date':time.strftime("%Y-%m-%d %H:%M:%S"),'state':'draft'})
# self.write(cr, uid, statement.id, {'balance_end_real':bal_st+val_statement_line,'closing_date':time.strftime("%Y-%m-%d %H:%M:%S"),'state':'draft'})
return super(account_bank_statement, self).button_confirm(cr, uid, ids, context=None)
def button_cancel(self, cr, uid, ids, context={}):
self.write(cr, uid, ids, {'state':'draft'}, context=context)
account_bank_statement()
+1
View File
@@ -37,5 +37,6 @@ import pos_sales_user_today_current_user
import pos_receipt_with_remboursment
import pos_receipt_without_remboursment
import point_of_sale_report
import report_pos_order
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -0,0 +1,89 @@
# -*- 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/>.
#
##############################################################################
import tools
from osv import fields,osv
class report_pos_order(osv.osv):
_name = "report.pos.order"
_description = "Point of Sale Orders Statistics"
_auto = False
_columns ={
'date': fields.date('Date Order', readonly=True),
'date_validation': fields.date('Date Confirm', readonly=True),
'date_payment': fields.date('Date Confirm', readonly=True),
'year': fields.char('Year', size=4, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'partner_id':fields.many2one('res.partner', 'Partner', readonly=True),
'product_id':fields.many2one('product.product', 'Product', readonly=True),
'state': fields.selection([('draft', 'Draft'), ('payment', 'Payment'),
('advance','Advance'),
('paid', 'Paid'), ('done', 'Done'), ('invoiced', 'Invoiced'), ('cancel', 'Cancel')],
'State'),
'user_id':fields.many2one('res.users', 'Salesman', readonly=True),
'price_total':fields.float('Total Price', readonly=True),
'shop_id':fields.many2one('sale.shop', 'Shop', readonly=True),
'company_id':fields.many2one('res.company', 'Company', readonly=True),
'nbr':fields.integer('# of Lines', readonly=True),
'product_qty':fields.float('# of Qty', readonly=True),
'journal_id': fields.many2one('account.journal', 'Journal'),
}
_order = 'date desc'
def init(self, cr):
tools.drop_view_if_exists(cr, 'report_pos_order')
cr.execute("""
create or replace view report_pos_order as (
select el.*,
(select 1) as nbr,
to_date(to_char(po.date_order, 'dd-MM-YYYY'),'dd-MM-YYYY') as date,
po.date_validation as date_validation,
po.date_payment as date_payment,
to_char(po.date_order, 'YYYY') as year,
to_char(po.date_order, 'MM') as month,
to_char(po.date_order, 'YYYY-MM-DD') as day,
po.partner_id as partner_id,
po.state as state,
po.user_id as user_id,
po.shop_id as shop_id,
po.company_id as company_id,
po.sale_journal as journal_id
from
pos_order as po,
( select pl.id as id,
pl.product_id as product_id,
pl.qty as product_qty,
sum(pl.qty * pl.price_unit)- sum(pl.qty * pl.price_ded) as price_total,
pl.order_id
from
pos_order_line as pl
left join product_template pt on (pt.id=pl.product_id)
group by
pl.id,pl.order_id, pl.qty,pl.product_id) el
where po.id = el.order_id
)
""")
report_pos_order()
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_report_pos_order_tree" model="ir.ui.view">
<field name="name">report.pos.order.tree</field>
<field name="model">report.pos.order</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Point of Sale Analysis">
<field name="date" />
<field name="date_validation" invisible="1"/>
<field name="date_payment" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="year" invisible="1"/>
<field name="day" invisible="1"/>
<field name="month" invisible="1"/>
<field name="partner_id" invisible="1"/>
<field name="product_id" invisible="1"/>
<field name="shop_id" invisible="1"/>
<field name="journal_id" invisible="1"/>
<field name="company_id" invisible="1" groups="base.group_multi_company"/>
<field name="nbr" sum="# of Lines"/>
<field name="product_qty" sum="# of Qty"/>
<field name="price_total" sum="Total Price"/>
<field name="state" invisible="1"/>
</tree>
</field>
</record>
<record id="view_report_pos_order_search" model="ir.ui.view">
<field name="name">report.pos.order.search</field>
<field name="model">report.pos.order</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Point of Sale Analysis">
<group>
<filter icon="terp-go-year" string=" 365 Days "
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="POS ordered created last 365 days"/>
<filter icon="terp-go-month" string=" 30 Days "
name="month"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="POS ordered created in last 30 days"/>
<filter icon="terp-go-week"
string=" 7 Days "
separator="1"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="POS ordered created last 7 days"/>
<separator orientation="vertical"/>
<filter icon="terp-document-new"
string="Draft"
domain="[('state','=','draft')]"/>
<filter icon="terp-dolar"
string="Paid"
domain="[('state','=',('paid'))]"/>
<filter icon="terp-dolar"
string="Invoiced"
domain="[('state','=',('invoiced'))]"/>
<separator orientation="vertical"/>
<field name="partner_id"/>
<field name="user_id" widget="selection">
<filter icon="terp-dolar"
string="My Sales"
help="My Sales"
domain="[('user_id','=',uid)]"/>
</field>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="10" col="12">
<filter string="Salesman" icon="terp-personal" name="User" context="{'group_by':'user_id'}"/>
<filter string="Partner" icon="terp-personal" context="{'group_by':'partner_id'}"/>
<separator orientation="vertical"/>
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Journal" icon="terp-folder-orange" context="{'group_by':'journal_id'}"/>
<filter string="Shop" icon="terp-go-home" context="{'group_by':'shop_id'}"/>
<filter string="Company" icon="terp-go-home" groups="base.group_multi_company" context="{'group_by':'company_id'}"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-go-month" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
</group>
</search>
</field>
</record>
<record id="action_report_pos_order_all" model="ir.actions.act_window">
<field name="name">Point of Sale Analysis</field>
<field name="res_model">report.pos.order</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="search_view_id" ref="view_report_pos_order_search"/>
<field name="context">{'search_default_month':1,'search_default_User':1}</field>
</record>
<menuitem action="action_report_pos_order_all" id="menu_report_pos_order_all" parent="menu_point_rep" sequence="1"/>
</data>
</openerp>
@@ -37,3 +37,5 @@
"access_pos_make_payment","pos.make.payment","model_pos_make_payment","point_of_sale.group_pos_user",1,0,0,0
"access_pos_scan_product","pos.scan.product","model_pos_scan_product","point_of_sale.group_pos_user",1,0,0,0
"access_pos_payment_report","pos.payment.report","model_pos_payment_report","point_of_sale.group_pos_user",1,0,0,0
"access_report_pos_order","report.pos.order","model_report_pos_order","point_of_sale.group_pos_user",1,0,0,0
"access_pos_return","pos.return","model_pos_return","point_of_sale.group_pos_user",1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
37 access_pos_make_payment pos.make.payment model_pos_make_payment point_of_sale.group_pos_user 1 0 0 0
38 access_pos_scan_product pos.scan.product model_pos_scan_product point_of_sale.group_pos_user 1 0 0 0
39 access_pos_payment_report pos.payment.report model_pos_payment_report point_of_sale.group_pos_user 1 0 0 0
40 access_report_pos_order report.pos.order model_report_pos_order point_of_sale.group_pos_user 1 0 0 0
41 access_pos_return pos.return model_pos_return point_of_sale.group_pos_user 1 0 0 0
+39 -4
View File
@@ -24,7 +24,7 @@
<field name="model">account.bank.statement</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="red:balance_end_real!=balance_end;blue:state=='draft' and (balance_end_real==balance_end)" string="Statement">
<tree colors="red:balance_end_real!=balance_end;blue:state=='draft' and (balance_end_real==balance_end);black:state in ('open');blue:state in ('draft')" string="Statement">
<field name="date"/>
<field name="name"/>
<field name="journal_id"/>
@@ -34,6 +34,9 @@
<field name="balance_end"/>
<field name="user_id"/>
<field name="state"/>
<button type="object" string="Open" name="button_open" states="draft" icon="terp-camera_test"/>
<button type="object" string="Confirm" name="button_confirm" states="open" icon="terp-gtk-go-back-rtl"/>
<button type="object" string="Cancel" name="button_cancel" states="confirm" icon="terp-gtk-stop"/>
</tree>
</field>
</record>
@@ -349,11 +352,43 @@
<menuitem action="action_bank_statement_treenew" id="menu_statement_tree2" parent="menu_statement_tree_all" sequence="1"/>
<record id="view_account_bank_statment_filter" model="ir.ui.view">
<field name="name">account.bank.statment.select</field>
<field name="model">account.bank.statement</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Cashbox">
<group col='9' colspan='4'>
<filter icon="terp-camera_test" string="Open"
domain="[('state','=','open')]"
help="All open cashboxes"/>
<filter icon="terp-dialog-close" string="To Close"
domain="[('state','=','draft')]"
help="All cashboxes to close"/>
<filter icon="terp-go-today" name="Today" string="Today"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d 23:59:59'))]"
help="All cashboxes to opened today"/>
<separator orientation="vertical"/>
<field name="name"/>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="4" col="20">
<filter string="Journal" icon="terp-folder-blue" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="action_pos_account_bank_statment">
<field name="name">All Cashboxes</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.bank.statement</field>
<field name="view_type">form</field>
<field name="view_id" eval="False"/>
<field name="context">{'search_default_Today':1}</field>
<field name="search_view_id" ref="view_account_bank_statment_filter"/>
</record>
<record model="ir.actions.act_window.view" id="act_statement_a1">
<field name="sequence" eval="1"/>
@@ -367,7 +402,7 @@
<field name="view_id" ref="view_bank_statement_form3"/>
<field name="act_window_id" ref="action_pos_account_bank_statment"/>
</record>
<menuitem name="All Cashboxes" parent="menu_point_report_register"
<menuitem name="All Cashboxes" parent="menu_statement_tree_all"
action="action_pos_account_bank_statment" id="menu_pos_bank_statment_tree" groups="base.group_extended" sequence="4"/>
<record model="ir.actions.act_window" id="action_my_all_pos_account_bank_statment">
@@ -414,8 +449,8 @@
<field name="act_window_id" ref="action_cashboxes_to_close"/>
</record>
<menuitem name="Cashboxes to Close" parent="menu_pos_bank_statment_tree"
action="action_cashboxes_to_close" id="menu_cashboxes_to_close_tree" groups="base.group_extended"/>
<!-- <menuitem name="Cashboxes to Close" parent="menu_statement_tree_all"-->
<!-- action="action_cashboxes_to_close" id="menu_cashboxes_to_close_tree" groups="base.group_extended"/>-->
<menuitem
+1 -1
View File
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-15 03:33+0000\n"
"X-Launchpad-Export-Date: 2010-06-16 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: product
+1 -1
View File
@@ -45,7 +45,7 @@
<field name="name"/>
<field name="categ_id" invisible="1"/>
<field name="variants" groups="product.group_product_variant"/>
<field name="uom_id"/>
<field name="uom_id" string="UoM"/>
<field name="type"/>
<field name="qty_available"/>
<field name="virtual_available"/>
+1 -1
View File
@@ -31,7 +31,7 @@
- removal date
- alert date
Used, for example, in food industries.''',
"update_xml" : ["product_expiry_view.xml", "report/report_stock_view.xml"],
"update_xml" : ["product_expiry_view.xml", "report/report_stock_view.xml", "wizard/stock_partial_view.xml"],
"active": False,
"installable": True
}
+12
View File
@@ -21,10 +21,22 @@
import datetime
from osv import fields, osv
import pooler
import time
class stock_production_lot(osv.osv):
_name = 'stock.production.lot'
_inherit = 'stock.production.lot'
def name_get(self, cr, uid, ids, context=None):
if not len(ids):
return []
result = []
for line in self.browse(cr, uid, ids, context):
if line.life_date:
result.append((line.id, (line.name or '')+' ('+line.life_date+')'))
else:
result.append((line.id, line.name))
return result
def _get_date(dtype):
"""Return a function to compute the limit date for this type"""
@@ -62,3 +62,19 @@ class stock_partial_lot_picking(osv.osv_memory):
return res
stock_partial_lot_picking()
class stock_move_split_lines_exist(osv.osv_memory):
_name = "stock.move.split.lines.exist"
_inherit = "stock.move.split.lines.exist"
_columns = {
'date': fields.date('Expiry 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()
@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<openerp>
<data>
<record id="view_split_in_lots" model="ir.ui.view">
<field name="name">Split in lots</field>
<field name="model">stock.move.split</field>
<field name="type">form</field>
<field name="inherit_id" ref="stock.view_split_in_lots"/>
<field name="arch" type="xml">
<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">
<field name="date"/>
</xpath>
</data>
</field>
</record>
</data>
</openerp>
@@ -19,9 +19,6 @@
"access_task_by_days","task.by.days","model_task_by_days","project.group_project_user",1,1,1,1
"access_close_task","close.task","model_close_task","project.group_project_user",1,1,1,1
"access_close_task_manager","close.task manager","model_close_task","project.group_project_manager",1,1,1,1
"access_resource_calendar_project_user","resource.resource.calendar project user","resource.model_resource_calendar","project.group_project_user",1,0,0,0
"access_resource_calendar_project_manager","resource.resource.calendar project manager","resource.model_resource_calendar","project.group_project_manager",1,1,1,1
"access_fiscalyear_sequence_project_manager","account.sequence.fiscalyear project manager","account.model_account_sequence_fiscalyear","project.group_project_manager",1,1,0,0
"access_partner_task user","base.res.partner user","base.model_res_partner","project.group_project_user",1,0,0,0
"access_partner_task manager","base.res.partner manager","base.model_res_partner","project.group_project_manager",1,0,0,0
"access_partner_address_task user","base.res.partner.address user","base.model_res_partner_address","project.group_project_user",1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
19 access_task_by_days task.by.days model_task_by_days project.group_project_user 1 1 1 1
20 access_close_task close.task model_close_task project.group_project_user 1 1 1 1
21 access_close_task_manager close.task manager model_close_task project.group_project_manager 1 1 1 1
access_resource_calendar_project_user resource.resource.calendar project user resource.model_resource_calendar project.group_project_user 1 0 0 0
access_resource_calendar_project_manager resource.resource.calendar project manager resource.model_resource_calendar project.group_project_manager 1 1 1 1
access_fiscalyear_sequence_project_manager account.sequence.fiscalyear project manager account.model_account_sequence_fiscalyear project.group_project_manager 1 1 0 0
22 access_partner_task user base.res.partner user base.model_res_partner project.group_project_user 1 0 0 0
23 access_partner_task manager base.res.partner manager base.model_res_partner project.group_project_manager 1 0 0 0
24 access_partner_address_task user base.res.partner.address user base.model_res_partner_address project.group_project_user 1 0 0 0
@@ -164,10 +164,10 @@
<group col="8" colspan="4">
<filter icon="terp-check" string="Current Plannings" domain="[('date_from','&lt;=',time.strftime('%%Y-%%m-%%d')),('date_to','&gt;=',time.strftime('%%Y-%%m-%%d'))]" help="Current Plannings"/>
<separator orientation="vertical"/>
<field name="name">
<field name="code">
<field name="user_id">
<field name="state">
<field name="name"/>
<field name="code"/>
<field name="user_id"/>
<field name="state"/>
</group>
</search>
</field>
+7 -12
View File
@@ -2,9 +2,7 @@
In order to test the sale order working with procurements I will create some
products with different supply method and procurement method.
-
I create two products.
-
I create one product Table.
I create one product Table as MTO.
-
!record {model: product.product, id: product_product_table0}:
categ_id: product.cat1
@@ -15,7 +13,7 @@
uom_id: product.product_uom_unit
uom_po_id: product.product_uom_unit
-
I create another product Wood.
I create another product Wood as MTS.
-
!record {model: product.product, id: product_product_wood0}:
categ_id: product.cat1
@@ -26,7 +24,7 @@
uom_id: product.product_uom_kgm
uom_po_id: product.product_uom_kgm
-
I define Minimum stock rule for my stockable product wood
I define Minimum stock rule for my stockable product Wood (qty between 10 and 15)
-
!record {model: stock.warehouse.orderpoint, id: stock_warehouse_orderpoint_op0}:
company_id: base.main_company
@@ -77,19 +75,16 @@
proc_ids = self.search(cr, uid, [('state','=','confirmed')])
assert proc_ids, _('No Procurements!')
-
The scheduler runs.
I run the scheduler.
-
!function {model: procurement.order, name: run_scheduler}:
- model: procurement.order
search: "[('state','=','confirmed')]"
-
I check that the procurement for the product table is in exception state.
As my product's supply method is produce and mrp module is yet not installed.
As my product's supply method is produce and the BoM is not defined.
-
!python {model: procurement.order}: |
from tools.translate import _
proc_ids = self.search(cr, uid, [('state','=','exception')])
assert proc_ids, _('No Procurements are in exception state!')
proc_ids = self.search(cr, uid, [('state','=','exception'),('product_id','=',ref('sale.product_product_table0'))])
assert proc_ids, _('No Procurements are in exception state for the table!')
@@ -1,5 +1,5 @@
-
In order to test the sale module in the Open-ERP, I need to configure details regarding product & customer.
In order to test the sale module, I need to configure details regarding product & customer.
-
I am going to sell my Mobile products to the customer with name Cleartrail
-
+25
View File
@@ -0,0 +1,25 @@
# -*- 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/>.
#
##############################################################################
import sale
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+44
View File
@@ -0,0 +1,44 @@
# -*- 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/>.
#
##############################################################################
{
'name': 'Customer & Sales',
'version': '1.0',
'category': 'Generic Modules/CRM & SRM',
'description': """Sale Orders Dates""",
'author': 'Tiny',
'website': 'http://www.openerp.com',
'depends': ["sale"],
'init_xml': [
],
'update_xml': [
'sale_view.xml',
],
'demo_xml': [
],
'test': [],
'installable': True,
'active': False,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+68
View File
@@ -0,0 +1,68 @@
# -*- 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
import time
from mx import DateTime
class sale_order_dates(osv.osv):
_inherit = 'sale.order'
_name = 'sale.order'
def _get_effective_date(self, cr, uid, ids, name, arg, context={}):
res = {}
dates_list = []
for order in self.browse(cr, uid, ids):
dates_list = []
for pick in order.picking_ids:
dates_list.append(pick.date)
if dates_list:
res[order.id] = min(dates_list)
else:
res[order.id] =False
return res
def _get_commitment_date(self, cr, uid, ids, name, arg, context={}):
res = {}
dates_list = []
for order in self.browse(cr, uid, ids):
dates_list = []
for line in order.order_line:
dt=DateTime.strptime(order.date_order, '%Y-%m-%d') + DateTime.RelativeDateTime(days=line.delay or 0.0)
dt_s = dt.strftime('%Y-%m-%d')
dates_list.append(dt_s)
res[order.id] = min(dates_list)
return res
_columns = {
'commitment_date': fields.function(_get_commitment_date, method=True,store=True, type='date', string='Commitment Date'),
'requested_date': fields.date('Requested Date'),
'effective_date': fields.function(_get_effective_date, method=True, type='date', store=True,string='Effective Date'),
}
sale_order_dates()
"""
- date_commitment: min(fields.function using delay on SO lines +
date_order)
- date_requested: fields.date
- Effective date: fields.function the first picking done.
"""
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+23
View File
@@ -0,0 +1,23 @@
<?xml version="1.0"?>
<openerp>
<data>
<record id="view_sale_orderfor" model="ir.ui.view">
<field name="name">sale.order.form.inherit5</field>
<field name="model">sale.order</field>
<field name="type">form</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<field name="date_confirm" position="after">
<separator string="Dates" colspan="4"/>
<field name="commitment_date"/>
<newline/>
<field name="effective_date"/>
<field name="requested_date"/>
</field>
</field>
</record>
</data>
</openerp>
+1
View File
@@ -55,6 +55,7 @@ Thanks to the double entry management, the inventory controlling is powerful and
"wizard/stock_invoice_onshipping_view.xml",
"wizard/stock_inventory_merge_view.xml",
"wizard/stock_location_product_view.xml",
"wizard/stock_splitinto_view.xml",
"wizard/stock_inventory_line_split_view.xml",
"wizard/stock_change_standard_price_view.xml",
"wizard/stock_traceability_view.xml",
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-15 03:33+0000\n"
"X-Launchpad-Export-Date: 2010-06-16 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: stock
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-15 03:33+0000\n"
"X-Launchpad-Export-Date: 2010-06-16 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: stock
+317
View File
@@ -0,0 +1,317 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="0.0" y1="57.0" width="538" height="728"/>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table_Address_detail">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table_Title_String">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Header_Order_Reference_Tbl">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
</blockTableStyle>
<blockTableStyle id="Content_Order_Reference_Table">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
</blockTableStyle>
<blockTableStyle id="Move_Line_Header">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
</blockTableStyle>
<blockTableStyle id="Move_Line_Contect_Assign_State">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/>
</blockTableStyle>
<blockTableStyle id="Move_Line_Content_Other_State">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="Standard" fontName="Times-Roman"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Times-Italic" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Times-Roman"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Table Contents" fontName="Times-Roman"/>
<paraStyle name="Footer" fontName="Times-Roman"/>
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_5cm_Above_Space" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_1cm_above_space" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="3.0" spaceAfter="0.0"/>
</stylesheet>
<images/>
<story>
<para style="terp_default_8">[[ repeatIn(objects,'picking') ]] </para>
<para style="terp_default_9">
<font color="white"> </font>
</para>
<blockTable colWidths="269.0,269.0" style="Table_Address_detail">
<tr>
<td>
<para style="terp_default_9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_default_9">[[ (picking.address_id and picking.address_id.partner_id and picking.address_id.partner_id.title) or '' ]] [[ picking.address_id and picking.address_id.partner_id and picking.address_id.partner_id.name ]]</para>
<para style="terp_default_9">[[ picking.address_id and picking.address_id.street or '' ]]</para>
<para style="terp_default_9">[[ picking.address_id and picking.address_id.zip or '' ]] [[ picking.address_id and picking.address_id.city or '']]</para>
<para style="terp_default_2">
<font color="white"> </font>
</para>
<para style="terp_default_2">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="terp_default_9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_tblheader_Details">[[ picking.sale_id and picking.sale_id.partner_shipping_id and 'Shipping Address :' or removeParentNode('para') ]] </para>
<para style="terp_default_9">[[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.title) or '' ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.name) or '' ]] </para>
<para style="terp_default_9">[[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.street) or '' ]] </para>
<para style="terp_default_9">[[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.zip) or '' ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.city) or '' ]] [[ (picking.address_id and picking.address_id.state_id and picking.address_id.state_id.name) or '' ]] </para>
<para style="terp_default_9">[[ (picking.address_id and picking.address_id.country_id and picking.address_id.country_id.name) or '' ]]</para>
</td>
</tr>
</blockTable>
<para style="terp_default_5cm_Above_Space">
<font color="white"> </font>
</para>
<para style="terp_default_5cm_Above_Space">
<font color="white"> </font>
</para>
<para style="terp_default_5cm_Above_Space">
<font color="white"> </font>
</para>
<blockTable colWidths="538.0" style="Table_Title_String">
<tr>
<td>
<para style="terp_header">Packing List: [[ picking.name ]]</para>
</td>
</tr>
</blockTable>
<para style="terp_default_5cm_Above_Space">
<font color="white"> </font>
</para>
<para style="terp_default_5cm_Above_Space">
<font color="white"> </font>
</para>
<blockTable colWidths="123.0,134.0,133.0,134.0" style="Header_Order_Reference_Tbl">
<tr>
<td>
<para style="terp_tblheader_General_Centre">Order(Origin)</para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Recipient</para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Expected Shipping Date </para>
</td>
<td>
<para style="terp_tblheader_General_Centre"> Weight</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="123.0,134.0,133.0,134.0" style="Content_Order_Reference_Table">
<tr>
<td>
<para style="terp_default_Centre_8">[[ picking.origin ]]</para>
</td>
<td>
<para style="terp_default_Centre_8">[[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.title) or '' ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.name) or '' ]] </para>
</td>
<td>
<para style="terp_default_Centre_8">[[ formatLang(picking.min_date,date_time = True) ]]</para>
</td>
<td>
<para style="terp_default_Centre_8">[[ 'weight' in picking._columns.keys() and picking.weight or '']] </para>
</td>
</tr>
</blockTable>
<para style="terp_default_5cm_Above_Space">
<font color="white"> </font>
</para>
<blockTable colWidths="196.0,68.0,56.0,61.0,73.0,70.0" repeatRows="1" style="Move_Line_Header">
<tr>
<td>
<para style="terp_tblheader_Details">Description</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Tracking Lot</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Lot</para>
</td>
<td>
<para style="terp_tblheader_Details">State</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Quantity</para>
</td>
<td>
<para style="terp_tblheader_Details">Location</para>
</td>
</tr>
</blockTable>
<para style="terp_default_2">
<font color="white"> </font>
</para>
<para style="terp_default_2">
<font color="white"> </font>
</para>
<section>
<para style="terp_default_8">[[ repeatIn([line for line in picking.move_lines if (line.state == 'assigned' )],'move_lines') ]]</para>
<blockTable colWidths="197.0,68.0,61.0,57,46.0,26.0,74.0" style="Move_Line_Contect_Assign_State">
<tr>
<td>
<para style="terp_default_9">[ [[ move_lines.product_id.default_code ]] ] [[ move_lines.product_id.name ]] [[ move_lines.product_id.variants or '']] </para>
</td>
<td>
<para style="terp_default_9">[[ move_lines.tracking_id and move_lines.tracking_id.name or '' ]]</para>
</td>
<td>
<para style="terp_default_9">[[ (move_lines.prodlot_id and move_lines.prodlot_id.name) or '' ]]</para>
</td>
<td>
<para style="terp_default_9">[[ move_lines.state ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ move_lines.product_qty ]] </para>
</td>
<td>
<para style="terp_default_9">[[ move_lines.product_uom.name ]]</para>
</td>
<td>
<para style="terp_default_9">[[ (move_lines.location_id and move_lines.location_id.name) or '' ]]</para>
</td>
</tr>
</blockTable>
<para style="terp_default_2">
<font color="white"> </font>
</para>
</section>
<para style="terp_default_5cm_Above_Space">[[ (line.state == 'done' or line.state == 'confirmed') and removeParentNode('para') ]]</para>
<para style="terp_default_Bold_9">Non Assigned Products: [[ ( line.state == 'assigned' or line.state == 'done' or line.state == 'confirmed' ) and removeParentNode('para') ]]</para>
<para style="terp_default_1cm_above_space">[[ (line.state == 'done' or line.state == 'confirmed') and removeParentNode('para') ]]</para>
<section>
<para style="terp_default_8">[[ repeatIn([line for line in picking.move_lines if (line.state != 'assigned' )],'move_lines') ]]</para>
<blockTable colWidths="257.0,57.0,62.0,46.0,26.0,74.0" style="Move_Line_Content_Other_State">
<tr>
<td>
<para style="terp_default_9">[ [[ move_lines.product_id.default_code ]] ] [[ move_lines.product_id.name ]] [[ move_lines.product_id.variants or '']]</para>
</td>
<td>
<para style="terp_default_9">[[ (move_lines.prodlot_id and move_lines.prodlot_id.name) or '' ]]</para>
</td>
<td>
<para style="terp_default_9">[[ move_lines.state ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ move_lines.product_qty ]] </para>
</td>
<td>
<para style="terp_default_9">[[ move_lines.product_uom.name ]]</para>
</td>
<td>
<para style="terp_default_9">[[ (move_lines.location_id and move_lines.location_id.name) or '' ]]</para>
</td>
</tr>
</blockTable>
<para style="terp_default_2">
<font color="white"> </font>
</para>
</section>
<para style="terp_default_9">
<font color="white"> </font>
</para>
<para style="Standard">
<font color="white"> </font>
</para>
</story>
</document>
+1
View File
@@ -32,4 +32,5 @@ class picking(report_sxw.rml_parse):
})
report_sxw.report_sxw('report.stock.picking.list','stock.picking','addons/stock/report/picking.rml',parser=picking)
report_sxw.report_sxw('report.stock.packing.list','stock.picking','addons/stock/report/packing.rml',parser=picking)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+11
View File
@@ -5,6 +5,8 @@
"access_stock_warehouse_user","stock.warehouse.user","model_stock_warehouse","base.group_user",1,0,0,0
"access_stock_location_manager","stock.location.manager","model_stock_location","stock.group_stock_manager",1,1,1,1
"access_stock_location_user","stock.location.user","model_stock_location","base.group_user",1,0,0,0
"access_stock_journal_user","stock.journal.user","model_stock_journal","base.group_user",1,0,0,0
"access_stock_journal_manager","stock.journal.manager","model_stock_journal","stock.group_stock_manager",1,1,1,1
"access_stock_picking_move_wizard","stock.picking.move.wizard","model_stock_picking_move_wizard","stock.group_stock_user",1,1,1,1
"access_stock_tracking","stock.tracking","model_stock_tracking","stock.group_stock_user",1,1,1,0
"access_stock_picking","stock.picking","model_stock_picking","stock.group_stock_user",1,1,1,1
@@ -40,3 +42,12 @@
"access_stock_inventory_merge","stock.inventory.merge","model_stock_inventory_merge","stock.group_stock_user",1,0,0,0
"access_stock_change_standard_price","stock.change.standard.price","model_stock_change_standard_price","stock.group_stock_user",1,0,0,0
"access_action_traceability","action.traceability","model_action_traceability","stock.group_stock_user",1,0,0,0
"access_stock_split_into","stock.split.into","model_stock_split_into","stock.group_stock_user",1,0,0,0
"access_stock_split_into_manager","stock.split.into","model_stock_split_into","stock.group_stock_manager",1,1,1,1
"access_report_stock_move","report.stock.move","model_report_stock_move","stock.group_stock_user",1,1,1,1
"access_report_stock_inventory","report.stock.inventory","model_report_stock_inventory","stock.group_stock_user",1,1,1,1
"access_stock_replacement","stock.replacement","model_stock_replacement","stock.group_stock_user",1,1,1,1
"access_stock_replacement_result","stock.replacement.result","model_stock_replacement_result","stock.group_stock_user",1,1,1,1
"access_stock_ups","stock.ups","model_stock_ups","stock.group_stock_user",1,1,1,1
"access_stock_ups_final","stock.ups.final","model_stock_ups_final","stock.group_stock_user",1,1,1,1
"access_stock_ups_upload","stock.ups.upload","model_stock_ups_upload","stock.group_stock_user",1,1,1,1
Can't render this file because it contains an unexpected character in line 40 and column 53.
+88 -46
View File
@@ -49,6 +49,17 @@ class stock_incoterms(osv.osv):
stock_incoterms()
class stock_journal(osv.osv):
_name = "stock.journal"
_description = "Stock Journal"
_columns = {
'name': fields.char('Stock Journal', size=32, required=True),
'user_id': fields.many2one('res.users','Responsible'),
}
_defaults = {
'user_id': lambda s,c,u,ctx: u
}
stock_journal()
#----------------------------------------------------------
# Stock Location
@@ -111,7 +122,7 @@ class stock_location(osv.osv):
return res
def product_detail(self, cr, uid, id, field, context={}):
""" Finds detail of product like price type, currency and then calculates its price.
""" Finds detail of product like price type, currency and then calculates its price.
@param field: Field name
@return: Calculated price
"""
@@ -142,7 +153,7 @@ class stock_location(osv.osv):
def _product_value(self, cr, uid, ids, field_names, arg, context={}):
""" Calculates real and virtual stock value of a product.
@param field_names: Name of field
@param field_names: Name of field
@return: Dictionary of values
"""
result = {}
@@ -159,7 +170,6 @@ class stock_location(osv.osv):
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the stock location without removing it."),
'usage': fields.selection([('supplier', 'Supplier Location'), ('view', 'View'), ('internal', 'Internal Location'), ('customer', 'Customer Location'), ('inventory', 'Inventory'), ('procurement', 'Procurement'), ('production', 'Production'), ('transit', 'Transit Location for Inter-Companies Transfers')], 'Location Type', required=True),
'allocation_method': fields.selection([('fifo', 'FIFO'), ('lifo', 'LIFO'), ('nearest', 'Nearest')], 'Allocation Method', required=True),
'complete_name': fields.function(_complete_name, method=True, type='char', size=100, string="Location Name"),
'stock_real': fields.function(_product_qty_available, method=True, type='float', string='Real Stock', multi="stock"),
@@ -169,6 +179,7 @@ class stock_location(osv.osv):
'location_id': fields.many2one('stock.location', 'Parent Location', select=True, ondelete='cascade'),
'child_ids': fields.one2many('stock.location', 'location_id', 'Contains'),
'chained_journal_id': fields.many2one('stock.journal', 'Chained Journal'),
'chained_location_id': fields.many2one('stock.location', 'Chained Location If Fixed'),
'chained_location_type': fields.selection([('none', 'None'), ('customer', 'Customer'), ('fixed', 'Fixed Location')],
'Chained Location Type', required=True),
@@ -181,6 +192,8 @@ class stock_location(osv.osv):
"validated automatically. With 'Manual Operation', the stock move has to be validated "\
"by a worker. With 'Automatic No Step Added', the location is replaced in the original move."
),
'chained_picking_type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal'), ('delivery', 'Delivery')], 'Shipping Type', help="Shipping type specify of the chained move, goods coming in or going out."),
'chained_company_id': fields.many2one('res.company', 'Chained Company', help='Set here the belonging company of the chained move'),
'chained_delay': fields.integer('Chained lead time (days)'),
'address_id': fields.many2one('res.partner.address', 'Location Address'),
'icon': fields.selection(tools.icons, 'Icon', size=64),
@@ -225,7 +238,7 @@ class stock_location(osv.osv):
elif location.chained_location_type == 'fixed':
result = location.chained_location_id
if result:
return result, location.chained_auto_packing, location.chained_delay
return result, location.chained_auto_packing, location.chained_delay, location.chained_journal_id and location.chained_journal_id.id or False, location.chained_company_id and location.chained_company_id.id or False, location.chained_picking_type
return result
def picking_type_get(self, cr, uid, from_location, to_location, context={}):
@@ -312,13 +325,13 @@ class stock_location(osv.osv):
result['total_price'] = total_price
return result
def _product_get_multi_location(self, cr, uid, ids, product_ids=False, context={},
def _product_get_multi_location(self, cr, uid, ids, product_ids=False, context={},
states=['done'], what=('in', 'out')):
"""
"""
@param product_ids: Ids of product
@param states: List of states
@param what: Tuple of
@return:
@return:
"""
product_obj = self.pool.get('product.product')
context.update({
@@ -332,7 +345,7 @@ class stock_location(osv.osv):
"""
@param product_ids:
@param states:
@return:
@return:
"""
ids = id and [id] or []
return self._product_get_multi_location(cr, uid, ids, product_ids, context, states)
@@ -354,7 +367,7 @@ class stock_location(osv.osv):
# [ (tracking_id, product_qty, location_id) ]
#
def _product_reserve(self, cr, uid, ids, product_id, product_qty, context={}):
"""
"""
@param product_id: Id of product
@param product_qty: Quantity of product
@return: List of Values or False
@@ -400,7 +413,7 @@ class stock_tracking(osv.osv):
def get_create_tracking_lot(self, cr, uid, ids, tracking_lot):
"""
@param tracking_lot: Name of tracking lot
@return:
@return:
"""
tracking_lot_list = self.search(cr, uid, [('name', '=', tracking_lot)],
limit=1)
@@ -432,7 +445,7 @@ class stock_tracking(osv.osv):
'move_ids': fields.one2many('stock.move', 'tracking_id', 'Moves Tracked'),
'date': fields.datetime('Created Date', required=True),
}
_defaults = {
'active': lambda *a: 1,
'name': make_sscc,
@@ -471,7 +484,7 @@ class stock_picking(osv.osv):
""" Calculates planned date if it is greater than 'value'.
@param name: Name of field
@param value: Value of field
@param arg: User defined argument
@param arg: User defined argument
@return: True or False
"""
if not value:
@@ -493,7 +506,7 @@ class stock_picking(osv.osv):
""" Calculates planned date if it is less than 'value'.
@param name: Name of field
@param value: Value of field
@param arg: User defined argument
@param arg: User defined argument
@return: True or False
"""
if not value:
@@ -557,7 +570,7 @@ class stock_picking(osv.osv):
'type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal'), ('delivery', 'Delivery')], 'Shipping Type', required=True, select=True, help="Shipping type specify, goods coming in or going out."),
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the picking without removing it."),
'note': fields.text('Notes'),
'stock_journal_id': fields.many2one('stock.journal','Stock Journal'),
'location_id': fields.many2one('stock.location', 'Location', help="Keep empty if you produce at the location where the finished products are needed." \
"Set a location if you produce at a fixed location. This can be a partner location " \
"if you subcontract the manufacturing operations."),
@@ -589,7 +602,7 @@ class stock_picking(osv.osv):
("2binvoiced", "To Be Invoiced"),
("none", "Not from Picking")], "Invoice Status",
select=True, required=True, readonly=True, states={'draft': [('readonly', False)]}),
'company_id': fields.many2one('res.company', 'Company', required=True,select=1),
'company_id': fields.many2one('res.company', 'Company', select=1),
}
_defaults = {
'name': lambda self, cr, uid, context: '/',
@@ -599,7 +612,7 @@ class stock_picking(osv.osv):
'type': lambda *a: 'in',
'invoice_state': lambda *a: 'none',
'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock_picking', context=c)
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.picking', context=c)
}
def copy(self, cr, uid, id, default=None, context={}):
@@ -609,7 +622,7 @@ class stock_picking(osv.osv):
picking_obj = self.browse(cr, uid, [id], context)[0]
if ('name' not in default) or (picking_obj.name=='/'):
seq_obj_name = 'stock.picking.' + picking_obj.type
default['name'] = self.pool.get('ir.sequence').get(cr, uid, seq_obj_name)
default['name'] = self.pool.get('ir.sequence').get(cr, uid, seq_obj_name)
return super(stock_picking, self).copy(cr, uid, id, default, context)
@@ -621,7 +634,7 @@ class stock_picking(osv.osv):
def action_confirm(self, cr, uid, ids, context={}):
""" Confirms picking.
@return: True
@return: True
"""
self.write(cr, uid, ids, {'state': 'confirmed'})
todo = []
@@ -697,7 +710,7 @@ class stock_picking(osv.osv):
return True
def cancel_assign(self, cr, uid, ids, *args):
""" Cancels picking and moves.
""" Cancels picking and moves.
@return: True
"""
wf_service = netsvc.LocalService("workflow")
@@ -792,7 +805,7 @@ class stock_picking(osv.osv):
return False
def _get_payment_term(self, cr, uid, picking):
""" Gets payment term from partner.
""" Gets payment term from partner.
@return: Payment term
"""
partner_obj = self.pool.get('res.partner')
@@ -842,7 +855,7 @@ class stock_picking(osv.osv):
def _get_taxes_invoice(self, cr, uid, move_line, type):
""" Gets taxes on invoice
@param move_line: Stock move lines
@param type: Type of invoice
@param type: Type of invoice
@return: Taxes Ids for the move line
"""
if type in ('in_invoice', 'in_refund'):
@@ -1044,12 +1057,12 @@ class stock_picking(osv.osv):
def do_partial(self, cr, uid, ids, partial_datas, context={}):
""" Makes partial picking and moves done.
@param partial_datas : Dictionary containing details of partial picking
like partner_id, address_id, delivery_date,
like partner_id, address_id, delivery_date,
delivery moves with product_id, product_qty, uom
@return: Dictionary of values
"""
res = {}
move_obj = self.pool.get('stock.move')
product_obj = self.pool.get('product.product')
currency_obj = self.pool.get('res.currency')
@@ -1266,7 +1279,7 @@ stock_production_lot()
class stock_production_lot_revision(osv.osv):
_name = 'stock.production.lot.revision'
_description = 'Production lot revisions'
_columns = {
'name': fields.char('Revision Name', size=64, required=True),
'description': fields.text('Description'),
@@ -1293,6 +1306,7 @@ stock_production_lot_revision()
# location_dest_id is only used for predicting futur stocks
#
class stock_move(osv.osv):
def _getSSCC(self, cr, uid, context={}):
cr.execute('select id from stock_tracking where create_uid=%s order by id desc limit 1', (uid,))
res = cr.fetchone()
@@ -1370,7 +1384,7 @@ class stock_move(osv.osv):
\nThe state is \'Waiting\' if the move is waiting for another one.'),
'price_unit': fields.float('Unit Price',
digits_compute= dp.get_precision('Account')),
'company_id': fields.many2one('res.company', 'Company', required=True,select=1),
'company_id': fields.many2one('res.company', 'Company', select=1),
'partner_id': fields.related('picking_id','address_id','partner_id',type='many2one', relation="res.partner", string="Partner"),
'backorder_id': fields.related('picking_id','backorder_id',type='many2one', relation="stock.picking", string="Back Order"),
'origin': fields.related('picking_id','origin',type='char', size=64, relation="stock.picking", string="Origin"),
@@ -1396,7 +1410,8 @@ class stock_move(osv.osv):
move_list = self.pool.get('stock.move').read(cr, uid, context['move_line'][0], ['location_dest_id'])
return move_list and move_list['location_dest_id'][0] or False
if context.get('address_out_id', False):
return self.pool.get('res.partner.address').browse(cr, uid, context['address_out_id'], context).partner_id.property_stock_customer.id
property_out = self.pool.get('res.partner.address').browse(cr, uid, context['address_out_id'], context).partner_id.property_stock_customer
return property_out and property_out.id or False
return False
def _default_location_source(self, cr, uid, context={}):
@@ -1442,7 +1457,7 @@ class stock_move(osv.osv):
cursor.commit()
return res
def onchange_lot_id(self, cr, uid, ids, prodlot_id=False, product_qty=False,
def onchange_lot_id(self, cr, uid, ids, prodlot_id=False, product_qty=False,
loc_id=False, product_id=False, context=None):
""" On change of production lot gives a warning message.
@param prodlot_id: Changed production lot id
@@ -1465,13 +1480,13 @@ class stock_move(osv.osv):
}
return {'warning': warning}
def onchange_quantity(self, cr, uid, ids, product_id, product_qty,
def onchange_quantity(self, cr, uid, ids, product_id, product_qty,
product_uom, product_uos):
""" On change of product quantity finds UoM and UoS quantities
@param product_id: Product id
@param product_qty: Changed Quantity of product
@param product_uom: Unit of measure of product
@param product_uos: Unit of sale of product
@param product_uos: Unit of sale of product
@return: Dictionary of values
"""
result = {
@@ -1491,13 +1506,13 @@ class stock_move(osv.osv):
return {'value': result}
def onchange_product_id(self, cr, uid, ids, prod_id=False, loc_id=False,
def onchange_product_id(self, cr, uid, ids, prod_id=False, loc_id=False,
loc_dest_id=False, address_id=False):
""" On change of product id, if finds UoM, UoS, quantity and UoS quantity.
@param prod_id: Changed Product id
@param loc_id: Source location id
@param loc_id: Destination location id
@param address_id: Address id of partner
@param address_id: Address id of partner
@return: Dictionary of values
"""
if not prod_id:
@@ -1562,8 +1577,9 @@ class stock_move(osv.osv):
def create_chained_picking(self, cr, uid, moves, context):
new_moves = []
res_obj = self.pool.get('res.company')
for picking, todo in self._chain_compute(cr, uid, moves, context).items():
ptype = self.pool.get('stock.location').picking_type_get(cr, uid, todo[0][0].location_dest_id, todo[0][1][0])
ptype = todo[0][1][5] and todo[0][1][5] or self.pool.get('stock.location').picking_type_get(cr, uid, todo[0][0].location_dest_id, todo[0][1][0])
pick_name = ''
if ptype == 'delivery':
pick_name = self.pool.get('ir.sequence').get(cr, uid, 'stock.picking.delivery')
@@ -1574,17 +1590,20 @@ class stock_move(osv.osv):
'note': picking.note,
'move_type': picking.move_type,
'auto_picking': todo[0][1][1] == 'auto',
'stock_journal_id': todo[0][1][3],
'company_id': todo[0][1][4] or res_obj._company_default_get(cr, uid, 'stock.company', context),
'address_id': picking.address_id.id,
'invoice_state': 'none'
})
for move, (loc, auto, delay) in todo:
# Is it smart to copy ? May be it's better to recreate ?
for move, (loc, auto, delay, journal, company_id, ptype) in todo:
new_id = self.pool.get('stock.move').copy(cr, uid, move.id, {
'location_id': move.location_dest_id.id,
'location_dest_id': loc.id,
'date_moved': time.strftime('%Y-%m-%d'),
'picking_id': pickid,
'state': 'waiting',
'company_id': company_id or res_obj._company_default_get(cr, uid, 'stock.company', context) ,
'move_history_ids': [],
'date_planned': (datetime.strptime(move.date_planned, '%Y-%m-%d %H:%M:%S') + relativedelta(days=delay or 0)).strftime('%Y-%m-%d'),
'move_history_ids2': []}
@@ -1670,6 +1689,23 @@ class stock_move(osv.osv):
wf_service.trg_write(uid, 'stock.picking', pick_id, cr)
return count
def setlast_tracking(self, cr, uid, ids, context=None):
new_move = []
update_val = {}
ir_sequence_obj = self.pool.get('ir.sequence')
prodlot_obj = self.pool.get('stock.production.lot')
last_prod = [line.prodlot_id for line in self.browse(cr, uid, ids)[0].picking_id.move_lines if line.prodlot_id]
last_prod.sort(key=lambda p: p.date, reverse=True)
last_prod_id = last_prod and last_prod[0].id
update_val['prodlot_id'] = last_prod_id
if update_val.get('prodlot_id',[])==[]:
sequence = ir_sequence_obj.get(cr, uid, 'stock.lot.serial')
prodlot_id = prodlot_obj.create(cr, uid, {'name': sequence}, {'product_id': self.browse(cr, uid, ids)[0].product_id.id})
update_val['prodlot_id'] = prodlot_id
self.write(cr, uid, ids, update_val)
return True
#
# Cancel move => cancel others move and pickings
#
@@ -1745,13 +1781,13 @@ class stock_move(osv.osv):
def action_done(self, cr, uid, ids, context={}):
""" Makes the move done and if all moves are done, it will finish the picking.
@return:
@return:
"""
track_flag = False
picking_ids = []
product_uom_obj = self.pool.get('product.uom')
price_type_obj = self.pool.get('product.price.type')
product_obj=self.pool.get('product.product')
product_obj=self.pool.get('product.product')
move_obj = self.pool.get('account.move')
for move in self.browse(cr, uid, ids):
if move.picking_id: picking_ids.append(move.picking_id.id)
@@ -1781,7 +1817,7 @@ class stock_move(osv.osv):
journal_id, acc_src, acc_dest, acc_variation, amount = self._get_accounting_values(cr, uid, move, context)
lines = [(journal_id, self.create_account_move(cr, uid, move, acc_dest, acc_variation, amount, context))]
elif ((move.location_id.usage == 'supplier' and move.location_dest_id.usage == 'internal') or (move.location_id.usage == 'transit' and move.location_dest_id.usage == 'internal')):
elif ((move.location_id.usage == 'supplier' and move.location_dest_id.usage == 'internal') or (move.location_id.usage == 'transit' and move.location_dest_id.usage == 'internal')):
if move.location_dest_id.company_id:
context.update({'force_company': move.location_dest_id.company_id.id})
journal_id, acc_src, acc_dest, acc_variation, amount = self._get_accounting_values(cr, uid, move, context)
@@ -1814,20 +1850,26 @@ class stock_move(osv.osv):
self.write(cr, uid, ids, {'state': 'done', 'date_planned': time.strftime('%Y-%m-%d %H:%M:%S'), 'tracking_id': tracking_lot or False})
picking_obj = self.pool.get('stock.picking')
for pick in picking_obj.browse(cr, uid, picking_ids):
if all(move.state == 'done' for move in pick.move_lines):
picking_obj.action_done(cr, uid, [pick.id])
for (id,name) in picking_obj.name_get(cr, uid, picking_ids):
message = _('Picking ') + " '" + name + "' "+ _("is processed")
self.log(cr, uid, id, message)
self.log(cr, uid, id, message)
wf_service = netsvc.LocalService("workflow")
for id in ids:
wf_service.trg_trigger(uid, 'stock.move', id, cr)
for pick in picking_obj.browse(cr, uid, picking_ids):
if len([move.state == 'done' for move in pick.move_lines]) == len(pick.move_lines):
wf_service.trg_validate(uid, 'stock.picking', pick.id, 'button_done', cr)
return True
def create_account_move(self, cr, uid, move,account_id,account_variation,amount, context=None):
partner_id = move.picking_id.address_id and (move.picking_id.address_id.partner_id and move.picking_id.address_id.partner_id.id or False) or False
lines=[(0, 0, {
'name': move.name,
@@ -1838,7 +1880,7 @@ class stock_move(osv.osv):
'ref': move.picking_id and move.picking_id.name or False,
'date': time.strftime('%Y-%m-%d') ,
'partner_id': partner_id,
}),
}),
(0, 0, {
'name': move.name,
'product_id': move.product_id and move.product_id.id or False,
@@ -1848,7 +1890,7 @@ class stock_move(osv.osv):
'ref': move.picking_id and move.picking_id.name or False,
'date': time.strftime('%Y-%m-%d') ,
'partner_id': partner_id,
})]
})]
return lines
def unlink(self, cr, uid, ids, context=None):
if context is None:
@@ -2038,7 +2080,7 @@ class stock_move(osv.osv):
def do_partial(self, cr, uid, ids, partial_datas, context={}):
""" Makes partial pickings and moves done.
@param partial_datas: Dictionary containing details of partial picking
like partner_id, address_id, delivery_date, delivery
like partner_id, address_id, delivery_date, delivery
moves with product_id, product_qty, uom
"""
res = {}
@@ -2183,7 +2225,7 @@ class stock_inventory(osv.osv):
""" Creates a stock move from an inventory line
@param inventory_line:
@param move_vals:
@return:
@return:
"""
return self.pool.get('stock.move').create(cr, uid, move_vals)
@@ -2275,7 +2317,7 @@ class stock_inventory_line(osv.osv):
""" Changes UoM and name if product_id changes.
@param location_id: Location id
@param product: Changed product_id
@param uom: UoM product
@param uom: UoM product
@return: Dictionary of changed values
"""
if not product:
+1
View File
@@ -3,6 +3,7 @@
<data>
<report auto="False" id="report_product_history" model="product.product" name="stock.product.history" string="Future Stock Forecast"/>
<report id="report_picking_list" model="stock.picking" name="stock.picking.list" string="Picking list" rml="stock/report/picking.rml"/>
<report id="report_packing_list" model="stock.picking" name="stock.packing.list" string="Packing list" rml="stock/report/packing.rml"/>
<report id="report_move_labels" model="stock.move" name="stock.move.label" string="Item Labels" xml="stock/report/lot_move_label.xml" xsl="stock/report/lot_move_label.xsl"/>
<report auto="False" id="report_location_overview" model="stock.location" name="lot.stock.overview" string="Location Overview" rml="stock/report/lot_overview.rml" groups="base.group_extended"/>
<report auto="False" id="report_lot_location" model="stock.location" name="lot.location" rml="stock/report/lot_location.rml" string="Lots by location"/>
+178 -57
View File
@@ -313,6 +313,7 @@
<field name="product_qty" />
<field name="product_uom" string="UOM"/>
<field name="prodlot_id" groups="base.group_extended"/>
<field groups="base.group_extended" name="tracking_id"/>
<field name="product_packaging" domain="[('product_id','=',product_id)]" groups="base.group_extended"/>
<field name="picking_id"/>
<field name="location_id" />
@@ -336,6 +337,7 @@
<field name="product_qty" />
<field name="product_uom" string="UOM"/>
<field name="prodlot_id" groups="base.group_extended"/>
<field groups="base.group_extended" name="tracking_id"/>
<field name="product_packaging" domain="[('product_id','=',product_id)]" groups="base.group_extended"/>
<field name="picking_id"/>
<field name="location_id" />
@@ -420,6 +422,9 @@
<field name="chained_location_id"/>
<field name="chained_auto_packing"/>
<field name="chained_delay"/>
<field name="chained_journal_id"/>
<field name="chained_picking_type"/>
<field name="chained_company_id" widget="selection"/>
</group>
<group col="2" colspan="2">
<separator string="Localization" colspan="2"/>
@@ -603,37 +608,43 @@
<field name="arch" type="xml">
<form string="Picking list">
<group colspan="4" col="6">
<field name="name" readonly="1"/>
<!-- <field name="address_id" context="{'contact_display' : 'partner'}" groups="base.group_extended"/>-->
<field name="origin"/>
<field name="backorder_id" groups="base.group_extended" readonly="1"/>
<field name="date"/>
<field name="min_date"/>
<field name="type"/>
<field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<notebook colspan="4">
<page string="General Information">
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_out_id': address_id}">
<tree colors="grey:state in ('cancel')" string="Stock Moves">
<tree colors="grey:state in ('cancel')" string="Stock Moves" editable="top">
<field name="name" string="Move Name"/>
<field name="product_id"/>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
<field name="product_uom" string="UOM"/>
<field name="picking_id"/>
<field name="prodlot_id" groups="base.group_extended"/>
<field name="location_id"/>
<field name="location_dest_id"/>
<field name="date_planned"/>
<field name="date_expected" string="Date Expected"/>
<field name="state"/>
<button
name="%(stock.track_line)d"
string="Split in production lots"
type="action" icon="terp-stock_effects-object-colorize"
states="draft,waiting,confirmed,assigned" />
<field groups="base.group_extended" name="tracking_id"/>
<button name="%(split_into)d" string="Split Stock Moves" type="action"
icon="terp-stock_effects-object-colorize"
states="draft,assigned,confirmed,done"/>
<button name="setlast_tracking" string="Set Last Tracking" type="object"
attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
icon="terp-stock_effects-object-colorize"
states="draft,assigned,confirmed,done"/>
<field name="location_id"/>
<field name="location_dest_id"/>
<field name="date_planned"/>
<field name="date_expected" string="Date Expected"/>
<field name="state"/>
<button name="%(stock.move_scrap)d"
string="Scrap Products" type="action"
@@ -662,10 +673,13 @@
domain="[('product_id','=?',product_id)]"
on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id)"/>
<field groups="base.group_extended" name="tracking_id"/>
<newline/>
<label/>
<button name="%(track_line)d" string="Split in production lots" type="action" icon="terp-stock_effects-object-colorize"/>
<button name="%(move_scrap)d" string="Scrap Move Line" type="action" icon="gtk-justify-fill"/>
<button name="%(split_into)d" string="Split Stock Moves" type="action"
icon="terp-stock_effects-object-colorize" />
<separator colspan="4" string="Move State"/>
<field name="state"/>
<group colspan="2">
@@ -715,10 +729,9 @@
<separator orientation="vertical"/>
<filter icon="terp-accessories-archiver-minus" string="Back Order" domain="[('backorder_id', '&lt;&gt;', False)]" help="Has Back Order" />
<separator orientation="vertical"/>
<field name="location_id"/>
<field name="location_dest_id"/>
<field name="name"/>
<field name="address_id"/>
<field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="4" col="8">
@@ -761,19 +774,28 @@
<field name="backorder_id" groups="base.group_extended" readonly="1"/>
<field name="date" />
<field name="min_date"/>
<field name="type" invisible="1"/>
<field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<field name="type" invisible="1"/>
</group>
<notebook colspan="4">
<page string="General Information">
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_out_id': address_id}">
<tree colors="grey:state in ('cancel')" string="Stock Moves">
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_out_id': address_id}" >
<tree colors="grey:state in ('cancel')" string="Stock Moves" editable="top">
<field name="name" string="Move Name"/>
<field name="product_id"/>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
<field name="product_uom" string="UOM"/>
<field name="picking_id" />
<field name="prodlot_id" groups="base.group_extended"/>
<field groups="base.group_extended" name="tracking_id"/>
<button name="%(split_into)d" string="Split Stock Moves" type="action"
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
states="draft,assigned,confirmed,done"/>
<button name="setlast_tracking" string="Set Last Tracking" type="object"
attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
icon="terp-stock_effects-object-colorize"
states="draft,assigned,confirmed,done"/>
<field name="location_id"/>
<field name="location_dest_id"/>
<field name="date_planned"/>
@@ -806,11 +828,19 @@
<field name="date_planned"/>
<field name="date_expected" string="Date Expected"/>
<field groups="base.group_extended" name="product_packaging" domain="[('product_id','=',product_id)]"/>
<newline/>
<field name="prodlot_id" groups="base.group_extended"
context="{'location_id':location_id, 'product_id':product_id}"
domain="[('product_id','=?',product_id)]"
on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id)"/>
<field groups="base.group_extended" name="tracking_id"/>
<label/>
<button name="%(track_line)d" string="Split in production lots" type="action" icon="terp-stock_effects-object-colorize"/>
<label/>
<button name="%(split_into)d" string="Split Stock Moves" type="action"
icon="terp-stock_effects-object-colorize"
states="draft,assigned,confirmed,done"/>
<separator colspan="4" string="Move State"/>
<field name="state"/>
<group colspan="2">
@@ -863,6 +893,7 @@
<field name="name"/>
<field name="address_id"/>
<field name="origin"/>
<field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="4" col="10">
@@ -939,12 +970,13 @@
<field name="backorder_id" readonly="1"/>
<field name="origin" readonly="1"/>
<field name="type" invisible="1"/>
<field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<notebook colspan="4">
<page string="General Information">
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_out_id': address_id}">
<tree colors="grey:state in ('cancel')" string="Stock Moves">
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_out_id': address_id}" >
<tree colors="grey:state in ('cancel')" string="Stock Moves" editable="top">
<field name="product_id"/>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
<field name="product_uom" string="UOM"/>
@@ -953,23 +985,21 @@
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" />
<field name="prodlot_id" groups="base.group_extended"/>
<button name="%(track_line)d" string="Split" type="action"
icon="gtk-justify-fill" attrs="{'invisible': [('prodlot_id','&lt;&gt;',False)]}"
<button name="%(track_line)d" string="Split in production lots" type="action"
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('prodlot_id','&lt;&gt;',False)]}"
states="assigned,confirmed,done"
groups="base.group_extended"/>
<field name="tracking_id" groups="base.group_extended"/>
<button name="%(split_into)d" string="Split Stock Moves" type="action"
icon="terp-stock_effects-object-colorize"
states="draft,assigned,confirmed,done"/>
<button name="setlast_tracking" string="Set Last Tracking" type="object"
attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
icon="terp-stock_effects-object-colorize"
states="draft,assigned,confirmed,done"/>
<field name="location_id"/>
<field name="date_planned"/>
<field name="state"/>
<button
name="%(stock.track_line)d"
string="Split in production lots"
type="action" icon="terp-stock_effects-object-colorize"
states="draft,waiting,confirmed,assigned" />
<button
name="%(stock.move_scrap)d"
string="Scrap Products" type="action"
icon="gtk-convert"
states="draft,waiting,confirmed,assigned" />
<button name="%(action_partial_move)d" string="Partial" type="action" states="confirmed,assigned" icon="gtk-justify-fill"/>
<button name="action_done" states="confirmed,assigned" string="Done" type="object" icon="gtk-jump-to"/>
</tree>
@@ -989,6 +1019,7 @@
<field name="date_planned"/>
<field name="date_expected" string="Date Expected"/>
<field groups="base.group_extended" name="product_packaging" domain="[('product_id','=',product_id)]"/>
<newline/>
<field name="prodlot_id" groups="base.group_extended"
context="{'location_id':location_id, 'product_id':product_id}"
domain="[('product_id','=?',product_id)]"
@@ -996,6 +1027,11 @@
<field groups="base.group_extended" name="tracking_id"/>
<label/>
<button name="%(track_line)d" string="Split in production lots" type="action" icon="terp-stock_effects-object-colorize"/>
<label/>
<button name="%(split_into)d" string="Split Stock Moves" type="action"
icon="terp-stock_effects-object-colorize"
states="draft,assigned,confirmed,done"/>
<label/>
<separator colspan="4" string="Move State"/>
<field name="state"/>
<group colspan="2">
@@ -1048,6 +1084,7 @@
<field name="name"/>
<field name="address_id" />
<field name="origin"/>
<field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
<newline/>
@@ -1125,24 +1162,32 @@
<field name="type"/>
<field name="min_date" readonly="1"/>
<field name="invoice_state" string="Invoice Control"/>
<field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<notebook colspan="4">
<page string="General Information">
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_in_id': address_id}">
<tree colors="grey:state in ('cancel')" string="Stock Moves">
<field name="product_id"/>
<field name="product_qty"/>
<field name="product_uom" string="Product Unit of Measure"/>
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_in_id': address_id}" >
<tree colors="grey:state in ('cancel')" string="Stock Moves" editable="top">
<field name="product_id" readonly="1"/>
<field name="product_qty" readonly="1"/>
<field name="product_uom" string="UOM" readonly="1"/>
<field name="location_dest_id"/>
<field name="prodlot_id" groups="base.group_extended"/>
<field name="state"/>
<button
<button
name="%(stock.track_line)d"
string="Split in production lots"
type="action" icon="terp-stock_effects-object-colorize"
states="draft,waiting,confirmed,assigned" />
<button name="%(stock.move_scrap)d"
<field name="tracking_id" groups="base.group_extended"/>
<button name="%(split_into)d" string="Split Stock Moves" type="action"
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
states="draft,assigned,confirmed,done"/>
<button name="setlast_tracking" string="Set Last Tracking" type="object"
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
states="draft,assigned,confirmed,done"/>
<field name="state"/>
<button name="%(stock.move_scrap)d"
string="Scrap Products" type="action"
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" />
@@ -1156,23 +1201,21 @@
<field colspan="4" context="location=location_id" name="product_id" on_change="onchange_product_id(product_id, location_id, location_dest_id, parent.address_id)"/>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
<field name="product_uom"/>
<field groups="product.group_uos" name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
<field groups="product.group_uos" name="product_uos_qty"/>
<field colspan="4" invisible="1" name="name" />
<field groups="base.group_extended" name="date_planned"/>
<field name="date_expected" groups="base.group_extended" string="Date Expected"/>
<field name="date_expected" groups="base.group_extended" string="Date Expected"/>
<field groups="product.group_uos" name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
<newline/>
<newline/>
<field groups="base.group_extended" name="product_packaging" domain="[('product_id','=',product_id)]"/>
<newline/>
<field name="prodlot_id" groups="base.group_extended"
context="{'location_id':location_id, 'product_id':product_id}"
domain="[('product_id','=?',product_id)]"
on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id)"/>
<field name="prodlot_id" groups="base.group_extended" context="{'location_id':location_id, 'product_id':product_id}" domain="[('product_id','=?',product_id)]" on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id)"/>
<field groups="base.group_extended" name="tracking_id"/>
<newline/>
<label/>
<button groups="base.group_extended" name="%(track_line)d" string="Split in production lots" type="action" icon="terp-stock_effects-object-colorize"/>
<button groups="base.group_extended" name="267" string="Split in production lots" type="action" icon="terp-stock_effects-object-colorize"/>
<label/>
<button name="275" string="Split Stock Moves" type="action" icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}" states="draft,assigned,confirmed,done"/>
<separator colspan="4" string="Move State"/>
<field name="state"/>
<group colspan="2">
@@ -1220,6 +1263,7 @@
<field name="name"/>
<field name="address_id"/>
<field name="origin"/>
<field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
<field name="company_id" widget="selection" groups="base.group_multi_company" />
</group>
<newline/>
@@ -1277,6 +1321,7 @@
<separator orientation="vertical"/>
<field name="name"/>
<field name="origin"/>
<field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
<field name="company_id" widget="selection"/>
</group>
<newline/>
@@ -1309,7 +1354,7 @@
<field name="type">tree</field>
<field eval="6" name="priority"/>
<field name="arch" type="xml">
<tree colors="grey:state in ('cancel');red:(state not in ('cancel','done')) and date_planned > current_date" string="Moves">
<tree colors="grey:state in ('cancel');red:(state not in ('cancel','done')) and date_planned > current_date" string="Moves" editable="top">
<field name="picking_id" select="1"/>
<field name="product_id"/>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
@@ -1323,11 +1368,20 @@
icon="gtk-justify-fill" attrs="{'invisible': [('prodlot_id','&lt;&gt;',False)]}"
states="assigned,confirmed"
groups="base.group_extended"/>
<field groups="base.group_extended" name="tracking_id"/>
<button name="%(split_into)d" string="Split Stock Moves" type="action"
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
states="draft,assigned,confirmed,done"/>
<button name="setlast_tracking" string="Set Last Tracking" type="object"
icon="terp-stock_effects-object-colorize"
attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
states="draft,assigned,confirmed,done"/>
<field name="location_id"/>
<field name="location_dest_id"/>
<field name="date_planned"/>
<field name="date_expected"/>
<field name="state"/>
<button name="action_done" states="confirmed,assigned" string="Done" type="object" icon="gtk-jump-to"/>
</tree>
</field>
</record>
@@ -1377,7 +1431,15 @@
context="{'location_id':location_id, 'product_id':product_id}"
domain="[('product_id','=?',product_id)]"
on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id)"/>
<button name="%(track_line)d" string="Split in production lots" type="action" icon="terp-stock_effects-object-colorize" colspan="2" />
<newline/>
<group colspan="4" col="4">
<label/>
<button name="%(track_line)d" string="Split in production lots" type="action" icon="terp-stock_effects-object-colorize" colspan="2" />
<label/>
<button name="%(split_into)d" string="Split Stock Moves" type="action"
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
states="draft,assigned,confirmed,done"/>
</group>
</group>
</page>
</notebook>
@@ -1460,17 +1522,24 @@
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" />
<field name="prodlot_id" groups="base.group_extended"/>
<button name="%(track_line)d" string="Split" type="action"
icon="gtk-justify-fill" attrs="{'invisible': [('prodlot_id','&lt;&gt;',False)]}"
<button name="%(track_line)d" string="Split in production lots" type="action"
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('prodlot_id','&lt;&gt;',False)]}"
states="assigned,confirmed,done"
context="{'default_use_exist': picking_id.type=='in'}"
groups="base.group_extended"/>
<field name="tracking_id" groups="base.group_extended"/>
<button name="%(split_into)d" string="Split Stock Moves" type="action"
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
states="draft,assigned,confirmed,done"/>
<button name="setlast_tracking" string="Set Last Tracking" type="object"
attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
icon="terp-stock_effects-object-colorize"
states="draft,assigned,confirmed,done"/>
<field name="date_planned"/>
<field name="backorder_id" groups="base.group_extended"/>
<field name="state"/>
<button name="%(track_line)d" string="Split in production lots" type="action" icon="terp-stock_effects-object-colorize" states="draft,waiting,confirmed,assigned"/>
<button name="%(action_partial_move)d" string="Partial" type="action" states="assigned" icon="gtk-justify-fill"/>
<button name="action_assign" states="confirmed" string="Set Available" type="object" icon="gtk-yes"/>
<button name="action_done" states="assigned" string="Done" type="object" icon="gtk-jump-to"/>
<button name="action_done" states="confirmed,assigned" string="Done" type="object" icon="gtk-jump-to"/>
</tree>
</field>
</record>
@@ -1500,18 +1569,23 @@
<field name="priority"/>
<field name="address_id" context="{'contact_display':'partner'}"/>
<newline/>
<field name="picking_id"/>
<newline/>
<field name="prodlot_id" groups="base.group_extended"
context="{'location_id':location_id, 'product_id':product_id}"
domain="[('product_id','=?',product_id)]"
on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id)"/>
<field name="tracking_id"/>
<field groups="base.group_extended" name="tracking_id"/>
<newline/>
<field name="picking_id"/>
<group col="2" colspan="2">
<label/>
<button name="%(track_line)d" string="Split in production lots" type="action" icon="terp-stock_effects-object-colorize"/>
</group>
<label/>
<button name="%(split_into)d" string="Split Stock Moves" type="action"
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
states="draft,assigned,confirmed,done"/>
<label/>
<button name="%(track_line)d" string="Split in production lots" type="action" icon="terp-stock_effects-object-colorize"/>
</group>
<separator colspan="4" string="Move State"/>
<field name="state"/>
<group col="5" colspan="2">
@@ -1799,5 +1873,52 @@
<menuitem action="action_reception_picking_move" id="menu_action_pdct_in" parent="menu_stock_products_moves" sequence="1"/>
<menuitem action="action_out_picking_move" id="menu_action_pdct_out" parent="menu_stock_products_moves" sequence="2"/>
<record id="view_stock_journal_filter" model="ir.ui.view">
<field name="name">stock.journal.filter</field>
<field name="model">stock.journal</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Stock Journal">
<field name="name"/>
<field name="user_id"/>
</search>
</field>
</record>
<record model="ir.ui.view" id="view_stock_journal_tree">
<field name="name">Stock Journals</field>
<field name="model">stock.journal</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Stock Journal">
<field name="name"/>
<field name="user_id"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_stock_journal_form">
<field name="name">Stock Journals</field>
<field name="model">stock.journal</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Stock Journal">
<field name="name"/>
<field name="user_id"/>
</form>
</field>
</record>
<record id="action_stock_journal_form" model="ir.actions.act_window">
<field name="name">Stock Journals</field>
<field name="res_model">stock.journal</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
</record>
<menuitem
action="action_stock_journal_form"
id="menu_action_stock_journal_form"
groups="base.group_extended"
parent="menu_stock_configuration" />
</data>
</openerp>
+1
View File
@@ -21,6 +21,7 @@
import stock_traceability
import stock_move
import stock_splitinto
import stock_partial_picking
import stock_partial_move
import stock_replacement
+5 -2
View File
@@ -179,6 +179,8 @@ class split_in_production_lot(osv.osv_memory):
move = self.pool.get('stock.move').browse(cr, uid, context['active_id'], context=context)
if 'product_id' in fields:
res.update({'product_id': move.product_id.id})
if 'product_uom' in fields:
res.update({'product_uom': move.product_uom.id})
if 'qty' in fields:
res.update({'qty': move.product_qty})
return res
@@ -186,6 +188,7 @@ class split_in_production_lot(osv.osv_memory):
_columns = {
'qty': fields.integer('Quantity'),
'product_id': fields.many2one('product.product', 'Product', required=True, select=True),
'product_uom': fields.many2one('product.uom', 'Product UOM'),
'line_ids': fields.one2many('stock.move.split.lines', 'lot_id', 'Lots Number'),
'line_exist_ids': fields.one2many('stock.move.split.lines.exist', 'lot_id', 'Lots Existing Numbers'),
'use_exist' : fields.boolean('Use Exist'),
@@ -244,7 +247,6 @@ class split_in_production_lot(osv.osv_memory):
}
if quantity_rest > 0:
current_move = move_obj.copy(cr, uid, move.id, default_val)
move_obj.action_confirm(cr, uid, [current_move])
new_move.append(current_move)
if quantity_rest == 0:
current_move = move.id
@@ -258,7 +260,7 @@ class split_in_production_lot(osv.osv_memory):
prodlot_id = prodlot_obj.create(cr, uid, {'name': line.name},
# 'prefix' : line.name},
{'product_id': move.product_id.id})
move_obj.write(cr, uid, [current_move], {'prodlot_id': prodlot_id})
move_obj.write(cr, uid, [current_move], {'prodlot_id': prodlot_id, 'state':move.state})
prodlot = prodlot_obj.browse(cr, uid, prodlot_id)
# ref = '%d' % (move.id)
# if prodlot.ref:
@@ -269,6 +271,7 @@ class split_in_production_lot(osv.osv_memory):
if quantity_rest > 0:
update_val['product_qty'] = quantity_rest
update_val['product_uos_qty'] = uos_qty_rest
update_val['state'] = move.state
move_obj.write(cr, uid, [move.id], update_val)
return new_move
split_in_production_lot()
+15 -5
View File
@@ -103,11 +103,21 @@
<field name="model">stock.move.split</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Split in lots">
<field name="product_id" colspan="4" readonly="1"/>
<newline/>
<field name="use_exist"/>
<field name="qty" readonly="1"/>
<form string="Split in lots">
<field name="product_id" colspan="4" readonly="1"/>
<newline/>
<group colspan="4" col="4">
<group colspan="1" col="2">
<field name="use_exist"/>
</group>
<group colspan="1" col="2">
<field name="qty" readonly="1"/>
</group>
<group colspan="1" col="2">
<field name="product_uom" readonly="1"/>
</group>
</group>
<group colspan="4" attrs="{'invisible':[('use_exist','=',True)]}">
<field name="line_ids" colspan="4" nolabel="1">
<tree string="Lots Number" editable="top">
@@ -30,9 +30,6 @@ class stock_partial_picking(osv.osv_memory):
_description = "Partial Picking"
_columns = {
'date': fields.datetime('Date', required=True),
'partner_id': fields.many2one('res.partner',string="Partner", required=True),
'address_id': fields.many2one('res.partner.address', 'Delivery Address', help="Address where goods are to be delivered", required=True),
'type': fields.char("Type", size=3),
}
def view_init(self, cr, uid, fields_list, context=None):
@@ -66,12 +63,6 @@ class stock_partial_picking(osv.osv_memory):
_moves_arch_lst = """<form string="Deliver Products">
<separator colspan="4" string="Delivery Information"/>
<field name="date" colspan="4" />
<group colspan="4" attrs="{'invisible':[('type','=','in')]}">
<field name="partner_id" attrs="{'required':[('type','!=','in')]}" />
<field name="address_id" attrs="{'required':[('type','!=','in')]}"/>
<field name="type" invisible="1"/>
<newline/>
</group>
<separator colspan="4" string="Move Detail"/>
"""
_moves_fields = result['fields']
@@ -160,30 +151,9 @@ class stock_partial_picking(osv.osv_memory):
if 'date' in fields:
res.update({'date': time.strftime('%Y-%m-%d %H:%M:%S')})
for pick in pick_obj.browse(cr, uid, context.get('active_ids', [])):
if 'partner_id' in fields:
res.update({'partner_id': pick.address_id.partner_id and pick.address_id.partner_id.id or False })
if 'address_id' in fields:
res.update({'address_id': pick.address_id.id})
for m in pick.move_lines:
if m.state in ('done', 'cancel'):
continue
res['type'] = m.picking_id and m.picking_id.type or ''
address_ids = list(set([(pick.address_id and pick.address_id.id, pick.address_id and pick.address_id.partner_id and pick.address_id.partner_id.id) for pick in pick_obj.browse(cr, uid, context.get('active_ids', []))]))
address_ids1 = list(set([(pick.address_id and pick.address_id.id, pick.address_id and pick.address_id.partner_id and pick.address_id.partner_id.id) for pick in pick_obj.browse(cr, uid, context.get('active_ids', [])) if pick.address_id]))
if len(address_ids1) == 1:
if m.picking_id and m.picking_id.type=='out':
res['address_id'] = address_ids[0] and address_ids[0][0] or False
res['partner_id'] = address_ids[0][1] or False
if m.picking_id and m.picking_id.type=='in':
res['partner_id'] = m.company_id.partner_id.id or False
partner_company = m.company_id.partner_id and m.company_id.partner_id
if partner_company:
address_default = [add.id for add in m.company_id.partner_id.address if add.type=='default']
address_delivery = [add.id for add in m.company_id.partner_id.address if add.type=='delivery']
if len(address_delivery):
res['address_id'] = address_delivery and address_delivery[0] or False
else:
res['address_id'] = address_default and address_default[0] or False
if 'move%s_product_id'%(m.id) in fields:
res['move%s_product_id'%(m.id)] = m.product_id.id
if 'move%s_product_qty'%(m.id) in fields:
@@ -223,8 +193,6 @@ class stock_partial_picking(osv.osv_memory):
picking_ids = context.get('active_ids', False)
partial = self.browse(cr, uid, ids[0], context)
partial_datas = {
'partner_id' : partial.partner_id and partial.partner_id.id or False,
'address_id' : partial.address_id and partial.address_id.id or False,
'delivery_date' : partial.date
}
for pick in pick_obj.browse(cr, uid, picking_ids):
+84
View File
@@ -0,0 +1,84 @@
# -*- 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
from tools.translate import _
class stock_split_into(osv.osv_memory):
_name = "stock.split.into"
_description = "Split into"
def default_get(self, cr, uid, fields, context=None):
""" Get default values
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
@param fields: List of fields for default value
@param context: A standard dictionary
@return: Default values of fields
"""
res = super(stock_split_into, self).default_get(cr, uid, fields, context=context)
move = self.pool.get('stock.move').browse(cr, uid, context['active_id'], context=context)
if 'quantity' in fields:
res.update({'quantity': move.product_qty})
return res
_columns = {
'quantity': fields.integer('Quantity'),
}
_defaults = {
'quantity': lambda *x: 1,
}
def split(self, cr, uid, data, context=None):
rec_id = context and context.get('active_ids', False)
move_obj = self.pool.get('stock.move')
new_move = []
update_val = {}
value_to_split = self.browse(cr, uid, data[0], context)
quantity = value_to_split.quantity or 0.0
ir_sequence_obj = self.pool.get('ir.sequence')
prodlot_obj = self.pool.get('stock.production.lot')
for move in move_obj.browse(cr, uid, rec_id):
move_qty = move.product_qty
uos_qty_rest = move.product_uos_qty
quantity_rest = move_qty - quantity
if quantity_rest == 0:
continue
sequence = ir_sequence_obj.get(cr, uid, 'stock.lot.serial')
prodlot_id = prodlot_obj.create(cr, uid, {'name': sequence}, {'product_id': move.product_id.id})
uos_qty = quantity / move_qty * move.product_uos_qty
uos_qty_rest = quantity_rest / move_qty * move.product_uos_qty
default_val = {
'product_qty': quantity,
'product_uos_qty': uos_qty,
'state': move.state
}
current_move = move_obj.copy(cr, uid, move.id, default_val)
new_move.append(current_move)
update_val['product_qty'] = quantity_rest
update_val['prodlot_id'] = prodlot_id
update_val['product_uos_qty'] = uos_qty_rest
move_obj.write(cr, uid, [move.id], update_val)
return {}
stock_split_into()
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_stock_move_split_wizard" model="ir.ui.view">
<field name="name">Split move</field>
<field name="model">stock.split.into</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Split Move">
<separator string="Set quantity to split your palets" colspan="4"/>
<field name="quantity"/>
<button icon='gtk-cancel' special="cancel"
string="Cancel" />
<button name="split" string="Ok"
type="object" icon="gtk-ok" />
</form>
</field>
</record>
<record id="split_into" model="ir.actions.act_window">
<field name="name">Split into</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">stock.split.into</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
</data>
</openerp>
+3 -5
View File
@@ -68,8 +68,9 @@ class procurement_order(osv.osv):
origin = (proc.origin or proc.name or '').split(':')[0] +':'+line.name
picking_id = self.pool.get('stock.picking').create(cr, uid, {
'origin': origin,
'company_id': line.company_id and line.company_id.id or False,
'company_id': line.chained_company_id and line.chained_company_id.id or False,
'type': line.picking_type,
'stock_journal_id': line.journal_id and line.journal_id.id or False,
'move_type': 'one',
'address_id': line.partner_address_id.id,
'note': line.name, # TODO: note on procurement ?
@@ -78,7 +79,7 @@ class procurement_order(osv.osv):
move_id = self.pool.get('stock.move').create(cr, uid, {
'name': line.name,
'picking_id': picking_id,
'company_id': line.company_id and line.company_id.id or False,
'company_id': line.chained_company_id and line.chained_company_id.id or False,
'product_id': proc.product_id.id,
'date_planned': proc.date_planned,
'product_qty': proc.product_qty,
@@ -124,8 +125,5 @@ class procurement_order(osv.osv):
{'location_id':proc.location_id.id})
self.write(cr, uid, [proc.id], {'state':'running','message':_('Moved from other location')})
return False
procurement_order()
+8 -3
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@@ -15,7 +15,7 @@
# 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/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@@ -30,6 +30,7 @@ class stock_location_path(osv.osv):
'name': fields.char('Operation', size=64),
'company_id': fields.many2one('res.company', 'Company'),
'product_id' : fields.many2one('product.product', 'Products', ondelete='cascade', select=1),
'journal_id': fields.many2one('stock.journal','Journal'),
'location_from_id' : fields.many2one('stock.location', 'Source Location', ondelete='cascade', select=1),
'location_dest_id' : fields.many2one('stock.location', 'Destination Location', ondelete='cascade', select=1),
'delay': fields.integer('Delay (days)', help="Number of days to do this transition"),
@@ -39,6 +40,7 @@ class stock_location_path(osv.osv):
("none", "Not from Picking")], "Invoice Status",
required=True,),
'picking_type': fields.selection([('out','Sending Goods'),('in','Getting Goods'),('internal','Internal'),('delivery','Delivery')], 'Shipping Type', required=True, select=True, help="Depending on the company, choose whatever you want to receive or send products"),
'chained_company_id': fields.many2one('res.company', 'Chained Company', help='Set here the belonging company of the chained move'),
'auto': fields.selection(
[('auto','Automatic Move'), ('manual','Manual Operation'),('transparent','Automatic No Step Added')],
'Automatic Move',
@@ -53,6 +55,7 @@ class stock_location_path(osv.osv):
'auto': lambda *arg: 'auto',
'delay': lambda *arg: 1,
'invoice_state': lambda *args: 'none',
'picking_type':lambda *args:'out',
}
stock_location_path()
@@ -64,11 +67,13 @@ class product_pulled_flow(osv.osv):
'cancel_cascade': fields.boolean('Cancel Cascade', help="Allow you to cancel moves related to the product pull flow"),
'location_id': fields.many2one('stock.location','Location', required=True, help="Is the destination location that needs supplying"),
'location_src_id': fields.many2one('stock.location','Location Source', help="Location used by Destination Location to supply"),
'journal_id': fields.many2one('stock.journal','Journal'),
'procure_method': fields.selection([('make_to_stock','Make to Stock'),('make_to_order','Make to Order')], 'Procure Method', required=True, help="'Make to Stock': When needed, take from the stock or wait until re-supplying. 'Make to Order': When needed, purchase or produce for the procurement request."),
'type_proc': fields.selection([('produce','Produce'),('buy','Buy'),('move','Move')], 'Type of Procurement', required=True),
'company_id': fields.many2one('res.company', 'Company', help="Is used to know to which company belong packings and moves"),
'partner_address_id': fields.many2one('res.partner.address', 'Partner Address'),
'picking_type': fields.selection([('out','Sending Goods'),('in','Getting Goods'),('internal','Internal'),('delivery','Delivery')], 'Shipping Type', required=True, select=True, help="Depending on the company, choose whatever you want to receive or send products"),
'chained_company_id': fields.many2one('res.company', 'Chained Company', help='Set here the belonging company of the chained move'),
'product_id':fields.many2one('product.product','Product'),
'invoice_state': fields.selection([
("invoiced", "Invoiced"),
@@ -115,7 +120,7 @@ class stock_location(osv.osv):
if product:
for path in product.path_ids:
if path.location_from_id.id == location.id:
return path.location_dest_id, path.auto, path.delay
return path.location_dest_id, path.auto, path.delay, path.journal_id and path.journal_id.id or False, path.chained_company_id and path.chained_companyd_id.id or False, path.picking_type
return super(stock_location, self).chained_location_get(cr, uid, location, partner, product, context)
stock_location()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: