Giter Club home page Giter Club logo

server-ux's Introduction

Runboat Pre-commit Status Build Status codecov Translation Status

server-ux

TODO: add repo description.

Available addons

addon version maintainers summary
announcement 16.0.1.0.0 Notify internal users about relevant organization stuff
announcement_dialog_size 16.0.1.0.0 Allow set announcement dialogs fullsized by default
barcode_action 16.0.1.0.0 Allows to use barcodes as a launcher
base_archive_security 16.0.1.0.1 imlopes ivantodorovich Controls who can archive or unarchive records
base_binary_url_import 16.0.1.0.0 Wizard to import binary files from URL on existing records
base_cancel_confirm 16.0.1.0.0 kittiu Base Cancel Confirm
base_custom_filter 16.0.1.1.0 AshishHirapara ForgeFlow Add custom filters in standard filters and group by dropdowns
base_export_manager 16.0.1.0.0 Manage model export profiles
base_import_security_group 16.0.1.0.0 Group-based permissions for importing CSV files
base_menu_visibility_restriction 16.0.1.0.0 victoralmau Restrict (with groups) menu visibilty
base_optional_quick_create 16.0.1.0.0 Avoid "quick create" on m2o fields, on a "by model" basis
base_revision 16.0.1.0.2 Keep track of revised document
base_rule_visibility_restriction 16.0.1.0.0 GuillemCForgeFlow Exclude Record Rules for certain groups
base_search_custom_field_filter 16.0.1.0.0 pedrobaeza Add custom filters for fields via UI
base_substate 16.0.1.0.0 Base Sub State
base_technical_features 16.0.1.0.0 Access to technical features without activating debug mode
base_tier_validation 16.0.1.6.0 LoisRForgeFlow Implement a validation process based on tiers.
base_tier_validation_definition_server_action 16.0.1.0.0 Server action for Base tier validation
base_tier_validation_formula 16.0.1.0.2 Formulas for Base tier validation
base_tier_validation_forward 16.0.1.1.2 kittiu Forward option for base tiers
base_tier_validation_report 16.0.1.0.1 kittiu Reports related to tier validation
base_tier_validation_server_action 16.0.1.0.0 kittiu Add option to call server action when a tier is validated
base_tier_validation_waiting 16.0.1.0.0 Base Tier Validation Extension to add waiting status
base_user_locale 16.0.1.1.0 User Locale Settings
date_range 16.0.1.0.9 lmignon Manage all kind of date range
date_range_account 16.0.1.0.1 alexis-via Add Date Range menu entry in Invoicing app
developer_menu 16.0.1.0.0 bealdav Menu Shortcut for developer usage
filter_multi_user 16.0.1.0.1 LoisRForgeFlow Allows to share user-defined filters filters among several users.
multi_step_wizard 16.0.1.0.0 Multi-Steps Wizards
sequence_reset_period 16.0.1.0.0 Auto-generate yearly/monthly/weekly/daily sequence period ranges
server_action_mass_edit 16.0.2.0.3 Mass Editing
template_content_swapper 16.0.1.0.1 Template Content Swapper
test_base_binary_url_import 16.0.1.0.1 Unittests for Base Binary URL Import module
user_all_groups 16.0.1.0.1 legalsylvain Automatically add admin user to all the groups

Licenses

This repository is licensed under AGPL-3.0.

However, each module can have a totally different license, as long as they adhere to Odoo Community Association (OCA) policy. Consult each module's __manifest__.py file, which contains a license key that explains its license.


OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

server-ux's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

server-ux's Issues

base_export_manager disable export don't work

i have do as configuration as below:

1.Activate the developer mode
2.Go to Settings > Users > Groups to select a user group
3.Edit the group and go to the Access Rights tab
4.Uncheck the "Export Access" box on the object of your choice and save
5.Connect as a user of this group
6.Go to the list view of the object you disabled the export

but The "Export" is still there.

[12.0][IMP] base_tier_validation_formula, ability to use both Domain and Formula.

@hveficent @lreficent @ps-tubtim
One of the goal to do is to use base_tier_validation in the way that, i.e., for purchase.order, different Operating Unit or Department, will use different set of Tier Validation.
At first, I was thinking that we need to create another addon, like, base_tier_validation_dept.

But after playing around the "Domain" is coming in handy. For example, we can [('department', '=', 'Dept-A')]. That is easy.

But currently, if we use "Formula", the domain will be disabled by default and allow only Formula. Although we can write code to select only required department, but I think it is quite difficult.

My idea is that, can we allow use both together? So, once install base_tier_validation_formula we can have definition options,

  • Domain
  • Formula
  • Domain & Formula

Says, there are 100 POs, the domain filter by department which reduce it to 40 POs, then formula will work on that 40 POs only.

This should be a small enhancement to base_tier_validation_formula, and won't affect the existing one.

Note:

  • This should be good with the helper (domain is on header) we are working on too.

What do you think? If you ok, we will do the PR.

mass_edit

module: mass_editing
version: 12.0

Steps to reproduce

  • ...

Current behavior

Expected behavior

[12.0][Mass_Editing] Cannot Group-by -> Type, when adding fields

Hi, I think something wrong with mass_editing_domain when we use it.
When I adding fields for other models and filter Group-by -> Type.
I getting the following:

Error:
Odoo Server Error

