akretion / odoo-usability Goto Github PK
View Code? Open in Web Editor NEWAkretion addons to improve Odoo Community Edition + OCA usability
Akretion addons to improve Odoo Community Edition + OCA usability
We could depend on that module. But may be for 2 lines of XML we may just put in our account_usability module, what do you think?
https://twitter.com/mgielissen/status/1375401294492536837
https://github.com/Openworx/odoo-addons/blob/12.0/ow_invoice_tree_color/views/invoice_tree.xml
Just wanted to notify that I have tested the eradicate_quick_create for v10 in the v11 EE and it works good so far with no changes at all.
[IMP] Select to which models it should not apply allowing flexibility to its use. By default all quick creates be blocked and by selection choose which are allowe.d
hey there 🙂
I was migrating account_invoice_update_wizard
to 11.0 and even made it to a pull request attempt, but there's no such thing as v11 branch in this repo to contribute into
can you perform an initial setup, please?
I am working on Odoo8. Unfortunately the module does not have instructions. Therefore I have looked at the encl. examples in
https://github.com/akretion/odoo-usability/tree/8.0/product_variant_csv_import/sample_csv
and have tried to import them:
product.attribute.csv Imports without problems
product.attribute.value.csv Imports without problems
but with product.template.csv I get the following error message:
insert or update on table "product_attribute_line" violates foreign key constraint "product_attribute_line_attribute_id_fkey" DETAIL: Key (attribute_id)=(12) is not present in table "product_attribute". between rows 2 and 9 (1 more)
insert or update on table "product_attribute_line" violates foreign key constraint "product_attribute_line_attribute_id_fkey" DETAIL: Key (attribute_id)=(12) is not present in table "product_attribute". between rows 10 and 17
What is causing the error?
With Unit of Measures enabled, with a UOM with bigger reference unit is used in Sales Order.
The Invoice cannot be created due to some arguments conflict in UOM.
For Example, this KG item if i will process with KG in UOM for SO line, will proceed.
but if i will put a bigger UOM (ton, 15kg, etc.) the below error will be raised, when trying to create invoice from same SO.
It would be better to add stock_picking_invoice_link to dependencies to account_invoice_picking_label addon.
What about this in product_usability?
to import all fields, you need to pass through the product.product menu. While in 90% of the cases we disables product variants.
so once the power user imported the catalog using a product.product menu, what happens is that product.product records do have an external ID, but product.template records don't. But often you may have other related things to import (say secundary product unit) and these other objects can be carried by the product.template instead of the product.product so it's currently not easy for the user to import these things later...
What could we do? Have a button to populate the product.template external ids from the product product ones?
a bit related to https://github.com/akretion/pattern-import-export but may be we can have basics things here.
In this file:
https://github.com/akretion/odoo-usability/blob/8.0/account_bank_statement_import_usability/account_bank_statement_import.py
account_number needs to be canonicalized the same way before you substitute it into the SQL query. Otherwise a search for an IBAN with spaces in it will not match, even if the IBAN in the database had spaces, because you've removed the spaces from the IBAN in the database.
I had to fix this for a client and I thought you'd like to know about it here as well.
Hi all,
I'm trying to run new OCA CI and some modules are dependending on odoo-usability modules. however odoo-usability modules is not using OCA convention, specially setup folder is missing. So it's not possible to implement the CI on my side.
did you planned to use OCA convention ?
I can make a PR if you want, but you should be agree with that.
kind regards.
Hi,
Try port and install this mrp_average_cost, but when user other than super admin, create bom, has error when about to save the bom, user need administrator/access-right res.company
expected :
it should not need administrator access right to save a bom.
please help what to fix here
thx
Hi @alexis-via ,
Your module product_category_tax (8.0) is very interesting and we would like to use it and eventually improve some aspects.
The best is perhaps to suggest it to OCA. Do you agree to make a PR ?
Regards,
Something happened to v9.0 branch? There is only one module and no commit history.
Hello,
Whej i try to install the module Infogreffe connector, I have his error 👍
Traceback (most recent call last): File "/opt/odoo/server/odoo/http.py", line 640, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/opt/odoo/server/odoo/http.py", line 677, in dispatch result = self._call_function(**self.params) File "/opt/odoo/server/odoo/http.py", line 333, in _call_function return checked_call(self.db, *args, **kwargs) File "/opt/odoo/server/odoo/service/model.py", line 101, in wrapper return f(dbname, *args, **kwargs) File "/opt/odoo/server/odoo/http.py", line 326, in checked_call result = self.endpoint(*a, **kw) File "/opt/odoo/server/odoo/http.py", line 935, in __call__ return self.method(*args, **kw) File "/opt/odoo/server/odoo/http.py", line 506, in response_wrap response = f(*args, **kw) File "/opt/odoo/server/addons/web/controllers/main.py", line 889, in call_button action = self._call_kw(model, method, args, {}) File "/opt/odoo/server/addons/web/controllers/main.py", line 877, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/opt/odoo/server/odoo/api.py", line 689, in call_kw return call_kw_multi(method, model, args, kwargs) File "/opt/odoo/server/odoo/api.py", line 680, in call_kw_multi result = method(recs, *args, **kwargs) File "/opt/odoo/server/odoo/addons/base/module/module.py", line 411, in button_immediate_install return self._button_immediate_function(type(self).button_install) File "/opt/odoo/server/odoo/addons/base/module/module.py", line 485, in _button_immediate_function modules.registry.Registry.new(self._cr.dbname, update_module=True) File "/opt/odoo/extra-addons/odoo_addons/smile_upgrade/models/registry.py", line 44, in new return native_new(db_name, force_demo, update_module=update_module) File "/opt/odoo/server/odoo/modules/registry.py", line 82, in new odoo.modules.load_modules(registry._db, force_demo, status, update_module) File "/opt/odoo/server/odoo/modules/loading.py", line 338, in load_modules loaded_modules, update_module) File "/opt/odoo/server/odoo/modules/loading.py", line 237, in load_marked_modules loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks) File "/opt/odoo/server/odoo/modules/loading.py", line 156, in load_module_graph _load_data(cr, module_name, idref, mode, kind='data') File "/opt/odoo/server/odoo/modules/loading.py", line 95, in _load_data tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report) File "/opt/odoo/server/odoo/tools/convert.py", line 845, in convert_file convert_xml_import(cr, module, fp, idref, mode, noupdate, report) File "/opt/odoo/server/odoo/tools/convert.py", line 915, in convert_xml_import obj.parse(doc.getroot(), mode=mode) File "/opt/odoo/server/odoo/tools/convert.py", line 796, in parse self.parse(rec, mode) File "/opt/odoo/server/odoo/tools/convert.py", line 799, in parse self._tags[rec.tag](rec, de, mode=mode) File "/opt/odoo/server/odoo/tools/convert.py", line 707, in _tag_record id = self.env(context=rec_context)['ir.model.data']._update(rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode) File "/opt/odoo/oca-addons/web/help_online/models/ir_model.py", line 32, in _update res_id=res_id) File "/opt/odoo/server/odoo/addons/base/ir/ir_model.py", line 1229, in _update record = record.create(values) File "/opt/odoo/server/odoo/addons/base/ir/ir_ui_view.py", line 362, in create return super(View, self).create(self._compute_defaults(values)) File "/opt/odoo/oca-addons/connector-telephony/base_phone/models/base.py", line 31, in create return super(Base, self).create(vals) File "/opt/odoo/extra-addons/odoo_magento2_ept/models/backend/producer.py", line 57, in create record_id = create_original(self, vals) File "/opt/odoo/server/odoo/models.py", line 3830, in create self._fields[key].determine_inverse(record) File "/opt/odoo/server/odoo/fields.py", line 1041, in determine_inverse getattr(records, self.inverse)() File "/opt/odoo/server/odoo/addons/base/ir/ir_ui_view.py", line 220, in _inverse_arch view.write(data) File "/opt/odoo/server/odoo/addons/base/ir/ir_ui_view.py", line 380, in write return super(View, self).write(self._compute_defaults(vals)) File "/opt/odoo/oca-addons/connector-telephony/base_phone/models/base.py", line 22, in write return super(Base, self).write(vals) File "/opt/odoo/extra-addons/odoo_magento2_ept/models/backend/producer.py", line 80, in write result = write_original(self, vals) File "/opt/odoo/server/odoo/models.py", line 3556, in write self._write(old_vals) File "/opt/odoo/server/odoo/models.py", line 3707, in _write self._validate_fields(vals) File "/opt/odoo/extra-addons/odoo_addons/smile_base/models/models.py", line 52, in _validate_fields raise ValidationError(name) ParseError: "Le champ
infogreffe_profit` n'existe pas
Contexte de l'erreur :
Vue infogreffe.partner.form
[view_id: 2147, xml_id: n/a, model: res.partner, parent_id: 1512]
None" while parsing /opt/odoo/extra-addons/odoo-usability/l10n_fr_infogreffe_connector/partner_view.xml:11, near
infogreffe.partner.form
res.partner
`
Can help me ?
Regards,
Clément
@alexis-via I'd like to remove this method and the button : https://github.com/akretion/odoo-usability/blob/16.0/purchase_usability/models/account_move.py#L11
For now, it does not work in v16. Ok, it is an easy fix but I did not fix it because I'd prefer to remove it and use the OCA modules that avoid the creation of the 0 quantity lines.
I just ported the module OCA/account-invoicing#1602
What do you think ?
For the record, I'm currently testing this wizard, and even if account_analytic_id
set/remove seems to work nicely, it is not the case of the analytic_tag_ids
since no account.analytic.line
is created from the current tag distribution.
Hi @alexis-via ,
I would like to know what do you think about migrating this modules to OCA:
We haven't analyzed yet, but the could be of general interest. Don't you think so?
Let me know please
Thanks
cc @sergio-teruel @pedrobaeza @carlosdaduden @Tecnativa
Title says it all. Thanks for the great work!
When installing payment_stripe (Odoo SA), the hook create_missing_journal_for_acquirers is called.
It sets default_debit_account_id here https://github.com/odoo/odoo/blob/12.0/addons/payment/models/payment_acquirer.py#L258
with defaults values here: https://github.com/odoo/odoo/blob/12.0/addons/account/models/chart_template.py#L153
Then the check will stop the installation of the module here : https://github.com/akretion/odoo-usability/blob/12.0/account_usability/account.py#L238
@alexis-via any clues how we can solve this issue ?
ping @PierrickBrun
when you click on the "Show History" button of the standard price, you should see the several price history items related to the related product variant.
The problem is the implementation filter the wrong items, the ones with the ids of the related product variants (usually only one) while it should be the ones which match the product variants through their product_id key.
class ProductTemplate(models.Model):
_inherit = 'product.template'
[...]
def show_product_price_history(self):
self.ensure_one()
products = self.env['product.product'].search(
[('product_tmpl_id', '=', self._context['active_id'])])
action = self.env['ir.actions.act_window'].for_xml_id(
'product_usability', 'product_price_history_action')
action.update({
'domain': "[('id', 'in', %s)]" % products.ids,
})
return action
indeed the domain should be "[('product_id', 'in', %s)]" % products.ids
Hi @rvalyi @bealdav @alexis-via
Something that annoys me with recent version it that the default view of product template is the kanban one.
I think it is useless for products, it is slower, etc...
I was about to change the order in a custom module in version 12, to put the tree view by default but I wonder if it could go here.
What do you think?
Hi,
I am using Odoo 10.0-20170308 (Community Edition).
I have got an error during "Product Variant CSV Import" module installation.
See error below
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 638, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 675, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 331, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/odoo/service/model.py", line 119, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 324, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 933, in call
return self.method(*args, **kw)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 504, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python2.7/dist-packages/odoo/addons/web/controllers/main.py", line 882, in call_button
action = self._call_kw(model, method, args, {})
File "/usr/lib/python2.7/dist-packages/odoo/addons/web/controllers/main.py", line 870, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python2.7/dist-packages/odoo/api.py", line 681, in call_kw
return call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python2.7/dist-packages/odoo/api.py", line 672, in call_kw_multi
result = method(recs, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/odoo/addons/base/module/module.py", line 410, in button_immediate_install
return self._button_immediate_function(type(self).button_install)
File "/usr/lib/python2.7/dist-packages/odoo/addons/base/module/module.py", line 484, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/usr/lib/python2.7/dist-packages/odoo/modules/registry.py", line 78, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/usr/lib/python2.7/dist-packages/odoo/modules/loading.py", line 339, in load_modules
loaded_modules, update_module)
File "/usr/lib/python2.7/dist-packages/odoo/modules/loading.py", line 237, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
File "/usr/lib/python2.7/dist-packages/odoo/modules/loading.py", line 156, in load_module_graph
_load_data(cr, module_name, idref, mode, kind='data')
File "/usr/lib/python2.7/dist-packages/odoo/modules/loading.py", line 95, in _load_data
tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
File "/usr/lib/python2.7/dist-packages/odoo/tools/convert.py", line 848, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/usr/lib/python2.7/dist-packages/odoo/tools/convert.py", line 918, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "/usr/lib/python2.7/dist-packages/odoo/tools/convert.py", line 799, in parse
self.parse(rec, mode)
File "/usr/lib/python2.7/dist-packages/odoo/tools/convert.py", line 802, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "/usr/lib/python2.7/dist-packages/odoo/tools/convert.py", line 504, in _tag_menuitem
menu_parent_id = self.id_get(rec.get('parent',''))
File "/usr/lib/python2.7/dist-packages/odoo/tools/convert.py", line 785, in id_get
res = self.model_id_get(id_str, raise_if_not_found)
File "/usr/lib/python2.7/dist-packages/odoo/tools/convert.py", line 791, in model_id_get
return self.env['ir.model.data'].xmlid_to_res_model_res_id(id_str, raise_if_not_found=raise_if_not_found)
File "/usr/lib/python2.7/dist-packages/odoo/addons/base/ir/ir_model.py", line 1035, in xmlid_to_res_model_res_id
return self.xmlid_lookup(xmlid)[1:3]
File "", line 2, in xmlid_lookup
File "/usr/lib/python2.7/dist-packages/odoo/tools/cache.py", line 87, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/odoo/addons/base/ir/ir_model.py", line 1024, in xmlid_lookup
raise ValueError('External ID not found in the system: %s' % xmlid)
ParseError: "External ID not found in the system: product.prod_config_main" while parsing /usr/lib/python2.7/dist-packages/odoo/addons/product_variant_csv_import/product_view.xml:21, near
Thanks.
Regards.
I am migrating a database from Odoo 10.0 to 12.0, that database depends on stock_user_default_warehouse_*
. Is there an alternative to these addons?
I'm going to start the stock_user_default_warehouse_*
migration next week in case there isn't an alternative.
The field seller_id is stored.
But in multi-company the seller_id depend on the company so it can not be stored
@alexis-via what do you think ?
Expected behavior : Generate stock valuation and variation report based on selected company.
Current behavior : Generate report for the First company only. When trying to create report from another company it shows
Due to security restrictions, you are not allowed to access 'Warehouse' (stock.warehouse) records.
Records: WAREHOUSE ONE(id=1)
User: USERXYZ (id=16)
This restriction is due to the following rules:
Note: this might be a multi-company issue.
Contact your administrator to request access if necessary.
Hi @alexis-via
Ine multi company and multi warehouse, set up the user with a single value for only one company.
Switch to the second company
On this line https://github.com/akretion/odoo-usability/blob/14.0/stock_user_default_warehouse_purchase/models/purchase.py#L13 the warehouse found belongs to the first company.
It looks like the context is set with the first value read. Do you think it could be possible ?
Regards
account_usability to depend OCA account_menu (missing accounting menus)?
on https://odoo-community.org/shop/product/account-missing-menus-4876?search=menu&version=14 ?
The only limit I see is if the user wants to use Odoo EE. But I think akretion usability modules assume it's OCA and not EE, no?
so one could look at the inventory by stock location but also by product category...
odoo.tools.convert.ParseError: "Error while validating constraint
Field `location_id` does not exist
Error context:
View `stock_account_usability.stock.quantity.history.form`
[view_id: 1863, xml_id: n/a, model: stock.quantity.history, parent_id: 849]
None" while parsing /home/odoo/src/user/community/stock_account_usability/wizard/stock_quantity_history_view.xml:11, near
<record id="view_stock_quantity_history" model="ir.ui.view">
<field name="name">stock_account_usability.stock.quantity.history.form</field>
<field name="model">stock.quantity.history</field>
<field name="inherit_id" ref="stock_account.view_stock_quantity_history"/>
<field name="arch" type="xml">
<field name="date" position="after">
<field name="location_id"/>
</field>
</field>
</record>
When installing module.
I believe this module can also be used when costing method is FIFO beside the average costing as intended, because default odoo only take standard cost from product form for the FIFO costing method (in other word, default odoo only support standard cost.; by add cost method = fifo beside the average as is now.
Other improvement is on labour cost,
the labour time will be much better to be taken from workcenter and the operation time definition (when workorder is used)
To support real time reporting with balance condition, the calculated use of labour cost, should have an accounting entries to an account such as "pre-calculated or un-accrued labour expenses"
Thank you.
This PR by @sebastienbeau merged in july 2022
#174
has some problems:
On the bank statement, when you click on "Reset to new", the bank moves go back to draft state and the reconcile marks are deleted, but the statement lines are not proposed in the reconcile interface (unless if you click on the button "UnReconcile all".
Let's talk about this tomorrow.
In our usability modules, we used to switch some char fields from translate=True to Translate=False. For example: https://github.com/akretion/odoo-usability/blob/16.0/base_usability/models/ir_actions_report.py#L15
This is a problem in v16 ; I guess that, when you do that in v16, you have to do a migration script to convert the data from json to char.
Unless if you have a great technical idea, I think I'll remove this kind of change from usability modules (unless if we find an easy solution, I think this change to translate=False may not be worth the technical complexity)
Hi,
Please help, i want to try and use this mrp_average_cost, on odoo V11-CE,
since no V11 for this module yet
please inform which one better (v10, or v12 of this module) to try to migrate or port so can run well in in V11
Thank you,
Bun
ir.model.access.csv is referenced in the manifest but does not exist.
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.