{ "info": { "author": "Therp BV, Tecnativa,Odoo Community Association (OCA)", "author_email": "support@odoo-community.org", "bugtrack_url": null, "classifiers": [ "Framework :: Odoo", "License :: OSI Approved :: GNU Affero General Public License v3", "Programming Language :: Python :: 2.7" ], "description": ".. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg\n :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html\n :alt: License: AGPL-3\n\n===========================\n2D matrix for x2many fields\n===========================\n\nThis module allows to show an x2many field with 3-tuples\n($x_value, $y_value, $value) in a table\n\n========= =========== ===========\n\\ $x_value1 $x_value2\n========= =========== ===========\n$y_value1 $value(1/1) $value(2/1)\n$y_value2 $value(1/2) $value(2/2)\n========= =========== ===========\n\nwhere `value(n/n)` is editable.\n\nAn example use case would be: Select some projects and some employees so that\na manager can easily fill in the planned_hours for one task per employee. The\nresult could look like this:\n\n.. image:: /web_widget_x2many_2d_matrix/static/description/screenshot.png\n :alt: Screenshot\n\nThe beauty of this is that you have an arbitrary amount of columns with this\nwidget, trying to get this in standard x2many lists involves some quite ugly\nhacks.\n\nUsage\n=====\n\nUse this widget by saying::\n\n\n\nThis assumes that my_field refers to a model with the fields `x`, `y` and\n`value`. If your fields are named differently, pass the correct names as\nattributes::\n\n \n \n \n \n \n \n \n \n\nYou can pass the following parameters:\n\nfield_x_axis\n The field that indicates the x value of a point\nfield_y_axis\n The field that indicates the y value of a point\nfield_label_x_axis\n Use another field to display in the table header\nfield_label_y_axis\n Use another field to display in the table header\nx_axis_clickable\n It indicates if the X axis allows to be clicked for navigating to the field\n (if it's a many2one field). True by default\ny_axis_clickable\n It indicates if the Y axis allows to be clicked for navigating to the field\n (if it's a many2one field). True by default\nfield_value\n Show this field as value\nshow_row_totals\n If field_value is a numeric field, it indicates if you want to calculate\n row totals. True by default\nshow_column_totals\n If field_value is a numeric field, it indicates if you want to calculate\n column totals. True by default\nfield_att_\n Declare as many options prefixed with this string as you need for binding\n a field value with an HTML node attribute (disabled, class, style...)\n called as the `` passed in the option.\n\n.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas\n :alt: Try me on Runbot\n :target: https://runbot.odoo-community.org/runbot/162/8.0\n\nExample\n=======\n\nYou need a data structure already filled with values. Let's assume we want to\nuse this widget in a wizard that lets the user fill in planned hours for one\ntask per project per user. In this case, we can use ``project.task`` as our\ndata model and point to it from our wizard. The crucial part is that we fill\nthe field in the default function::\n\n from odoo import fields, models\n\n class MyWizard(models.TransientModel):\n _name = 'my.wizard'\n\n def _default_task_ids(self):\n # your list of project should come from the context, some selection\n # in a previous wizard or wherever else\n projects = self.env['project.project'].browse([1, 2, 3])\n # same with users\n users = self.env['res.users'].browse([1, 2, 3])\n return [\n (0, 0, {\n 'project_id': p.id, \n 'user_id': u.id, \n 'planned_hours': 0,\n 'message_needaction': False,\n 'date_deadline': fields.Date.today(),\n })\n # if the project doesn't have a task for the user, create a new one\n if not p.task_ids.filtered(lambda x: x.user_id == u) else\n # otherwise, return the task\n (4, p.task_ids.filtered(lambda x: x.user_id == u)[0].id)\n for p in projects\n for u in users\n ]\n\n task_ids = fields.Many2many('project.task', default=_default_task_ids)\n\nNow in our wizard, we can use::\n\n \n \n \n \n \n \n \n \n\nNote that all values in the matrix must exist, so you need to create them\npreviously if not present, but you can control visually the editability of\nthe fields in the matrix through `field_att_disabled` option with a control\nfield.\n\nKnown issues / Roadmap\n======================\n\n* It would be worth trying to instantiate the proper field widget and let it render the input\n* Let the widget deal with the missing values of the full Cartesian product,\n instead of being forced to pre-fill all the possible values.\n* If you pass values with an onchange, you need to overwrite the model's method\n `onchange` for making the widget work::\n\n @api.multi\n def onchange(self, values, field_name, field_onchange):\n if \"one2many_field\" in field_onchange:\n for sub in []:\n field_onchange.setdefault(\"one2many_field.\" + sub, u\"\")\n return super(model, self).onchange(values, field_name, field_onchange)\n\nBug Tracker\n===========\n\nBugs are tracked on `GitHub Issues\n`_. In case of trouble, please\ncheck there if your issue has already been reported. If you spotted it first,\nhelp us smashing it by providing a detailed and welcomed feedback.\n\nCredits\n=======\n\nContributors\n------------\n\n* Holger Brunn \n* Pedro M. Baeza \n\nMaintainer\n----------\n\n.. image:: https://odoo-community.org/logo.png\n :alt: Odoo Community Association\n :target: https://odoo-community.org\n\nThis module is maintained by the OCA.\n\nOCA, or the Odoo Community Association, is a nonprofit organization whose\nmission is to support the collaborative development of Odoo features and\npromote its widespread use.\n\nTo contribute to this module, please visit https://odoo-community.org.\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "AGPL-3", "maintainer": "", "maintainer_email": "", "name": "odoo10-addon-web-widget-x2many-2d-matrix", "package_url": "https://pypi.org/project/odoo10-addon-web-widget-x2many-2d-matrix/", "platform": "", "project_url": "https://pypi.org/project/odoo10-addon-web-widget-x2many-2d-matrix/", "project_urls": null, "release_url": "https://pypi.org/project/odoo10-addon-web-widget-x2many-2d-matrix/10.0.1.0.1/", "requires_dist": [ "odoo (<10.1dev,>=10.0)" ], "requires_python": "", "summary": "Show list fields as a matrix", "version": "10.0.1.0.1" }, "last_serial": 4006017, "releases": { "10.0.1.0.0": [ { "comment_text": "", "digests": { "md5": "556ff6aa3782e0a9374892433aae2825", "sha256": "4d12bcc18d0fb1964334d76ef3c9fc24058192803475ae700d9c1f582385091a" }, "downloads": -1, "filename": "odoo10_addon_web_widget_x2many_2d_matrix-10.0.1.0.0-py2-none-any.whl", "has_sig": false, "md5_digest": "556ff6aa3782e0a9374892433aae2825", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 46766, "upload_time": "2017-04-27T04:30:30", "url": "https://files.pythonhosted.org/packages/4b/0d/bfe1fd498094a21c7322bf3a77f7231a4a8d0f6220cd971adaa902b2f1c4/odoo10_addon_web_widget_x2many_2d_matrix-10.0.1.0.0-py2-none-any.whl" } ], "10.0.1.0.0.99.dev1": [ { "comment_text": "", "digests": { "md5": "b5804173072936dc366da2dad3f6d471", "sha256": "3c2c0fd52acd1aa74b75c99ae8d5483ea1960b93c985bdd58a6e04f2a383facf" }, "downloads": -1, "filename": "odoo10_addon_web_widget_x2many_2d_matrix-10.0.1.0.0.99.dev1-py2-none-any.whl", "has_sig": false, "md5_digest": "b5804173072936dc366da2dad3f6d471", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 47116, "upload_time": "2017-04-29T04:30:22", "url": "https://files.pythonhosted.org/packages/d3/14/da85ea8fae6b47d703e6f0c8002ce0af79c5857288b60b5b8671888038f8/odoo10_addon_web_widget_x2many_2d_matrix-10.0.1.0.0.99.dev1-py2-none-any.whl" } ], "10.0.1.0.0.99.dev2": [ { "comment_text": "", "digests": { "md5": "d9c68c98b436c6f2f741eec089044973", "sha256": "028702fc74dfbba5c5c537ec10987b0ff6e48e221a6b3a3b9743a03b954ddb7e" }, "downloads": -1, "filename": "odoo10_addon_web_widget_x2many_2d_matrix-10.0.1.0.0.99.dev2-py2-none-any.whl", "has_sig": false, "md5_digest": "d9c68c98b436c6f2f741eec089044973", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 47303, "upload_time": "2017-06-23T04:30:29", "url": "https://files.pythonhosted.org/packages/7e/de/0907253a829886a282d384ca4ecb5aad52a7950c93b168d0263d090d815f/odoo10_addon_web_widget_x2many_2d_matrix-10.0.1.0.0.99.dev2-py2-none-any.whl" } ], "10.0.1.0.1": [ { "comment_text": "", "digests": { "md5": "54fa79c30ce253658fedd24a588205c4", "sha256": "974a2a2026d8b925ba392831369b7b7731a61677576528f004faad5dcf3b8667" }, "downloads": -1, "filename": "odoo10_addon_web_widget_x2many_2d_matrix-10.0.1.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "54fa79c30ce253658fedd24a588205c4", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 47225, "upload_time": "2017-08-31T04:30:13", "url": "https://files.pythonhosted.org/packages/2c/58/698a3459262b3d1711ff982704724b960254263be33bcd8257a2b2627110/odoo10_addon_web_widget_x2many_2d_matrix-10.0.1.0.1-py2-none-any.whl" } ], "10.0.1.0.1.99.dev1": [ { "comment_text": "", "digests": { "md5": "e4a3e642d99f78c100e22aff5f3a13aa", "sha256": "9824a0fb566837765f4a59e0ab2f42d89fd2f8c7b6cd2dbe7d9644549a1f0a86" }, "downloads": -1, "filename": "odoo10_addon_web_widget_x2many_2d_matrix-10.0.1.0.1.99.dev1-py2-none-any.whl", "has_sig": false, "md5_digest": "e4a3e642d99f78c100e22aff5f3a13aa", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": "~=2.7", "size": 48091, "upload_time": "2018-01-18T05:31:30", "url": "https://files.pythonhosted.org/packages/38/06/6dfc1cbc3cf8621e88f79f2e70df1cb50dc80f7a7f114e5d66f713949091/odoo10_addon_web_widget_x2many_2d_matrix-10.0.1.0.1.99.dev1-py2-none-any.whl" } ], "10.0.1.0.1.99.dev2": [ { "comment_text": "", "digests": { "md5": "43a6e2594693c549d2459e78a7b1cd12", "sha256": "26bf3b193d37c00ab84337ddf2f1ba020ff9f68a8a40d49b1df3f1f4a2afc616" }, "downloads": -1, "filename": "odoo10_addon_web_widget_x2many_2d_matrix-10.0.1.0.1.99.dev2-py2-none-any.whl", "has_sig": false, "md5_digest": "43a6e2594693c549d2459e78a7b1cd12", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": "~=2.7", "size": 48819, "upload_time": "2018-01-28T05:34:25", "url": "https://files.pythonhosted.org/packages/1c/2b/e35e8bec3788e5d6520042268e0c8f1f56aeaa50ba7b603248eba5a27178/odoo10_addon_web_widget_x2many_2d_matrix-10.0.1.0.1.99.dev2-py2-none-any.whl" } ], "10.0.1.0.1.99.dev3": [ { "comment_text": "", "digests": { "md5": "02e5e5b4f23ef03910fe6a210de14a33", "sha256": "3e0352a2dec1ab6460e4ecbd1538d5c6546f9932928c735f7d886213ab66a575" }, "downloads": -1, "filename": "odoo10_addon_web_widget_x2many_2d_matrix-10.0.1.0.1.99.dev3-py2-none-any.whl", "has_sig": false, "md5_digest": "02e5e5b4f23ef03910fe6a210de14a33", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": "~=2.7", "size": 49425, "upload_time": "2018-06-24T05:13:33", "url": "https://files.pythonhosted.org/packages/df/b8/93508ecac5d909e1c7e4bbe311ced362adfcd8f42430c1dfbc59dc8ce340/odoo10_addon_web_widget_x2many_2d_matrix-10.0.1.0.1.99.dev3-py2-none-any.whl" } ], "10.0.1.0.1.99.dev4": [ { "comment_text": "", "digests": { "md5": "bafe27123ab3b05948684d516a38d322", "sha256": "515daa391b05334c4949dfd00c638e1e578e603b5c917554d5fd034fcccd0223" }, "downloads": -1, "filename": "odoo10_addon_web_widget_x2many_2d_matrix-10.0.1.0.1.99.dev4-py2-none-any.whl", "has_sig": false, "md5_digest": "bafe27123ab3b05948684d516a38d322", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": "~=2.7", "size": 49456, "upload_time": "2018-06-27T04:47:55", "url": "https://files.pythonhosted.org/packages/e4/76/9016f4354fc92821a2d64ae9636295c96a26b31ceb02010a1b2b16e52d04/odoo10_addon_web_widget_x2many_2d_matrix-10.0.1.0.1.99.dev4-py2-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "54fa79c30ce253658fedd24a588205c4", "sha256": "974a2a2026d8b925ba392831369b7b7731a61677576528f004faad5dcf3b8667" }, "downloads": -1, "filename": "odoo10_addon_web_widget_x2many_2d_matrix-10.0.1.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "54fa79c30ce253658fedd24a588205c4", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 47225, "upload_time": "2017-08-31T04:30:13", "url": "https://files.pythonhosted.org/packages/2c/58/698a3459262b3d1711ff982704724b960254263be33bcd8257a2b2627110/odoo10_addon_web_widget_x2many_2d_matrix-10.0.1.0.1-py2-none-any.whl" } ] }