Traceback (most recent call last):
  File "/opt/odoo/code/projects/kodoo-12/odoo/odoo/http.py", line 656, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/code/projects/kodoo-12/odoo/odoo/http.py", line 314, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/opt/odoo/code/projects/kodoo-12/odoo/odoo/tools/pycompat.py", line 87, in reraise
    raise value
  File "/opt/odoo/code/projects/kodoo-12/odoo/odoo/http.py", line 698, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/code/projects/kodoo-12/odoo/odoo/http.py", line 346, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/code/projects/kodoo-12/odoo/odoo/service/model.py", line 97, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/code/projects/kodoo-12/odoo/odoo/http.py", line 339, in checked_call
    result = self.endpoint(*a, **kw)
  File "/opt/odoo/code/projects/kodoo-12/odoo/odoo/http.py", line 941, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/code/projects/kodoo-12/odoo/odoo/http.py", line 519, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/code/projects/kodoo-12/odoo/addons/web/controllers/main.py", line 962, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/opt/odoo/code/projects/kodoo-12/odoo/addons/web/controllers/main.py", line 954, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo/code/projects/kodoo-12/odoo/odoo/api.py", line 745, in call_kw
    return _call_kw_model(method, model, args, kwargs)
  File "/opt/odoo/code/projects/kodoo-12/odoo/odoo/api.py", line 718, in _call_kw_model
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/code/projects/kodoo-12/odoo/odoo/models.py", line 2070, in read_group
    result = self._read_group_raw(domain, fields, groupby, offset=offset, limit=limit, orderby=orderby, lazy=lazy)
  File "/opt/odoo/code/projects/kodoo-12/odoo/odoo/models.py", line 2093, in _read_group_raw
    query = self._where_calc(domain)
  File "/opt/odoo/code/projects/kodoo-12/odoo/odoo/models.py", line 3896, in _where_calc
    e = expression.expression(domain, self)
  File "/opt/odoo/code/projects/kodoo-12/odoo/odoo/osv/expression.py", line 672, in __init__
    self.parse()
  File "/opt/odoo/code/projects/kodoo-12/odoo/odoo/osv/expression.py", line 853, in parse
    raise ValueError("Invalid field %r in leaf %r" % (left, str(leaf)))
ValueError: Invalid field 'mass_editing_domain' in leaf "<osv.ExtendedLeaf: ('mass_editing_domain', 'in', '[148]') on ir_model_fields (ctx: )>"

[13.0] [mass_editing] I can't debug Fields

Hello,

I think this is an important bug. The bug occurs for all modules but I tell you where I got it first.

Accounting Module > Bank > statments > click on debug icon > select "view fields" I get this error.

image

Thanks for your help,
Emir.

[13.0] Tier validation not working multicompany

Model "tier.review" doesn't contain company_id and no record rule is active, when switching companies a record rule error is raised because the tier is loaded but the underlaying record is not visible for the user.

The idea I have now:

  • Add company_id to tier.review company_id = fields.Many2one(related='definition_id.company_id', store=True)
  • Add record rule on tier_definition
  • Filter reviews in review_user_count on company

@LoisRForgeFlow What do you think?

Action button not working for Products mass editing

I have not been able to get mass editing working for the Products model. I have tried on v10 and 11 and just verified through runbot.

I can select the model, pick the fields and click add sidebar button but no action shows in the module.

Am I going about this wrong or is this an issue?

Thanks

[13.0]] I can't install Mass Editing

Error:
Odoo Server Error

Traceback (most recent call last):
File "/opt/odoo13/odoo-13.0/odoo/http.py", line 624, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo13/odoo-13.0/odoo/http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/opt/odoo13/odoo-13.0/odoo/tools/pycompat.py", line 14, in reraise
raise value
File "/opt/odoo13/odoo-13.0/odoo/http.py", line 669, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo13/odoo-13.0/odoo/http.py", line 350, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo13/odoo-13.0/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo13/odoo-13.0/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo13/odoo-13.0/odoo/http.py", line 915, in call
return self.method(*args, **kw)
File "/opt/odoo13/odoo-13.0/odoo/http.py", line 515, in response_wrap
response = f(*args, **kw)
File "/opt/odoo13/odoo-13.0/addons/web/controllers/main.py", line 1326, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/opt/odoo13/odoo-13.0/addons/web/controllers/main.py", line 1314, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo13/odoo-13.0/odoo/api.py", line 387, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/opt/odoo13/odoo-13.0/odoo/api.py", line 374, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "", line 2, in button_immediate_install
File "/opt/odoo13/odoo-13.0/odoo/addons/base/models/ir_module.py", line 72, in check_and_log
return method(self, *args, **kwargs)
File "/opt/odoo13/odoo-13.0/odoo/addons/base/models/ir_module.py", line 463, in button_immediate_install
return self._button_immediate_function(type(self).button_install)
File "/opt/odoo13/odoo-13.0/odoo/addons/base/models/ir_module.py", line 573, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/opt/odoo13/odoo-13.0/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/opt/odoo13/odoo-13.0/odoo/modules/loading.py", line 423, in load_modules
loaded_modules, update_module, models_to_check)
File "/opt/odoo13/odoo-13.0/odoo/modules/loading.py", line 315, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/opt/odoo13/odoo-13.0/odoo/modules/loading.py", line 182, in load_module_graph
load_openerp_module(package.name)
File "/opt/odoo13/odoo-13.0/odoo/modules/module.py", line 376, in load_openerp_module
import('odoo.addons.' + module_name)
File "/mnt/hgfs/python_project/share/mass_editing_v13/init.py", line 7, in
from . import tests
File "/mnt/hgfs/python_project/share/mass_editing_v13/tests/init.py", line 5, in
from . import test_mass_editing
File "/mnt/hgfs/python_project/share/mass_editing_v13/tests/test_mass_editing.py", line 9, in
from odoo.addons.mass_editing.hooks import uninstall_hook
ModuleNotFoundError: No module named 'odoo.addons.mass_editing'

[12.0-mass_editing] Do not work on message_partner_ids (followers)

Tested on Runbot today
Steps to reproduce :

  • add message_partner_ids field in mass editing setup for sale_order object
  • use mass_editing on sale order object (try to Add, Remove or Set option)

Result :

  • The message_partner_ids field remains unchanged
    Expected result :
  • The message_partner_ids field should be edited

[RFC] base_tier_validate, to add ability to "Forward" another approver.

base_tier_validation is by its name, "tier" and allow easy setup of tiers.

We do have more complex request than "Approve", "Rejected" but also "Forward" to another user, before coming back to the next in tier.

