[MERRE] merge from trunk addons

bzr revid: mra@mra-laptop-20101012113101-n22she4thm6rxnyb
This commit is contained in:
Mustufa Rangwala
2010-10-12 17:01:01 +05:30
5 changed files with 17 additions and 44 deletions
+1 -30
View File
@@ -175,22 +175,6 @@
</field>
</record>
<record id="view_picking_withcarrier_delivery_form" model="ir.ui.view">
<field name="name">delivery.stock.picking_withcarrier.delivery.form.view</field>
<field name="type">form</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_delivery_form"/>
<field name="arch" type="xml">
<field name="address_id" position="after">
<field name="carrier_id"/>
<field name="carrier_tracking_ref" groups="base.group_extended"/>
<field name="number_of_packages" groups="base.group_extended"/>
<field name="weight"/>
<field name="weight_net"/>
</field>
</field>
</record>
<record id="action_picking_tree4" model="ir.actions.act_window">
<field name="name">Picking to be invoiced</field>
<field name="res_model">stock.picking</field>
@@ -242,19 +226,6 @@
</field>
</record>
<record id="view_picking_withcarrier_delivery_move_form" model="ir.ui.view">
<field name="name">delivery.stock.picking_withcarrier.delivery.move.form.view</field>
<field name="type">form</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_delivery_form"/>
<field name="arch" type="xml">
<xpath expr="/form/notebook/page/field[@name='move_lines']/tree/field[@name='product_uom']" position="after">
<field name="weight"/>
<field name="weight_net"/>
</xpath>
</field>
</record>
<record id="view_move_withweight_form" model="ir.ui.view">
<field name="name">stock.move.form.weight</field>
<field name="type">form</field>
@@ -287,7 +258,7 @@
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="/form/notebook/page[@string='Sales Order']/group[1]/button[@name='button_dummy']" position="after">
<button name="%(action_delivery_cost)d" states="draft" string="Delivery Costs" type="action" icon="gtk-add" context="{'order_id':id}"/>
<button name="%(action_delivery_cost)d" states="draft" string="Delivery Costs" type="action" icon="gtk-add" context="{'order_id':active_id}"/>
</xpath>
</field>
</record>
-1
View File
@@ -12,7 +12,6 @@
invoice_state: none
move_lines:
- company_id: base.main_company
date_planned: '2010-05-11 15:18:57'
location_dest_id: stock.stock_location_customers
location_id: stock.stock_location_stock
name: HP CD writers
+2
View File
@@ -23,8 +23,10 @@ import time
from mx import DateTime
from osv import osv
from tools.translate import _
import netsvc
import pooler
from tools.translate import _
class procurement_order(osv.osv):
_inherit = 'procurement.order'
+3 -2
View File
@@ -31,8 +31,9 @@
"access_account_sequence_fiscalyear_purchase_user","account.sequence.fiscalyear purchase","account.model_account_sequence_fiscalyear","group_purchase_user",1,1,1,1
"access_res_partner_purchase_user","res.partner purchase","base.model_res_partner","group_purchase_user",1,0,0,0
"access_res_partner_address_purchase_user","res.partner.address purchase","base.model_res_partner_address","group_purchase_user",1,0,0,0
"access_account_journal","account.journal","account.model_account_journal","group_purchase_user",1,1,1,0
"access_account_journal_manager","account.journal","account.model_account_journal","group_purchase_manager",1,1,1,1
"access_account_journal_period","account.journal.period","account.model_account_journal_period","group_purchase_user",1,1,1,0
"access_account_journal","account.journal","account.model_account_journal","group_purchase_user",1,0,0,0
"access_account_journal_manager","account.journal","account.model_account_journal","group_purchase_manager",1,0,0,0
"access_account_period","account.period","account.model_account_period","group_purchase_user",1,0,0,0
"access_account_fiscalyear","account.fiscalyear","account.model_account_fiscalyear","group_purchase_user",1,0,0,0
"access_account_move","account.move","account.model_account_move","group_purchase_user",1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
31 access_account_sequence_fiscalyear_purchase_user account.sequence.fiscalyear purchase account.model_account_sequence_fiscalyear group_purchase_user 1 1 1 1
32 access_res_partner_purchase_user res.partner purchase base.model_res_partner group_purchase_user 1 0 0 0
33 access_res_partner_address_purchase_user res.partner.address purchase base.model_res_partner_address group_purchase_user 1 0 0 0
34 access_account_journal access_account_journal_period account.journal account.journal.period account.model_account_journal account.model_account_journal_period group_purchase_user 1 1 1 0
35 access_account_journal_manager access_account_journal account.journal account.model_account_journal group_purchase_manager group_purchase_user 1 1 0 1 0 1 0
36 access_account_journal_manager account.journal account.model_account_journal group_purchase_manager 1 0 0 0
37 access_account_period account.period account.model_account_period group_purchase_user 1 0 0 0
38 access_account_fiscalyear account.fiscalyear account.model_account_fiscalyear group_purchase_user 1 0 0 0
39 access_account_move account.move account.model_account_move group_purchase_user 1 1 1 1
+11 -11
View File
@@ -41,14 +41,14 @@ class stock_split_into(osv.osv_memory):
quantity = self.browse(cr, uid, data[0], context).quantity or 0.0
for move in move_obj.browse(cr, uid, rec_id):
quantity_rest = move.product_qty - quantity
if move.tracking_id :
raise osv.except_osv(_('Error!'), _('The current move line is already assigned to a pack, please remove it first if you really want to change it ' \
'for this product: "%s" (id: %d)') % \
(move.product_id.name, move.product_id.id,))
#if move.tracking_id :
# raise osv.except_osv(_('Error!'), _('The current move line is already assigned to a pack, please remove it first if you really want to change it ' \
# 'for this product: "%s" (id: %d)') % \
# (move.product_id.name, move.product_id.id,))
if quantity > move.product_qty:
raise osv.except_osv(_('Error!'), _('Total quantity after split exceeds the quantity to split ' \
'for this product: "%s" (id: %d)') % \
(move.product_id.name, move.product_id.id,))
(move.product_id.name, move.product_id.id,))
if quantity > 0:
move_obj.setlast_tracking(cr, uid, [move.id], context=context)
move_obj.write(cr, uid, [move.id], {
@@ -63,12 +63,12 @@ class stock_split_into(osv.osv_memory):
move_obj.write(cr, uid, [move.id], {'tracking_id': tracking_id})
else:
default_val = {
'product_qty': quantity_rest,
'product_uos_qty': quantity_rest,
'tracking_id': tracking_id,
'state': move.state,
'product_uos': move.product_uom.id
}
'product_qty': quantity_rest,
'product_uos_qty': quantity_rest,
'tracking_id': tracking_id,
'state': move.state,
'product_uos': move.product_uom.id
}
move_obj.copy(cr, uid, move.id, default_val)
return {}
stock_split_into()