camptocamp / anthem Goto Github PK
View Code? Open in Web Editor NEWmake your odoo scripts sing
License: GNU Lesser General Public License v3.0
make your odoo scripts sing
License: GNU Lesser General Public License v3.0
Dependabot couldn't authenticate with https://pypi.python.org/simple/.
You can provide authentication details in your Dependabot dashboard by clicking into the account menu (in the top right) and selecting 'Config variables'.
The add_xmlid
method currently skips the creation of the xmlid if it already exists on a different record. It should fail instead.
anthem/anthem/lyrics/records.py
Lines 9 to 28 in 3dc8e39
The uninstall method doesn't work well if you call it several times in the same operation (seems only the first call work)
eg:
@anthem.log
def uninstall_agreement_sale_and_base_contract(ctx):
""" Uninstall agreement_sale and dependency modules """
uninstall(ctx, ['base_contract', 'agreement_sale'])
@anthem.log
def uninstall_account_followup_partner_level(ctx):
uninstall(ctx, ['account_followup_partner_level'])
@anthem.log
def uninstall_account_invoice_supplier_ref_reuse(ctx):
uninstall(ctx, ['account_invoice_supplier_ref_reuse'])
@anthem.log
def pre(ctx):
"""Applying 13.0.1.1.0 PRE operations"""
uninstall_addons(ctx)
@anthem.log
def post(ctx):
""" POST: uninstall """
uninstall_agreement_sale_and_base_contract(ctx)
uninstall_account_followup_partner_level(ctx)
uninstall_account_invoice_supplier_ref_reuse(ctx)
in this case only base_contract
and agreement_sale
were finally uninstalled
I have this method that is supposed to upgrade a list of modules:
@anthem.log
def upgrade_list(ctx):
""" upgrade module """
module_list = ['hr', 'purchase']
mods = ctx.env['ir.module.module'].search([('name', 'in', module_list), ('state', '=', 'installed')])
if mods:
mods.button_immediate_upgrade()
Odoo version 12
The upgrade doesn't take effect until the server is restarted!
I tried to change the name
of an ir.ui.menu
and it changed in the database but didn't change in the browser!
How can I upgrade modules without restarting the server?
load_csv being mostly used to load tons of data, wouldn't it make sens to change the default values?
Usage has shown that we almost use tracking disabled every time.
Plus, data created from CSV is mostly not config and shouldn't be modified update, thus it should also
set the xml ids as noupdate
.
We can change the current function default behavior or have an alias that does this small change.
For me there is 2 use case:
The installation of Odoo 10.0 used to run the tests sometimes fails. Tests in themselves are green, but the setup sometimes fails. I could not find the reason yet.
See https://github.com/camptocamp/anthem/pull/21/files#r148757535
The code is duplicated in both lyrics.loaders and lyrics.modules.
In lyrics.loaders
, it should call the one in lyrics.modules
and display a message like done for the uninstaller:
anthem/anthem/lyrics/uninstaller.py
Lines 11 to 12 in 8d51a61
Don't have time to open a PR for this now but this is broken:
update_translations
was available up to 10.0:
_update_translations
is available from 11.0:
Maybe we should add a check to get the existing function before calling it?
Hello, songs have been exported for the mtsmte project.
I'm facing a lot of import errors because anthem is trying to exclude header that is not present. https://github.com/camptocamp/anthem/blob/master/anthem/lyrics/loaders.py#L93
Import res.partner from csv: error main: error Traceback (most recent call last): File "/usr/local/bin/anthem", line 11, in <module> sys.exit(main()) File "/usr/local/lib/python2.7/dist-packages/anthem/cli.py", line 59, in main run(odoo_args, args.target, options) File "/usr/local/lib/python2.7/dist-packages/anthem/cli.py", line 88, in run func(ctx) File "/usr/local/lib/python2.7/dist-packages/anthem/output.py", line 72, in decorated return func(*args, **kwargs) File "/opt/odoo/songs/install/generated/stock.py", line 158, in main load_res_partner(ctx) File "/usr/local/lib/python2.7/dist-packages/anthem/output.py", line 72, in decorated return func(*args, **kwargs) File "/opt/odoo/songs/install/generated/stock.py", line 137, in load_res_partner load_csv(ctx, 'data/install/generated/res.partner.csv', model, header_exclude=header_exclude) # noqa File "/opt/odoo/songs/common.py", line 23, in load_csv header=header, header_exclude=header_exclude) File "/usr/local/lib/python2.7/dist-packages/anthem/lyrics/loaders.py", line 93, in load_csv_stream pop_idxs = [_header.index(x) for x in header_exclude] ValueError: 'self/id' is not in list
We should update this in order not to have an error while trying to remove an unexisting header.
uninstall method now raise UserError if addon is not installed, so running the migration step is not idempotent and fails on the second run
suppose we need to filter addons based on their state before execution
Here
anthem/anthem/lyrics/modules.py
Lines 23 to 44 in e067afb
PyPi package has been outdated for the past 3 years.
Adding install instructions for anthem
would be nice, if the preferred way to install is from the repository instead of using PyPI
with current anthem version and Odoo v12:
instead of from anthem.lyrics import settings
should be from anthem.lyrics.settings import define_settings
it is no more model = ctx.env['sale.config.settings']
but model = ctx.env['res.config.settings']
DJ_tool is creating songs with in comments the name of the company. Anthem use this comment as a log.
If you have a company_name with characters like é
it will fail.
We have to eighter fix it in anthem or dj_tool
https://github.com/camptocamp/anthem/blob/master/anthem/output.py#L28
Impossible to run tests locally and travis is read for the same reason: No idea what 'tests.prepare_config' is!
https://travis-ci.org/camptocamp/anthem#L522
/cc @leemannd
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.