We want to try doing so add the feature, but first want to seek your opinion and/or use cases.

[13.0] Tier validation subtype of messages

def _notify_accepted_reviews(self):
def _notify_rejected_review(self):

both these methods use subtype="mt_comment" which I think is incorrect.

In for example a purchase order workflow we don't want to send a message to the supplier of the PO (which also follower) if a PO is internally rejected or approved.

I suggest I create a PR to change the subtype to mt_note.

@LoisRForgeFlow

[13.0] Reviews widget model name translations

Module base_tier_validation

Review widget in systray is not showing the model name translation.

The model res_users In the function review_user_count return record._description as model name without translation.

Should call name_get function of the model to get name translated

Steps to reproduce:

Install module base_tier_validation and purchase_tier_validation to test.

You have to install a new language

When request validation on purchase the users reviewers can check the systray review widget.

Then change user language and there is no translation for model name.

Before:

image

After:

image

error with Installing in V13 (SH)

When I install on V 13 (SH) I get the following error:

Error:
Odoo Server Error

Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/http.py", line 624, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/odoo/src/odoo/odoo/http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/home/odoo/src/odoo/odoo/tools/pycompat.py", line 14, in reraise
raise value
File "/home/odoo/src/odoo/odoo/http.py", line 669, in dispatch
result = self._call_function(**self.params)
File "/home/odoo/src/odoo/odoo/http.py", line 350, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/odoo/src/odoo/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/home/odoo/src/odoo/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "/home/odoo/src/odoo/odoo/http.py", line 915, in call
return self.method(*args, **kw)
File "/home/odoo/src/odoo/odoo/http.py", line 515, in response_wrap
response = f(*args, **kw)
File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 1326, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 1314, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/odoo/src/odoo/odoo/api.py", line 387, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/home/odoo/src/odoo/odoo/api.py", line 374, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "", line 2, in button_immediate_install
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_module.py", line 72, in check_and_log
return method(self, *args, **kwargs)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_module.py", line 463, in button_immediate_install
return self._button_immediate_function(type(self).button_install)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_module.py", line 573, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/home/odoo/src/odoo/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/odoo/src/odoo/odoo/modules/loading.py", line 423, in load_modules
loaded_modules, update_module, models_to_check)
File "/home/odoo/src/odoo/odoo/modules/loading.py", line 315, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/home/odoo/src/odoo/odoo/modules/loading.py", line 182, in load_module_graph
load_openerp_module(package.name)
File "/home/odoo/src/odoo/odoo/modules/module.py", line 376, in load_openerp_module
import('odoo.addons.' + module_name)
File "/home/odoo/src/user/mass_editing_v13/init.py", line 7, in
from . import tests
File "/home/odoo/src/user/mass_editing_v13/tests/init.py", line 5, in
from . import test_mass_editing
File "/home/odoo/src/user/mass_editing_v13/tests/test_mass_editing.py", line 9, in
from odoo.addons.mass_editing.hooks import uninstall_hook
File "/home/odoo/src/user/mass_editing/init.py", line 5, in
from . import models
File "/home/odoo/src/user/mass_editing/models/init.py", line 6, in
from . import mass_object
File "/home/odoo/src/user/mass_editing/models/mass_object.py", line 8, in
class MassObject(models.Model):
File "/home/odoo/src/user/mass_editing/models/mass_object.py", line 52, in MassObject
@api.multi
AttributeError: module 'odoo.api' has no attribute 'multi'

[12.0] Base Tier Validation - Validation Date with Timezone

The validation date seems to show in UTC so is it possible to show it in the user's time instead?

To show this, I created a record and validated it about a minute later. In the screenshot below you can see when the test record was created which shows 12:55:22 but the validation shows 19:56:57 even though it was just a few min later.
image

This is confusing users so I was wondering if anyone knows how we can make the datetime show similar to other fields in Odoo?

[12,13][BUG] base_tier_validation, for case sequence approval

I have tested approval by sequence, for 3 steps approval. Where step 1 and 3 is by user1, and step 2 is for user2

I would expect that, it will run by sequence no matter what. But when user1 approve, it result like this.

image

I understand that it might seem like a feature, because without sequence approval, when a user approve, all steps by that users will get approved.

But I still think, it will be more intuitative in case approval by sequence, to go one step at a time only. @ps-tubtim , can you fix?

cc @LoisRForgeFlow WDYT?

[12] Error when importing date_range-12 add-on

I'm currently trying to import the date_range module for Odoo 12, using the web GUI on the configuration page > "Import module".
But when I try to import it, I got this error :
Error while importing module 'date_range': "Module loading date_range failed: file /tmp/tmpouueqfn4/date_range/security/ir.model.access.csv could not be processed:\n No matching record found for external id 'model_date_range' in field 'Object'\nNo matching record found for external id 'model_date_range_type' in field 'Object'\nNo matching record found for external id 'model_date_range' in field 'Object'\nNo matching record found for external id 'model_date_range_type' in field 'Object'\nMissing required value for the field 'Object' (model_id)\nMissing required value for the field 'Object' (model_id)\nMissing required value for the field 'Object' (model_id)\nMissing required value for the field 'Object' (model_id)"

If you can help, thanks :)

Migration to version 12.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-12.0

Modules to migrate

ValueError Expected singleton

Hello, with odoo 12.0 and mass_editing version 12.0.1.0.0 I received this error message
when try to set boolean flag "is_published" on product_template:

