Skip to content
Permalink
Browse files

🚒 12.0 port

  • Loading branch information...
fedoranvar committed Aug 7, 2019
1 parent f794412 commit bbd84558d2decd7757289383f6927eb418f8c516
@@ -8,71 +8,6 @@ Odoo App Store administration tool

Tool to work with apps.odoo.com database via xmlrpc. Usefull for sharing administration rights with your colleagues as well as for automation.

Configuration
=============

To use this module, you need to have a password in ``apps.odoo.com`` database.

* Step 1. Ask support team to set some temporar password on apps.odoo.com database
* Step 2. Login to https://apps.odoo.com/web in a usual way (via oauth)
* Step 3. Open browser console and change password by using js code below

.. code:: js
odoo.define('www', function(require) {
"use strict";
var ajax = require('web.ajax');
// will only work after the password has been set by Odoo
ajax.jsonpRpc('/web/session/change_password', 'call', {
'fields' : [
{'name': 'old_pwd', 'value': 'demoo'},
{'name': 'new_password', 'value': 'demooo'},
{'name': 'confirm_pwd', 'value': 'demooo'}
]})
.then(function(o) { console.log(o); });
});
* Step 4. At your odoo database:

* install this module and go to menu ``Odoo App Store >> Settings``
* set login and password
* click ``[Apply]``

Usage
=====

Scan Repo
---------

To call ``[Scan Repo]`` button

* go to ``Odoo App Store >> Tools >> Scan Repo``
* set ``Repository``
* click ``[Scan Repo]``

Adding batch of Repos
---------------------

* go to ``Odoo App Store >> Tools >> Add Repos``
* set ``Version``
* specify list of repos
* click ``[Add Repos]``
* RESULT: it will create and validate the repos. Errors are printed to odoo logs


.. Known issues / Roadmap
.. ======================
..
.. * ...
Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/OCA/{project_repo}/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smash it by providing detailed and welcomed feedback.

Credits
=======

@@ -86,14 +21,6 @@ Contributors

* Ivan Yelizariev <yelizariev@it-projects.info>

.. Funders
.. -------
..
.. The development of this module has been financially supported by:
..
.. * Company 1 name
.. * Company 2 name
Maintainer
----------

@@ -108,3 +35,5 @@ mission is to support the collaborative development of Odoo features and
promote its widespread use.

To contribute to this module, please visit https://odoo-community.org.

