Browse Source

Merge pull request #27 from Trivedi-Vacha/11.0

[IMP]mass_editing:Improved index file.
Serpent Consulting Services Pvt. Ltd 7 năm trước cách đây
mục cha
commit
af2442c7cc

+ 16 - 13
.travis.yml

@@ -1,38 +1,41 @@
-language: python
 sudo: false
 cache: pip
 
-python:
-  - "2.7"
-
 addons:
   postgresql: "9.2" # minimal postgresql version for the daterange method
   apt:
-    packages:
+   packages:
       - expect-dev  # provides unbuffer utility
       - python-lxml # because pip installation is slow
 
+
+language: python
+
+python:
+  - "3.5"
+
 env:
   global:
-  - VERSION="10.0" TESTS="0" LINT_CHECK="0" TRANSIFEX="0"
+  - VERSION="11.0" TESTS="0" LINT_CHECK="0" TRANSIFEX="0"
   - TRANSIFEX_USER='transbot@odoo-community.org'
-  - secure: Z06mZCN+Hm3myqHSOZpOOk1pd4oq1epAWZv6m9OX2bTNHbhyOVOGK6JWWsnDm/3DUCN1ZeLtSGOl9bvQfMa8ahQHA80MkLL16YlTvQV59Lh+L2gAYmxX+ogJCJgeQSVAXlGLscgkADCu/HzDlmatrDeROMtULn5i23j2qcyUNyM=
-
+  
   matrix:
   - LINT_CHECK="1"
   - TRANSIFEX="1"
-  - TESTS="1" ODOO_REPO="odoo/odoo"
   - TESTS="1" ODOO_REPO="OCA/OCB"
+  - TESTS="1" ODOO_REPO="odoo/odoo"
+
 
-virtualenv:
-  system_site_packages: true
+before_install:
+  - "export DISPLAY=:911.0"
+  - "sh -e /etc/init.d/xvfb start"
 
 install:
   - git clone https://github.com/OCA/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools
   - export PATH=${HOME}/maintainer-quality-tools/travis:${PATH}
+  - export WKHTMLTOPDF_VERSION=0.12.4
   - travis_install_nightly
-  - printf '[options]\n\nrunning_env = dev\n' > ${HOME}/.openerp_serverrc
-  - ln -s ${TRAVIS_BUILD_DIR}/server_environment_files_sample ${TRAVIS_BUILD_DIR}/server_environment_files
+
 script:
   - travis_run_tests
 

+ 4 - 2
mass_editing/models/mass_object.py

@@ -39,8 +39,10 @@ class MassObject(models.Model):
             model_list = [self.model_id.id]
             active_model_obj = self.env[self.model_id.model]
             if active_model_obj._inherits:
-                keys = active_model_obj._inherits.keys()
-                inherits_model_list = model_obj.search([('model', 'in', keys)])
+                model_names = active_model_obj._inherits.keys()
+                inherits_model_list = model_obj.search([('model',
+                                                         'in',
+                                                         list(model_names))])
                 model_list.extend((inherits_model_list and
                                    inherits_model_list.ids or []))
         self.model_list = model_list

BIN
mass_editing/static/description/after_edit_note.png


BIN
mass_editing/static/description/after_mass_edit.png


+ 8 - 7
mass_editing/static/description/index.html

@@ -28,7 +28,7 @@
     
      <div class="row mt32" style="font-size:15px">
         <div class="col-md-8 mt16">
-            <img class="img img-responsive" src="mass_editing_menu.png">
+            <img class="img img-responsive" 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,26 +39,27 @@
     
     <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_wizard.png">
+            <img class="img img-responsive" 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.</p>
+              <p>The user can set or remove the value of the fields which were configured in mass editing configuration.
+              you can also copy the value of the fields from another field.</p>
         </div>
     </div>
     
-    <div class="row mt32" style='font-size:15px'>
+     <div class="row mt32" style='font-size:15px'>
         <div class="col-md-4 text-justify mt32">
             <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="after_mass_edit.png">
+            <img class="img img-responsive" src="mass_edit_tree.png">
         </div>
-    </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="after_edit_note.png">
+            <img class="img img-responsive" 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>

BIN
mass_editing/static/description/mass_edit_copy.png


BIN
mass_editing/static/description/mass_edit_menu.png


BIN
mass_editing/static/description/mass_edit_result.png


BIN
mass_editing/static/description/mass_edit_tree.png


BIN
mass_editing/static/description/mass_edit_wizard.png


BIN
mass_editing/static/description/mass_editing_menu.png


+ 5 - 9
mass_editing/tests/test_mass_editing.py

@@ -6,7 +6,7 @@ import ast
 
 from odoo.tests import common
 from odoo.modules import registry
-from odoo.addons.mass_editing.hooks import uninstall_hook
+from ..hooks import uninstall_hook
 
 
 class TestMassEditing(common.TransactionCase):
@@ -152,11 +152,9 @@ class TestMassEditing(common.TransactionCase):
     def test_unlink_mass(self):
         """Test if related actions are removed when mass editing
         record is unlinked."""
-        mass_action_id = "ir.actions.act_window," + str(self.mass.id)
         self.mass.unlink()
-        value_cnt = self.env['ir.values'].search([('value', '=',
-                                                   mass_action_id)],
-                                                 count=True)
+        value_cnt = self.env['ir.actions.act_window'].search([
+            ('res_model', '=', 'mass.editing.wizard')], count=True)
         self.assertTrue(value_cnt == 0,
                         "Sidebar action must be removed when mass"
                         " editing is unlinked.")
@@ -165,10 +163,8 @@ class TestMassEditing(common.TransactionCase):
         """Test if related actions are removed when mass editing
         record is uninstalled."""
         uninstall_hook(self.cr, registry)
-        mass_action_id = "ir.actions.act_window," + str(self.mass.id)
-        value_cnt = self.env['ir.values'].search([('value', '=',
-                                                   mass_action_id)],
-                                                 count=True)
+        value_cnt = self.env['ir.actions.act_window'].search([
+            ('res_model', '=', 'mass.editing.wizard')], count=True)
         self.assertTrue(value_cnt == 0,
                         "Sidebar action must be removed when mass"
                         " editing module is uninstalled.")

+ 1 - 1
mass_editing/views/template.xml

@@ -6,4 +6,4 @@
             </xpath>
         </template>
     </data>
-</odoo>
+</odoo>