Traceback (most recent call last):
File "/home/odoo/v12/odoo/odoo/http.py", line 656, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/odoo/v12/odoo/odoo/http.py", line 314, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/home/odoo/v12/odoo/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/home/odoo/v12/odoo/odoo/http.py", line 698, in dispatch
result = self._call_function(**self.params)
File "/home/odoo/v12/odoo/odoo/http.py", line 346, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/odoo/v12/odoo/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/home/odoo/v12/odoo/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "/home/odoo/v12/odoo/odoo/http.py", line 941, in call
return self.method(*args, **kw)
File "/home/odoo/v12/odoo/odoo/http.py", line 519, in response_wrap
response = f(*args, **kw)
File "/home/odoo/v12/odoo/addons/web/controllers/main.py", line 962, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/home/odoo/v12/odoo/addons/web/controllers/main.py", line 954, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/odoo/v12/odoo/odoo/api.py", line 757, in call_kw
return _call_kw_model_create(method, model, args, kwargs)
File "/home/odoo/v12/odoo/odoo/api.py", line 737, in _call_kw_model_create
result = method(recs, *args, **kwargs)
File "", line 2, in create
File "/home/odoo/v12/odoo/odoo/api.py", line 440, in _model_create_single
return create(self, arg)
File "/home/odoo/v12/addons_extra/mass_editing/wizard/mass_editing_wizard.py", line 282, in create
self.env.context.get('active_ids')).write(values)
File "/home/odoo/v12/addons_extra/product_barcode/models/product_form.py", line 95, in write
code = "8099997{:0>5}".format(self.id)
File "/home/odoo/v12/odoo/odoo/fields.py", line 2887, in get
raise ValueError("Expected singleton: %s" % record)
ValueError: Expected singleton: product.template(456, 1923, 1926, 930, 1911, 1914, 460, 457, 458, 459, 928, 439, 440, 433, 434, 435, 432, 436, 431, 438, 437, 444, 445, 446, 441, 443, 442, 454, 929, 455, 449, 14786, 1917, 1920, 452, 925, 453, 447, 448, 450, 451, 486, 1924, 1927, 935, 1913, 1915, 490, 487, 488, 489, 933, 469, 470, 463, 464, 465, 462, 466, 461, 468, 467, 474, 475, 476, 471, 473, 472, 484, 934, 485, 479, 14787, 1918, 1921, 482, 932, 483, 477, 478)

How can I resolve the problem?
Thank you
Luca

[12.0] Crash in date_range when date.range.type without related date ranges

Steps to reproduce the crash on Odoo v12 with up-to-date date_range module from OCA/server-ux:

  1. Create a new date range type (and don't create date ranges that use it)
  2. Go to Invoicing > Customer > Invoices (or any object with a date field), click on "Filters > Add custom filter" then select "Invoice Date" and select the date range type that you created on step 1
  3. You get a crash:
2020-09-11 21:18:07,861 37017 INFO o2_test1 werkzeug: 127.0.0.1 - - [11/Sep/2020 21:18:07] "POST /web/dataset/search_read HTTP/1.1" 200 - 4 0.001 0.005
2020-09-11 21:18:07,908 37017 ERROR o2_test1 odoo.http: Exception during JSON request handling. 
Traceback (most recent call last):
  File "/home/alexis/new_boite/dev/odoo2/odoo/models.py", line 4741, in ensure_one
    _id, = self._ids
ValueError: not enough values to unpack (expected 1, got 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/alexis/new_boite/dev/odoo2/odoo/http.py", line 656, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/alexis/new_boite/dev/odoo2/odoo/http.py", line 314, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/home/alexis/new_boite/dev/odoo2/odoo/tools/pycompat.py", line 87, in reraise
    raise value
  File "/home/alexis/new_boite/dev/odoo2/odoo/http.py", line 698, in dispatch
    result = self._call_function(**self.params)
  File "/home/alexis/new_boite/dev/odoo2/odoo/http.py", line 346, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/alexis/new_boite/dev/odoo2/odoo/service/model.py", line 98, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/alexis/new_boite/dev/odoo2/odoo/http.py", line 339, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/alexis/new_boite/dev/odoo2/odoo/http.py", line 941, in __call__
    return self.method(*args, **kw)
  File "/home/alexis/new_boite/dev/odoo2/odoo/http.py", line 519, in response_wrap
    response = f(*args, **kw)
  File "/home/alexis/new_boite/dev/odoo2/addons/web/controllers/main.py", line 962, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/home/alexis/new_boite/dev/odoo2/addons/web/controllers/main.py", line 954, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/home/alexis/new_boite/dev/odoo2/odoo/api.py", line 759, in call_kw
    return _call_kw_multi(method, model, args, kwargs)
  File "/home/alexis/new_boite/dev/odoo2/odoo/api.py", line 746, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/home/alexis/new_boite/dev/server-ux2/date_range/models/date_range.py", line 91, in get_domain
    self.ensure_one()
  File "/home/alexis/new_boite/dev/odoo2/odoo/models.py", line 4744, in ensure_one
    raise ValueError("Expected singleton: %s" % self)
ValueError: Expected singleton: date.range()

Error installing mass editing v13

We get the following error when trying to install mass_editing_v13-13.0.1.1.0.zip on our odoo.sh v13 instance

2020-11-06 01:28:13,497 6 INFO al1p-patibio-development-1662485 odoo.modules.loading: loading 78 modules...
2020-11-06 01:28:13,652 6 CRITICAL al1p-patibio-development-1662485 odoo.modules.module: Couldn't load module mass_editing_v13
2020-11-06 01:28:13,661 6 CRITICAL al1p-patibio-development-1662485 odoo.modules.module: No module named 'odoo.addons.mass_editing'
2020-11-06 01:28:13,665 6 WARNING al1p-patibio-development-1662485 odoo.modules.loading: Transient module states were reset
2020-11-06 01:28:13,667 6 ERROR al1p-patibio-development-1662485 odoo.modules.registry: Failed to load registry
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/odoo/src/odoo/odoo/modules/loading.py", line 423, in load_modules
loaded_modules, update_module, models_to_check)
File "/home/odoo/src/odoo/odoo/modules/loading.py", line 315, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/home/odoo/src/odoo/odoo/modules/loading.py", line 182, in load_module_graph
load_openerp_module(package.name)
File "/home/odoo/src/odoo/odoo/modules/module.py", line 376, in load_openerp_module
import('odoo.addons.' + module_name)
File "/home/odoo/src/user/mass_editing_v13/init.py", line 7, in
from . import tests
File "/home/odoo/src/user/mass_editing_v13/tests/init.py", line 5, in
from . import test_mass_editing
File "/home/odoo/src/user/mass_editing_v13/tests/test_mass_editing.py", line 9, in
from odoo.addons.mass_editing.hooks import uninstall_hook
ModuleNotFoundError: No module named 'odoo.addons.mass_editing'
2020-11-06 01:28:13,668 6 CRITICAL al1p-patibio-development-1662485 odoo.service.server: Failed to initialize database al1p-patibio-development-1662485.
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/service/server.py", line 1190, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "/home/odoo/src/odoo/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/odoo/src/odoo/odoo/modules/loading.py", line 423, in load_modules
loaded_modules, update_module, models_to_check)
File "/home/odoo/src/odoo/odoo/modules/loading.py", line 315, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/home/odoo/src/odoo/odoo/modules/loading.py", line 182, in load_module_graph
load_openerp_module(package.name)
File "/home/odoo/src/odoo/odoo/modules/module.py", line 376, in load_openerp_module
import('odoo.addons.' + module_name)
File "/home/odoo/src/user/mass_editing_v13/init.py", line 7, in
from . import tests
File "/home/odoo/src/user/mass_editing_v13/tests/init.py", line 5, in
from . import test_mass_editing
File "/home/odoo/src/user/mass_editing_v13/tests/test_mass_editing.py", line 9, in
from odoo.addons.mass_editing.hooks import uninstall_hook
ModuleNotFoundError: No module named 'odoo.addons.mass_editing'