Tested on Odoo 12.0 32c2666d189047db66eb7b1392ea34b086fd341e
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2017 IT-Projects LLC (<https://it-projects.info>)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from . import models
@@ -1,16 +1,17 @@
# -*- coding: utf-8 -*-
# Copyright 2017 IT-Projects LLC (<https://it-projects.info>)
# Copyright 2019 Anvar Kildebekov (<https://it-projects.info/team/kildebekov>)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
{
"name": "Odoo App Store administration tool",
"name": "Odoo App Store Admin tool",
"summary": "Tool to work with apps.odoo.com database via xmlrpc.",
"version": "8.0.1.0.0",
"version": "12.0.1.0.0",
"category": "Extra Tools",
"images": ["images/main.jpg"],
"website": "https://it-projects.info",
"author": "IT-Projects LLC, Odoo Community Association (OCA)",
"license": "LGPL-3",
"application": False,
"installable": False,
"installable": True,
# "pre_init_hook": "pre_init_hook",
# "post_init_hook": "post_init_hook",
# "post_load": "post_load",
@@ -3,20 +3,18 @@
Copyright 2017 IT-Projects LLC (<https://it-projects.info>)
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
-->
<openerp>
<data noupdate="1">
<odoo noupdate="1">

<record id="param_apps_odoo_com_login" model="ir.config_parameter">
<field name="key">apps_odoo_com.login</field>
<field name="value"> </field>
<field name="group_ids" eval="[(4, ref('apps_odoo_com.apps_odoo_com_group_manager'))]"/>
</record>
<record id="param_apps_odoo_com_login" model="ir.config_parameter">
<field name="key">apps_odoo_com.login</field>
<field name="value"> </field>
<field name="group_ids" eval="[(4, ref('apps_odoo_com.apps_odoo_com_group_manager'))]"/>
</record>

<record id="param_apps_odoo_com_password" model="ir.config_parameter">
<field name="key">apps_odoo_com.password</field>
<field name="value"> </field>
<field name="group_ids" eval="[(4, ref('apps_odoo_com.apps_odoo_com_group_manager'))]"/>
</record>
<record id="param_apps_odoo_com_password" model="ir.config_parameter">
<field name="key">apps_odoo_com.password</field>
<field name="value"> </field>
<field name="group_ids" eval="[(4, ref('apps_odoo_com.apps_odoo_com_group_manager'))]"/>
</record>

</data>
</openerp>
</odoo>
@@ -0,0 +1,4 @@
`1.0.0`
-------

- **Init version**
@@ -0,0 +1,75 @@
==================================
Odoo App Store administration tool
==================================

Installation
============

* `Install <https://odoo-development.readthedocs.io/en/latest/odoo/usage/install-module.html>`__ this module in a usual way

Configuration
=============

To use this module, you need to have a password in ``apps.odoo.com`` database.

* Step 1. Ask support team to set some temporar password on apps.odoo.com database
* Step 2. Login to https://apps.odoo.com/web in a usual way (via oauth)
* Step 3. Open browser console and change password by using js code below

.. code:: js
odoo.define('www', function(require) {
"use strict";
var ajax = require('web.ajax');
// will only work after the password has been set by Odoo
ajax.jsonpRpc('/web/session/change_password', 'call', {
'fields' : [
{'name': 'old_pwd', 'value': 'demoo'},
{'name': 'new_password', 'value': 'demooo'},
{'name': 'confirm_pwd', 'value': 'demooo'}
]})
.then(function(o) { console.log(o); });
});
* Step 4. At your odoo database:

* install this module and go to menu ``Odoo App Store >> Settings``
* set login and password
* click ``[Apply]``

Usage
=====

Scan Repo
---------

To call ``[Scan Repo]`` button

* go to ``Odoo App Store >> Tools >> Scan Repo``
* set ``Repository``
* click ``[Scan Repo]``

Adding batch of Repos
---------------------

* go to ``Odoo App Store >> Tools >> Add Repos``
* set ``Version``
* specify list of repos
* click ``[Add Repos]``
* RESULT: it will create and validate the repos. Errors are printed to odoo logs


.. Known issues / Roadmap
.. ======================
..
.. * ...
Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/OCA/{project_repo}/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smash it by providing detailed and welcomed feedback.

* RESULT: {what user gets, how the modules changes default behaviour}
Binary file not shown.
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2017 IT-Projects LLC (<https://it-projects.info>)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from . import res_config
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2017 IT-Projects LLC (<https://it-projects.info>)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from openerp import models, fields, api
from odoo import models, fields, api

PARAMS = [
("apps_login", "apps_odoo_com.login"),
@@ -13,21 +12,22 @@ class Settings(models.TransientModel):

_name = 'apps_odoo_com.settings'
_inherit = 'res.config.settings'
_description = 'description of settings'

apps_login = fields.Char("Email", help="login of your account at apps.odoo.com")
apps_password = fields.Char("Password", help="Password for apps.odoo.com. Note, that it's not the same as password for odoo.com, chect README for more information")

@api.multi
def set_params(self):
def set_value_params(self):
self.ensure_one()

for field_name, key_name in PARAMS:
value = getattr(self, field_name, '').strip()
self.env['ir.config_parameter'].set_param(key_name, value)
self.env['ir.config_parameter'].sudo().set_param(key_name, value)

@api.multi
def get_default_params(self):
def get_values_params(self):
res = {}
for field_name, key_name in PARAMS:
res[field_name] = self.env['ir.config_parameter'].get_param(key_name, '').strip()
res[field_name] = self.env['ir.config_parameter'].sudo().get_param(key_name, '').strip()
return res
@@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
# Copyright 2017 IT-Projects LLC (<https://it-projects.info>)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from openerp import models, fields
from odoo import models, fields


class User(models.Model):

_name = 'apps_odoo_com.user'
_order = 'odoo_id desc'
_description = 'description of user'

name = fields.Char(readonly=True)
odoo_id = fields.Integer(readonly=True)
@@ -17,6 +17,7 @@ class Module(models.Model):

_name = 'apps_odoo_com.module'
_order = 'odoo_id desc'
_description = 'description of module'

name = fields.Char(string='Technical Name', readonly=True)
odoo_id = fields.Integer(readonly=True)
@@ -29,6 +30,7 @@ class Purchase(models.Model):

_name = 'apps_odoo_com.purchase'
_order = 'odoo_id desc'
_description = 'description of purchase'

odoo_id = fields.Integer(readonly=True)

@@ -3,26 +3,23 @@
Copyright 2017 IT-Projects LLC (<https://it-projects.info>)
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
-->
<openerp>
<data>
<odoo>

<record id="category" model="ir.module.category">
<field name="name">Odoo App Store</field>
</record>

<record id="category" model="ir.module.category">
<field name="name">Odoo App Store</field>
</record>

<record id="apps_odoo_com_group_user" model="res.groups">
<field name="name">User</field>
<field name="category_id" ref="category"/>
</record>

<record id="apps_odoo_com_group_user" model="res.groups">
<field name="name">User</field>
<field name="category_id" ref="category"/>
</record>
<record id="apps_odoo_com_group_manager" model="res.groups">
<field name="name">Manager</field>
<field name="category_id" ref="category"/>
<field name="implied_ids" eval="[(4, ref('apps_odoo_com_group_user'))]"/>
<field name="users" eval="[(4, ref('base.user_admin'))]"/>
</record>

<record id="apps_odoo_com_group_manager" model="res.groups">
<field name="name">Manager</field>
<field name="category_id" ref="category"/>
<field name="implied_ids" eval="[(4, ref('apps_odoo_com_group_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>

</data>
</openerp>
</odoo>
Binary file not shown.

0 comments on commit bbd8455

Please sign in to comment.
You can’t perform that action at this time.