Divyesh Makwana(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-addons_23-mdi into lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons_23-mdi/+merge/135612
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons_23-mdi/+merge/135612
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-addons_23-mdi.
=== modified file 'crm/crm_lead.py'
--- crm/crm_lead.py	2012-11-20 09:05:12 +0000
+++ crm/crm_lead.py	2012-11-22 08:55:43 +0000
@@ -272,6 +272,10 @@
         'color': 0,
     }
 
+    _sql_constraints = [
+        ('check_probability', 'check(probability >= 0 and probability <= 100)', 'Probability should be between 0-100% !')
+    ]
+
     def create(self, cr, uid, vals, context=None):
         obj_id = super(crm_lead, self).create(cr, uid, vals, context)
         section_id = self.browse(cr, uid, obj_id, context=context).section_id
@@ -281,6 +285,17 @@
         self.create_send_note(cr, uid, [obj_id], context=context)
         return obj_id
 
+    def view_phone_calls(self, cr, uid, ids, context=None):
+        mod_obj = self.pool.get('ir.model.data')
+        act_obj = self.pool.get('ir.actions.act_window')
+        partner = self.pool.get('crm.lead').browse(cr, uid, ids[0], context=context).partner_id.id
+
+        result = mod_obj.get_object_reference(cr, uid, 'crm', 'crm_case_categ_phone_incoming0')
+        id = result and result[1] or False
+        result = act_obj.read(cr, uid, [id], context=context)[0]
+        result.update({'context':{'search_default_partner_id': partner}})
+        return result
+
     def onchange_stage_id(self, cr, uid, ids, stage_id, context=None):
         if not stage_id:
             return {'value':{}}

=== modified file 'crm/crm_lead_view.xml'
--- crm/crm_lead_view.xml	2012-11-19 12:56:13 +0000
+++ crm/crm_lead_view.xml	2012-11-22 08:55:43 +0000
@@ -105,14 +105,6 @@
         <!--
             LEADS
         -->
-        <act_window
-                id="act_crm_opportunity_crm_phonecall_new"
-                name="Phone calls"
-                groups="base.group_sale_salesman"
-                res_model="crm.phonecall"
-                view_mode="tree,calendar,form"
-                context="{'default_duration': 1.0 ,'default_opportunity_id': active_id}"
-                view_type="form"/>
 
         <act_window
                 id="act_crm_opportunity_crm_meeting_new"
@@ -141,8 +133,8 @@
                 </header>
                 <sheet>
                     <div class="oe_right oe_button_box" name="buttons">
-                        <button type="action"
-                            name="%(act_crm_opportunity_crm_phonecall_new)d"
+                        <button type="object"
+                            name="view_phone_calls"
                             string="Phone Calls"/>
                     </div>
                     <div class="oe_title">

=== modified file 'delivery/delivery_view.xml'
--- delivery/delivery_view.xml	2012-10-05 07:25:41 +0000
+++ delivery/delivery_view.xml	2012-11-22 08:55:43 +0000
@@ -261,12 +261,24 @@
             <field name="search_view_id" ref="stock.view_picking_out_search"/>
         </record>
 
+        <record id="view_picking_withweight_internal_move_tree" model="ir.ui.view">
+            <field name="name">stock.picking_withweight.internal.move.tree.view</field>
+            <field name="model">stock.move</field>
+            <field name="inherit_id" ref="stock.view_move_picking_tree"/>
+            <field name="arch" type="xml">
+                <xpath expr="//field[@name='product_uom']" position="after">
+                    <field name="weight"/>
+                    <field name="weight_net" groups="base.group_no_one"/>
+                </xpath>
+            </field>
+        </record>
+
         <record id="view_picking_withweight_internal_move_form" model="ir.ui.view">
             <field name="name">stock.picking_withweight.internal.move.form.view</field>
             <field name="model">stock.move</field>
-            <field name="inherit_id" ref="stock.view_move_picking_tree"/>
+            <field name="inherit_id" ref="stock.view_move_picking_form"/>
             <field name="arch" type="xml">
-                <xpath expr="//field[@name='product_uom']" position="after">
+                <xpath expr="//field[@name='date_expected']" position="after">
                     <field name="weight"/>
                     <field name="weight_net" groups="base.group_no_one"/>
                 </xpath>

