Ver código fonte

[MIG]mass_editing:migration mass editing module fromv11 to v12

Vimal Patel 6 anos atrás
pai
commit
6d160508e1

+ 3 - 0
mass_editing/ChangeLog.txt

@@ -1,6 +1,9 @@
 ===============================================================================
  Version Change Log (mass_editing)
 ===============================================================================
+1.7 * December 12,2018 : Serpent Consulting Services
+    * Migrated in version 12.0
+    
 1.6 * June 01,2016 : Serpent Consulting Services
     * Added Unit Test Cases
 

+ 2 - 4
mass_editing/__manifest__.py

@@ -2,7 +2,7 @@
 # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
 {
     'name': 'Mass Editing',
-    'version': '11.0.1.0.0',
+    'version': '12.0.1.0.0',
     'author': 'Serpent Consulting Services Pvt. Ltd., '
               'Odoo Community Association (OCA)',
     'contributors': [
@@ -15,9 +15,7 @@
     'license': 'GPL-3 or any later version',
     'summary': 'Mass Editing',
     'uninstall_hook': 'uninstall_hook',
-    'depends': [
-        'base',
-    ],
+    'depends': [],
     'data': [
         'security/ir.model.access.csv',
         'views/mass_editing_view.xml',

+ 1 - 1
mass_editing/models/mass_object.py

@@ -35,7 +35,7 @@ class MassObject(models.Model):
         model_list = []
         if self.model_id:
             model_obj = self.env['ir.model']
-            model_list = [self.model_id.id]
+            model_list = self.model_id.ids
             active_model_obj = self.env[self.model_id.model]
             if active_model_obj._inherits:
                 model_names = active_model_obj._inherits.keys()

+ 6 - 6
mass_editing/static/description/index.html

@@ -5,7 +5,7 @@
     <h4 class="oe_slogan" style="color:#875A7B;">Mass editing configuration</h4>
     <div class="row mt32" style="font-size:15px">
         <div class="col-md-8 mt16">
-            <img class="img img-responsive" src="mass_editing_configuration.png">
+            <img class="img img-responsive" style="width: 100%;" src="mass_editing_configuration.png">
         </div>
         <div class="col-md-4 text-justify mt32">
             <p>We can configure mass editing from Menu: Settings -> Mass Editing.</p>
@@ -21,14 +21,14 @@
               <p>The user can remove the action by clicking on the "Remove Sidebar Button".</p>
         </div>
         <div class="col-md-8 mt16">
-            <img class="img img-responsive" src="remove_button2.png">
+            <img class="img img-responsive" style="width: 100%;" src="remove_button2.png">
         </div>
     </div>
     
     
      <div class="row mt32" style="font-size:15px">
         <div class="col-md-8 mt16">
-            <img class="img img-responsive" src="mass_edit_menu.png">
+            <img class="img img-responsive" style="width: 100%;" src="mass_edit_menu.png">
         </div>
         <div class="col-md-4 text-justify mt32">
             <p>Go to the model/object in which mass editing is configured (ex. Partner).</p>
@@ -39,7 +39,7 @@
     
     <div class="row mt32" style="overflow: hidden;background: #efefef;box-shadow: none;font-size:15px">
          <div class="col-md-8 mt16">
-            <img class="img img-responsive" src="mass_edit_copy.png">
+            <img class="img img-responsive" style="width: 100%;" src="mass_edit_copy.png">
         </div>
         <div class="col-md-4 text-justify mt32">
               <p>The user can set or remove the value of the fields which were configured in mass editing configuration.
@@ -52,14 +52,14 @@
             <p>You can see the mass editing changes in customer tree view..</p>
         </div>
          <div class="col-md-8 mt16">
-            <img class="img img-responsive" src="mass_edit_tree.png">
+            <img class="img img-responsive" style="width: 100%;" src="mass_edit_tree.png">
         </div>
     </div> 
     
     
      <div class="row mt32" style="overflow: hidden;background: #efefef;box-shadow: none;font-size:15px">
          <div class="col-md-8 mt16">
-            <img class="img img-responsive" src="mass_edit_result.png">
+            <img class="img img-responsive" style="width: 100%;" src="mass_edit_result.png">
         </div>
         <div class="col-md-4 text-justify mt32">
               <p>You can see the mass editing changes in selected customer</p>

+ 5 - 19
mass_editing/views/mass_editing_view.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <odoo>
 
-    <record model="ir.ui.view" id="view_mass_object_form">
+    <record id="view_mass_object_form" model="ir.ui.view">
         <field name="name">mass.object.form</field>
         <field name="model">mass.object</field>
         <field name="arch" type="xml">
@@ -42,7 +42,7 @@
                     <notebook colspan="4">
                         <page string="Fields">
                             <field name="field_ids" context="{'mass_edit':True}" colspan="4" nolabel="1"
-                            domain="[('ttype', 'not in', ['reference', 'function', 'monetary']), ('model_id', 'in', model_list)]"/>
+                            domain="[('ttype', 'not in', ['reference', 'function', 'monetary', 'one2many']), ('model_id', 'in', model_list)]"/>
                         </page>
                         <page string="Advanced" attrs="{'invisible':[('ref_ir_act_window_id','=',False)]}">
                             <group colspan="2" col="2">
@@ -55,7 +55,7 @@
         </field>
     </record>
 
-    <record model="ir.ui.view" id="view_mass_object_tree">
+    <record id="view_mass_object_tree" model="ir.ui.view">
         <field name="name">mass.object.tree</field>
         <field name="model">mass.object</field>
         <field name="arch" type="xml">
@@ -66,31 +66,17 @@
         </field>
     </record>
 
-    <record model="ir.actions.act_window" id="action_mass_object_form">
+    <record id="action_mass_object" model="ir.actions.act_window">
         <field name="name">Mass Editing</field>
         <field name="res_model">mass.object</field>
         <field name="view_type">form</field>
         <field name="view_mode">tree,form</field>
-        <field name="view_id" ref="view_mass_object_tree"/>
-    </record>
-
-    <record id="action_mass_object_form_view1" model="ir.actions.act_window.view">
-        <field eval="10" name="sequence"/>
-        <field name="view_mode">tree</field>
-        <field name="view_id" ref="view_mass_object_tree"/>
-        <field name="act_window_id" ref="action_mass_object_form"/>
-    </record>
-    <record id="action_mass_object_form_view2" model="ir.actions.act_window.view">
-        <field eval="20" name="sequence"/>
-        <field name="view_mode">form</field>
-        <field name="view_id" ref="view_mass_object_form"/>
-        <field name="act_window_id" ref="action_mass_object_form"/>
     </record>
 
     <menuitem id="menu_mass_editing" name="Mass Editing"
         parent="base.menu_administration" sequence="6"/>
 
-    <menuitem id="menu_mass_object_view" action="action_mass_object_form"
+    <menuitem id="menu_mass_object_view" action="action_mass_object"
         parent="menu_mass_editing"/>
 
 </odoo>