[13.0] [mass_editing] Can't change field if it has a domain

Hi,
I'm having trouble getting mass_editing to work on any field with a domain.

Here is an example of the stage_id field from the crm.lead model.

  • I created a mass.editing for crm.lead with the only affected field being stage_id, and I added it to the action menu:
    screenshot_2020-07-20_18:55:55

  • Next, I tried to apply it on a crm.lead. I immediately get this error:
    screenshot_2020-07-20_18:59:20

Error says team_id is not defined. I debugged it until it tried to evaluate the domain set on the field, then the exception was raised.

Is there an extra step I'm missing to make it work with fields that have a domain set?

[RFO] V12.0 - V13.0 base_search_custom_field_filter --> Group by?

Hi all,

I was wondering about the possibility to enhance/make a new module complementing base_search_custom_field_filter, but I'm not sure if that would be possible or not.

As you've been working on it just few days ago, and probably you remember how you developed this, do you think that having a similar structure as base_search_custom_field_filter could be possible for "group by" functionality instead?

Could you give me two pieces of advice as how do you think we should start working on it? Any clue?

Do you think this would be a useful feature for OCA?

IMO, it could be useful for "grouping by" some use cases.

Do you think a kind of "web_advanced_group_by", just like --> "https://github.com/OCA/web/tree/13.0/web_advanced_search " would be better instead?

Thanks!

date range error due to openupgrade

When installing or updating date range, the system gives an error.
We have included the openupgrdelib repository (https://github.com/OCA/openupgradelib.git)
but it is not recognized.
The error is:
`Error:
Odoo Server Error

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 650, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/usr/lib/python3/dist-packages/odoo/http.py", line 692, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 342, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 335, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 936, in call
return self.method(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 515, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 935, in call_button
action = self._call_kw(model, method, args, {})
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 923, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 689, in call_kw
return call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 680, in call_kw_multi
result = method(recs, *args, **kwargs)
File "", line 2, in button_immediate_upgrade
File "/usr/lib/python3/dist-packages/odoo/addons/base/module/module.py", line 71, in check_and_log
return method(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/base/module/module.py", line 602, in button_immediate_upgrade
return self._button_immediate_function(type(self).button_upgrade)
File "/usr/lib/python3/dist-packages/odoo/addons/base/module/module.py", line 541, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 85, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 367, in load_modules
force, status, report, loaded_modules, update_module, models_to_check)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 265, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 179, in load_module_graph
migrations.migrate_module(package, 'post')
File "/usr/lib/python3/dist-packages/odoo/modules/migration.py", line 168, in migrate_module
mod = load_script(pyfile, name)
File "/usr/lib/python3/dist-packages/odoo/modules/migration.py", line 45, in load_script
spec.loader.exec_module(module)
File "", line 673, in exec_module
File "", line 222, in _call_with_frames_removed
File "/mnt/OCA/server-ux/date_range/migrations/11.0.2.0.0/post-migration.py", line 4, in
from openupgradelib import openupgrade
ImportError: No module named 'openupgradelib'`

[12.0][Question] base_tier_validation: dynamic tiers validation possible?

@lreficent @jbeficent first of all, thank you for this fabulous modules,
I have tested also with base_tier_validation_formula which allow it to by dynamically select documents and users to approve, which is really great.

What if we don't know in advance, how many tiers it should have for validation? For dept A, 2 steps, for dept B 4 steps. Or when it need to go through org chart of HR levels.

How to cope with this?

[11.0] easy_switch_user Uncaught TypeError: this._rpc is not a function

I installed the module in the Enterprise edition I got this error :
Uncaught TypeError: this._rpc is not a function

http://localhost:8069/easy_switch_user/static/src/js/switch_user.js:26 Retraçage : TypeError: this._rpc is not a function at Class.loadUsers (http://localhost:8069/easy_switch_user/static/src/js/switch_user.js:26:25) at Class.start (http://localhost:8069/easy_switch_user/static/src/js/switch_user.js:22:18) at Class.prototype.(anonymous function) [as start] (http://localhost:8069/web/static/src/js/framework/class.js:89:38) at http://localhost:8069/web/static/src/js/framework/widget.js:193:25 at http://localhost:8069/web/static/lib/jquery/jquery.js:3276:89 at fire (http://localhost:8069/web/static/lib/jquery/jquery.js:3119:58) at Object.add [as done] (http://localhost:8069/web/static/lib/jquery/jquery.js:3165:49) at Array.<anonymous> (http://localhost:8069/web/static/lib/jquery/jquery.js:3275:77) at Function.each (http://localhost:8069/web/static/lib/jquery/jquery.js:383:58) at Object.<anonymous> (http://localhost:8069/web/static/lib/jquery/jquery.js:3272:56)

Issue installing date_range from pip

I am facing an error when trying to install the module 'date_range' in v11 from pip. See below:

pip install -r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt
Collecting odoo11-addon-date-range==11.0.1.0.0.99.dev3 (from -r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 3))
  Using cached odoo11_addon_date_range-11.0.1.0.0.99.dev3-py2.py3-none-any.whl