=== modified file 'mrp/security/ir.model.access.csv'
--- mrp/security/ir.model.access.csv	2012-10-19 07:19:12 +0000
+++ mrp/security/ir.model.access.csv	2012-11-22 08:55:43 +0000
@@ -53,7 +53,7 @@
 access_mrp_production_product_line_manager,mrp.production.product.line manager,model_mrp_production_product_line,mrp.group_mrp_manager,1,0,0,0
 access_account_sequence_fiscalyear_system,account.sequence.fiscalyear.system,account.model_account_sequence_fiscalyear,mrp.group_mrp_manager,1,0,0,0
 access_stock_production_lot_user,stock.production.lot,stock.model_stock_production_lot,mrp.group_mrp_user,1,1,1,1
-access_stock_warehouse_orderpoint_manager,stock.warehouse.orderpoint,procurement.model_stock_warehouse_orderpoint,mrp.group_mrp_manager,1,0,0,0
+access_stock_warehouse_orderpoint_user,stock.warehouse.orderpoint,procurement.model_stock_warehouse_orderpoint,mrp.group_mrp_user,1,0,0,0
 access_stock_picking_mrp_manager,stock.picking mrp_manager,stock.model_stock_picking,mrp.group_mrp_manager,1,0,0,0
 access_report_mrp_inout_user,report.mrp.inout user,model_report_mrp_inout,mrp.group_mrp_user,1,0,0,0
 access_report_workcenter_load_user,report.workcenter.load.user,model_report_workcenter_load,mrp.group_mrp_user,1,0,0,0

=== modified file 'project/project.py'
--- project/project.py	2012-11-19 13:25:09 +0000
+++ project/project.py	2012-11-22 08:55:43 +0000
@@ -532,7 +532,7 @@
         # Prevent double project creation when 'use_tasks' is checked!
         context = dict(context, project_creation_in_progress=True)
         mail_alias = self.pool.get('mail.alias')
-        if not vals.get('alias_id'):
+        if not vals.get('alias_id') and vals.get('name', False):
             vals.pop('alias_name', None) # prevent errors during copy()
             alias_id = mail_alias.create_unique_alias(cr, uid,
                           # Using '+' allows using subaddressing for those who don't

=== modified file 'stock/stock.py'
--- stock/stock.py	2012-11-22 06:12:44 +0000
+++ stock/stock.py	2012-11-22 08:55:43 +0000
@@ -1845,7 +1845,7 @@
                 if move.state == 'done':
                     if frozen_fields.intersection(vals):
                         raise osv.except_osv(_('Operation forbidden !'),
-                                             _('Quantities, Unit of Measures, Products and Locations cannot be modified on stock moves that have already been processed (except by the Administrator).'))
+                                             _('Quantities, Units of Measure, Products and Locations cannot be modified on stock moves that have already been processed (except by the Administrator).'))
         return  super(stock_move, self).write(cr, uid, ids, vals, context=context)
 
     def copy(self, cr, uid, id, default=None, context=None):
@@ -2548,6 +2548,7 @@
         for move in self.browse(cr, uid, ids, context=context):
             move_qty = move.product_qty
             uos_qty = quantity / move_qty * move.product_uos_qty
+            move_qty = move_qty - quantity
             default_val = {
                 'product_qty': quantity,
                 'product_uos_qty': uos_qty,
@@ -2558,6 +2559,7 @@
                 'prodlot_id': move.prodlot_id.id,
             }
             new_move = self.copy(cr, uid, move.id, default_val)
+            self.write(cr, uid, [move.id], {'product_qty': move_qty}, context=context)
 
             res += [new_move]
             product_obj = self.pool.get('product.product')

=== modified file 'stock/stock_view.xml'
--- stock/stock_view.xml	2012-11-22 06:12:44 +0000
+++ stock/stock_view.xml	2012-11-22 08:55:43 +0000
@@ -1151,7 +1151,7 @@
                     <field name="date" groups="base.group_no_one"/>
                     <field name="date_expected"/>
                     <field name="state"/>
-                    <button name="action_done" states="confirmed,assigned" string="Process" type="object" icon="gtk-go-forward"/>
+                    <button name="action_done" states="confirmed,assigned" string="Process" type="object" icon="gtk-go-forward" help="Done"/>
                 </tree>
             </field>
         </record>
@@ -1457,7 +1457,7 @@
                         states="assigned" class="oe_highlight"/>
                     <button name="action_done" states="draft,assigned,confirmed"
                         icon="gtk-go-forward" type="object"
-                        class="oe_highlight"/>
+                        class="oe_highlight" help="Done"/>
                 </tree>
             </field>
         </record>

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : openerp-dev-gtk@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to