Collecting odoo11-addon-base-technical-features (from -r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 4))
  Using cached odoo11_addon_base_technical_features-11.0.1.0.0.99.dev1-py2.py3-none-any.whl
Obtaining odoo11_addon_auditlog from git+https://github.com/OCA/[email protected]#egg=odoo11_addon_auditlog&subdirectory=setup/auditlog (from -r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 6))
  Updating ./src/odoo11-addon-auditlog clone (to 11.0)
Obtaining odoo11_addon_mis_builder from git+https://github.com/OCA/[email protected]#egg=odoo11_addon_mis_builder&subdirectory=setup/mis_builder (from -r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 9))
  Updating ./src/odoo11-addon-mis-builder clone (to 11.0)
Obtaining odoo11_addon_mis_builder_budget from git+https://github.com/OCA/[email protected]#egg=odoo11_addon_mis_builder_budget&subdirectory=setup/mis_builder_budget (from -r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 10))
  Updating ./src/odoo11-addon-mis-builder-budget clone (to 11.0)
Obtaining odoo11_addon_mis_builder_demo from git+https://github.com/OCA/[email protected]#egg=odoo11_addon_mis_builder_demo&subdirectory=setup/mis_builder_demo (from -r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 11))
  Updating ./src/odoo11-addon-mis-builder-demo clone (to 11.0)
Obtaining odoo11_addon_web_responsive from git+https://github.com/OCA/[email protected]#egg=odoo11_addon_web_responsive&subdirectory=setup/web_responsive (from -r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 14))
  Updating ./src/odoo11-addon-web-responsive clone (to 11.0)
Obtaining odoo11_addon_web_environment_ribbon from git+https://github.com/OCA/[email protected]#egg=odoo11_addon_web_environment_ribbon&subdirectory=setup/web_environment_ribbon (from -r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 15))
  Updating ./src/odoo11-addon-web-environment-ribbon clone (to 11.0)
Obtaining odoo11_addon_web_sheet_full_width from git+https://github.com/OCA/[email protected]#egg=odoo11_addon_web_sheet_full_width&subdirectory=setup/web_sheet_full_width (from -r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 16))
  Updating ./src/odoo11-addon-web-sheet-full-width clone (to 11.0)
Obtaining odoo11_addon_account_financial_report from git+https://github.com/OCA/[email protected]#egg=odoo11_addon_account_financial_report&subdirectory=setup/account_financial_report (from -r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 19))
  Updating ./src/odoo11-addon-account-financial-report clone (to 11.0)
Obtaining odoo11_addon_account_tax_balance from git+https://github.com/OCA/[email protected]#egg=odoo11_addon_account_tax_balance&subdirectory=setup/account_tax_balance (from -r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 20))
  Updating ./src/odoo11-addon-account-tax-balance clone (to 11.0)
Collecting odoo<11.1dev,>=11.0a (from odoo11-addon-date-range==11.0.1.0.0.99.dev3->-r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 3))
  Could not find a version that satisfies the requirement odoo<11.1dev,>=11.0a (from odoo11-addon-date-range==11.0.1.0.0.99.dev3->-r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 3)) (from versions: )
No matching distribution found for odoo<11.1dev,>=11.0a (from odoo11-addon-date-range==11.0.1.0.0.99.dev3->-r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 3))

@sbidoul do you think that this may be related to the date_range module, or some other package, such as setuptools?

[RFC] Enhancement to base_tier_validation

We have the need to find a more flexible approval workflows engine. I want to try by extending this base_tier_validation first.

For example,

  • Tier that auto by pass with out approval, but instead call server action - #207
  • Option to "Escalate" to 3rd person #197
  • Option to Undo validation/rejection, when next step is not done (not doing it)
  • Persistent sub-state on document, for searching, reporting, etc. #203
  • More report on approval status (not doing it)
  • Audit trails, even if the flow is restarted (not doing it)
  • etc...

Sorry, it is still arbitrary ideas. But roughly, a more flexibility version of approval workflow.

I will starting doing it one by one, some as enhancement, and some as module as it deem appropriate.

cc @LoisRForgeFlow, @pedrobaeza


Additional Improvements (added 14-Oct-2020)

  • Replace notification system tray, with Odoo's Activity infrastrucgture.
  • Revisit Base Tier Validation Helper (to group many tiers in a validation.type object for ease of management + more control)
  • Auto start validation workflow, based on approving document status (i.e., Purchase Order is RFQ sent, start validation process)
  • New reviewers selection option, that read HR Employee tables to get the eligible employee for validation condition (i.e., department, approval limit of each employee)
  • Tier Validation Substate enhancements, i.e., better looking UI of substate, no manual substate change, etc.
  • Customised validation error messages - Business Messages rather than the system ones (explore base_exception)

[12.0][ADD] any module to allow hiding print menu based on context passed in action?

I would like to create new module "report_hide_menu_by_context". Objective is to hide report action based on value in context. For example, when click on Customer Invoice menu, with context type='out_invoice', this should hide vendor bill form and show only customer invoice form.

Is this kind of module already exists? Any idea/suggestion?

[11.0-mass_editing] missing field labels

I've added a mass editing template for product.template and in the mass_editing wizard all the field labels are missing except for the many2many fields where there is a separator tag.
Is that something you encounter also?

products mass editing V11 CE error on adding fields

When adding fields for Product template:
getting the following

Error:
Odoo Server Error

Traceback (most recent call last):
File "/odoo/odoo-server/odoo/http.py", line 651, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/odoo/odoo-server/odoo/http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/odoo/odoo-server/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/odoo/odoo-server/odoo/http.py", line 693, in dispatch
result = self._call_function(**self.params)
File "/odoo/odoo-server/odoo/http.py", line 342, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/odoo/odoo-server/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/odoo/odoo-server/odoo/http.py", line 335, in checked_call
result = self.endpoint(*a, **kw)
File "/odoo/odoo-server/odoo/http.py", line 937, in call
return self.method(*args, **kw)
File "/odoo/odoo-server/odoo/http.py", line 515, in response_wrap
response = f(*args, **kw)
File "/odoo/odoo-server/addons/web/controllers/main.py", line 876, in search_read
return self.do_search_read(model, fields, offset, limit, domain, sort)
File "/odoo/odoo-server/addons/web/controllers/main.py", line 898, in do_search_read
offset=offset or 0, limit=limit or False, order=sort or False)
File "/odoo/odoo-server/odoo/models.py", line 4223, in search_read
records = self.search(domain or [], offset=offset, limit=limit, order=order)
File "/odoo/odoo-server/odoo/addons/mass_editing/models/ir_model_fields.py", line 24, in search
File "/odoo/odoo-server/odoo/models.py", line 1481, in search
res = self._search(args, offset=offset, limit=limit, order=order, count=count)
File "/odoo/odoo-server/odoo/models.py", line 3774, in _search
query = self._where_calc(args)
File "/odoo/odoo-server/odoo/models.py", line 3564, in _where_calc
e = expression.expression(domain, self)
File "/odoo/odoo-server/odoo/osv/expression.py", line 668, in init
self.parse()
File "/odoo/odoo-server/odoo/osv/expression.py", line 846, in parse
raise ValueError("Invalid field %r in leaf %r" % (left, str(leaf)))
ValueError: Invalid field 'mass_editing_domain' in leaf "<osv.ExtendedLeaf: ('mass_editing_domain', 'in', '[146]') on ir_model_fields (ctx: )>"

Migration to version 14.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-14.0

Modules to migrate

  • barcode_action
  • base_action_visibility_restriction - By @dessanhemrayev - #626
  • base_archive_date - By @GuillemCForgeFlow - #683
  • base_export_manager
  • base_search_custom_field_filter
  • base_technical_features - By @p-tombez - #229
  • base_tier_validation
  • base_tier_validation_formula
  • chained_swapper - By @schhatbar-initos - #293
  • date_range
  • default_multi_user
  • document_quick_access
  • document_quick_access_folder_auto_classification
  • filter_multi_user
  • mass_editing - By @ivantodorovich - #255
  • mass_operation_abstract
  • multi_step_wizard
  • sequence_reset_period
  • web_archive_date - By @GuillemCForgeFlow - #684

Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list

Migration to version 13.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-13.0

Modules to migrate

Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list

[12.0] Unable to reject record when review type is set to expression

I've only tested this in version 12.0 but it might also be an issues in other versions.

OCA modules required to reproduce this issue:

  • purchase-workflow/purchase_request
  • purchase-workflow/purchase_request_tier_validation
  • server-ux/base_tier_validation
  • server-ux/base_tier_validation_formula

Assuming you have two users named, User1 and User2. Both users also need to have access to the purchase_request module.

To reproduce:

  • Create a tier definition with the following:
    • Referenced Model: Purchase Request
    • Validated By: Python Expression
    • Python Expression: rec.env['res.users'].search([('name', '=', 'User2')])
    • Definition: Domain
    • Definition Domain: Match all records
  • Login with User1 create a new Purchase Request and click on the Request Validation button
  • Login with User2, navigate to the newly created purchase request and click on the Reject button.

Expected:

The purchase request should be rejected

What's happening:

Nothing. When the reviewer clicks on the Reject button nothing happens.

Details:

At first I thought this might be a bug with the purchase_request_tier_validation module. However, after digging around, I've discovered that it's an issue with the rejection code in the base_tier_validation modules.

I'll be submitting a PR with my solution to this problem but I would like some feedback on my approach as I'm new to Odoo development.

The issue lies with the _rejected_tier method on the tier.validation model. When it filters the review records it only checks the user against the review record's reviewer_id and reviewer_group_id which are only set when the review type is individual or group (See here). It should instead be checking if the current user is in reviewer_ids like the validation method _validate_tier does (See here).

[12.0][mass_editing] Error while updating from 12.0.1.0.0 to 12.0.1.1.0

When trying to Update via Apps, I get the following error:

Odoo Server Error

Traceback (most recent call last):
File "/home/odoo12/odoo/odoo/models.py", line 1108, in _validate_fields
check(self)
File "/home/odoo12/odoo/odoo/addons/base/models/ir_ui_view.py", line 351, in _check_xml
self.postprocess_and_fields(view.model, view_doc, view.id)
File "/home/odoo12/odoo/odoo/addons/base/models/ir_ui_view.py", line 1096, in postprocess_and_fields
self.raise_view_error(message, view_id)
File "/home/odoo12/odoo/odoo/addons/base/models/ir_ui_view.py", line 548, in raise_view_error
raise ValueError(message)
ValueError: Das Feld group_ids existiert nicht

Fehler Kontext:
Ansicht mass.object.form
[view_id: 3326, xml_id: mass_editing.view_mass_object_form, model: mass.object, parent_id: k. A.]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/odoo12/odoo/odoo/tools/convert.py", line 758, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "/home/odoo12/odoo/odoo/tools/convert.py", line 663, in _tag_record
record = model.with_context(rec_context)._load_records([data], self.mode == 'update')
File "/home/odoo12/odoo/odoo/models.py", line 3838, in _load_records
data['record']._load_records_write(data['values'])
File "/home/odoo12/odoo/odoo/models.py", line 3776, in _load_records_write
self.write(values)
File "/home/odoo12/odoo/odoo/addons/base/models/ir_ui_view.py", line 444, in write
return super(View, self).write(self._compute_defaults(vals))
File "/home/odoo12/odoo/odoo/models.py", line 3347, in write
fields[0].determine_inverse(records)
File "/home/odoo12/odoo/odoo/fields.py", line 1117, in determine_inverse
getattr(records, self.inverse)()
File "/home/odoo12/odoo/odoo/addons/base/models/ir_ui_view.py", line 275, in _inverse_arch
view.write(data)
File "/home/odoo12/odoo/odoo/addons/base/models/ir_ui_view.py", line 444, in write
return super(View, self).write(self._compute_defaults(vals))
File "/home/odoo12/odoo/odoo/models.py", line 3321, in write
self._write(store_vals)
File "/home/odoo12/odoo/odoo/models.py", line 3457, in _write
self._validate_fields(vals)
File "/home/odoo12/odoo/odoo/models.py", line 1112, in validate_fields
raise ValidationError("%s\n\n%s" % (
("Error while validating constraint"), tools.ustr(e)))
odoo.exceptions.ValidationError: ('Fehler während der Constraint-Validierung\n\nDas Feld group_ids existiert nicht\n\nFehler Kontext:\nAnsicht mass.object.form\n[view_id: 3326, xml_id: mass_editing.view_mass_object_form, model: mass.object, parent_id: k. A.]', None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/odoo12/odoo/odoo/http.py", line 654, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/odoo12/odoo/odoo/http.py", line 312, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/home/odoo12/odoo/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/home/odoo12/odoo/odoo/http.py", line 696, in dispatch
result = self._call_function(**self.params)
File "/home/odoo12/odoo/odoo/http.py", line 344, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/odoo12/odoo/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/home/odoo12/odoo/odoo/http.py", line 337, in checked_call
result = self.endpoint(*a, **kw)
File "/home/odoo12/odoo/odoo/http.py", line 939, in call
return self.method(*args, **kw)
File "/home/odoo12/odoo/odoo/http.py", line 517, in response_wrap
response = f(*args, **kw)
File "/home/odoo12/odoo/addons/web/controllers/main.py", line 962, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/home/odoo12/odoo/addons/web/controllers/main.py", line 954, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/odoo12/odoo/odoo/api.py", line 749, in call_kw
return _call_kw_multi(method, model, args, kwargs)
File "/home/odoo12/odoo/odoo/api.py", line 736, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "", line 2, in button_immediate_upgrade
File "/home/odoo12/odoo/odoo/addons/base/models/ir_module.py", line 74, in check_and_log
return method(self, *args, **kwargs)
File "/home/odoo12/odoo/odoo/addons/base/models/ir_module.py", line 622, in button_immediate_upgrade
return self._button_immediate_function(type(self).button_upgrade)
File "/home/odoo12/odoo/odoo/addons/base/models/ir_module.py", line 561, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/home/odoo12/odoo/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/odoo12/odoo/odoo/modules/loading.py", line 417, in load_modules
force, status, report, loaded_modules, update_module, models_to_check)
File "/home/odoo12/odoo/odoo/modules/loading.py", line 313, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/home/odoo12/odoo/odoo/modules/loading.py", line 222, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package, report=report)
File "/home/odoo12/odoo/odoo/modules/loading.py", line 68, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)
File "/home/odoo12/odoo/odoo/tools/convert.py", line 802, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/home/odoo12/odoo/odoo/tools/convert.py", line 865, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "/home/odoo12/odoo/odoo/tools/convert.py", line 764, in parse
exc_info[2]
File "/home/odoo12/odoo/odoo/tools/pycompat.py", line 86, in reraise
raise value.with_traceback(tb)
File "/home/odoo12/odoo/odoo/tools/convert.py", line 758, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "/home/odoo12/odoo/odoo/tools/convert.py", line 663, in _tag_record
record = model.with_context(rec_context)._load_records([data], self.mode == 'update')
File "/home/odoo12/odoo/odoo/models.py", line 3838, in _load_records
data['record']._load_records_write(data['values'])
File "/home/odoo12/odoo/odoo/models.py", line 3776, in _load_records_write
self.write(values)
File "/home/odoo12/odoo/odoo/addons/base/models/ir_ui_view.py", line 444, in write
return super(View, self).write(self._compute_defaults(vals))
File "/home/odoo12/odoo/odoo/models.py", line 3347, in write
fields[0].determine_inverse(records)
File "/home/odoo12/odoo/odoo/fields.py", line 1117, in determine_inverse
getattr(records, self.inverse)()
File "/home/odoo12/odoo/odoo/addons/base/models/ir_ui_view.py", line 275, in _inverse_arch
view.write(data)
File "/home/odoo12/odoo/odoo/addons/base/models/ir_ui_view.py", line 444, in write
return super(View, self).write(self._compute_defaults(vals))
File "/home/odoo12/odoo/odoo/models.py", line 3321, in write
self._write(store_vals)
File "/home/odoo12/odoo/odoo/models.py", line 3457, in _write
self._validate_fields(vals)
File "/home/odoo12/odoo/odoo/models.py", line 1112, in validate_fields
raise ValidationError("%s\n\n%s" % (
("Error while validating constraint"), tools.ustr(e)))
odoo.tools.convert.ParseError: "Fehler während der Constraint-Validierung

Das Feld group_ids existiert nicht

Fehler Kontext:
Ansicht mass.object.form
[view_id: 3326, xml_id: mass_editing.view_mass_object_form, model: mass.object, parent_id: k. A.]
None" while parsing /home/odoo12/custom/addons-extra/mass_editing/views/mass_editing_view.xml:4, near

mass.object.form
mass.object






































Are there additional dependencies? If so, which?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.