Code Monkey home page Code Monkey logo

sale-reporting'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

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

sale-reporting's Issues

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

[11.0 -> 12.0] Fail to migrate sale_layout_category_hide_detail

Hi guys!!...when trying to migrate a 11.0 db backup i found this error:

2019-11-15 21:52:19,662 32511 CRITICAL AP12.0a odoo.service.server: Failed to initialize database AP12.0a.
Traceback (most recent call last):
File "/home/gloobal/PycharmProjects/Developments/migration/openupgrade/odoo/service/server.py", line 1118, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "/home/gloobal/PycharmProjects/Developments/migration/openupgrade/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/gloobal/PycharmProjects/Developments/migration/openupgrade/odoo/modules/loading.py", line 476, in load_modules
force, status, report, loaded_modules, update_module, models_to_check, upg_registry)
File "/home/gloobal/PycharmProjects/Developments/migration/openupgrade/odoo/modules/loading.py", line 360, in load_marked_modules
upg_registry=upg_registry,
File "/home/gloobal/PycharmProjects/Developments/migration/openupgrade/odoo/modules/loading.py", line 194, in load_module_graph
migrations.migrate_module(package, 'pre')
File "/home/gloobal/PycharmProjects/Developments/migration/openupgrade/odoo/modules/migration.py", line 199, in migrate_module
migrate(self.cr, installed_version)
File "/usr/local/lib/python3.6/dist-packages/openupgradelib-3.0.0-py3.6.egg/openupgradelib/openupgrade.py", line 1691, in wrapped_function
if use_env2 else cr, version)
File "/home/gloobal/PycharmProjects/Developments/gloobal-addons/oca_modules/sale-reporting/sale_layout_category_hide_detail/migrations/12.0.1.0.0/pre-migration.py", line 17, in migrate
""",
File "/usr/local/lib/python3.6/dist-packages/openupgradelib-3.0.0-py3.6.egg/openupgradelib/openupgrade.py", line 1158, in logged_query
cr.execute(query, args)
File "/home/gloobal/PycharmProjects/Developments/migration/openupgrade/odoo/sql_db.py", line 148, in wrapper
return f(self, *args, **kwargs)
File "/home/gloobal/PycharmProjects/Developments/migration/openupgrade/odoo/sql_db.py", line 225, in execute
res = self._obj.execute(query, params)
psycopg2.ProgrammingError: column "show_details" of relation "sale_order_line" does not exist

Worth mentioning this module was installed in previous version...this error tells me that new fields are not created when this sql update is running...any ideas?..thanks in advance.

Migration to version 15.0

Todo

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

Modules to migrate

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

Migration to version 14.0

Todo

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

Modules to migrate

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

[8.0] Sale Order Total amount minus delivered

Hi all,

I would like to ask about real information in sale orders about which amount of them is really pending to invoices.

Let say you sell 100 iMacs, then you will earn 160.000€ because each iMac cost 1600€. Then you make a partial delivery of 50 iMacs and you Invoice them. This means you invoice 80.000€ you in sale order left 50 iMacs to delivery and 80.000€ to invoice.

Now imagine you have hundreds of sale orders, result is that information given in sale order differs of the real price amount of sale orders that you will invoice. As you see thousands of euros for invoicing but really not because you have already sent an invoice some most of them.

Very thanks for opinions

Regards

[10.0] AttributeError: 'res.partner' object has no attribute 'comment_template_id'

I used sale_comment_template on Odoo 10, when I chose Customer in Sales Order an error occurred:

Traceback (most recent call last): File "/home/imbar/opt/odoo10-git/odoo/http.py", line 642, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/home/imbar/opt/odoo10-git/odoo/http.py", line 684, in dispatch result = self._call_function(**self.params) File "/home/imbar/opt/odoo10-git/odoo/http.py", line 334, in _call_function return checked_call(self.db, *args, **kwargs) File "/home/imbar/opt/odoo10-git/odoo/service/model.py", line 101, in wrapper return f(dbname, *args, **kwargs) File "/home/imbar/opt/odoo10-git/odoo/http.py", line 327, in checked_call result = self.endpoint(*a, **kw) File "/home/imbar/opt/odoo10-git/odoo/http.py", line 942, in __call__ return self.method(*args, **kw) File "/home/imbar/opt/odoo10-git/odoo/http.py", line 507, in response_wrap response = f(*args, **kw) File "/home/imbar/opt/odoo10-git/addons/web/controllers/main.py", line 895, in call_kw return self._call_kw(model, method, args, kwargs) File "/home/imbar/opt/odoo10-git/addons/web/controllers/main.py", line 887, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/home/imbar/opt/odoo10-git/odoo/api.py", line 689, in call_kw return call_kw_multi(method, model, args, kwargs) File "/home/imbar/opt/odoo10-git/odoo/api.py", line 680, in call_kw_multi result = method(recs, *args, **kwargs) File "/home/imbar/opt/odoo10-git/odoo/models.py", line 5555, in onchange record._onchange_eval(name, field_onchange[name], result) File "/home/imbar/opt/odoo10-git/odoo/models.py", line 5453, in _onchange_eval method_res = method(self) File "/xxxxxxxxxxxxxxxxxxxx/sale_comment_template/models/sale_order.py", line 47, in onchange_partner_id_sale_comment comment_template = self.partner_id.comment_template_id AttributeError: 'res.partner' object has no attribute 'comment_template_id'

I searched with VS Code, I couldn't find comment_template_id in all modules

Section page break

Hello,

Perhaps I'm missing something, but in Odoo V11, layout sections could get a page break before.
Sometime, a section begins at the end of a page and gets another part on the next page, it vene happens that a section is on one page and only its subtotal line on the next one, or the other way around, a section title is on a page and the section content on the next one.
Wouldn't it be nice to get back the page-break feature ?

Thanks

Regards

[16] sale_report_delivered - Sales standard report lost when installing the module

Module

sale_report_delivered

Describe the bug

The default sales report is lost when the module is installed.

To Reproduce

Affected versions:
16 at least

Steps to reproduce the behavior:

  1. Before installing the module sale_report_delivered, review the default sales report. It is not accessed from a submenu, but from the Sales Report menu.
    image
  2. Install the module sale_report_delivered
  3. When you click on the Sales Reporting menu, the "Sales from deliveries" submenu appears, but you have lost access to the default report.
    image
    image
    https://www.loom.com/share/5cb44d89b41b4d2bad0238d3e188fb18?sid=ae8ef319-9d5d-4538-88a7-8f82dc6b8fae

Expected behavior
Clicking on the Report menu should display the 2 reports. The standard report and the Sales from Deliveries report.

@sergio-teruel
@moduon MT-3600

Migration to version 16.0

Todo

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

Modules to migrate

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

[12.0] Fail to use sale_layout_category_hide_detail

Hi guys, i installed the sale_layout_category_hide_detail module in a 12.0 instance and it was fine but when i tried to open a sale order got an error in js file sale_layout_category_hide_detail.js:

var SectionAndNoteListRenderer = {
_renderBodyCell: function (record, node, index, options) {
var $cell = this._super.apply(this, arguments);

        var options = this.state.fieldsInfo.list[node.attrs.name].options;
        var show_in_line_section = options.show_in_line_section;

        var isSection = record.data.display_type === 'line_section';
        var isNote = record.data.display_type === 'line_note';
        if (isSection || isNote) {
            if (show_in_line_section) {
                return $cell.removeClass('o_hidden');

And the error wizard in odoo shows that attribute option does not exist. Also get this error in browser console:

web.assets_backend.js:3234 Could not get content for /delivery/static/src/js/hide_details_translations.js defined in bundle 'web.assets_backend'.

And this errors only comes with this module installation. Checking the runbot oca instances for this module only get the second error but not the first one. Any help for this? thanks so much!

[15] sale_layout_category_hide_detail shows an error when installling

In odoo 15 sale_layout_category_hide_detail shows an error when installling

Module

sale_layout_category_hide_detail

Describe the bug

shows this error when installing

RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 683, in _tag_root
f(rec)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 661, in _tag_template
return self._tag_record(record)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 586, in _tag_record
record = model._load_records([data], self.mode == 'update')
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4431, in _load_records
records = self._load_records_create([data['values'] for data in to_create])
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4347, in _load_records_create
return self.create(values)
File "", line 2, in create
File "/usr/lib/python3/dist-packages/odoo/api.py", line 413, in _model_create_multi
return create(self, arg)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 546, in create
result = super(View, self.with_context(ir_ui_view_partial_validation=True)).create(vals_list)
File "", line 2, in create
File "/usr/lib/python3/dist-packages/odoo/api.py", line 413, in _model_create_multi
return create(self, arg)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_fields.py", line 613, in create
recs = super().create(vals_list)
File "", line 2, in create
File "/usr/lib/python3/dist-packages/odoo/api.py", line 413, in _model_create_multi
return create(self, arg)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4079, in create
records = self._create(data_list)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4244, in _create
records._validate_fields(name for data in data_list for name in data['stored'])
File "/usr/lib/python3/dist-packages/odoo/models.py", line 1367, in _validate_fields
check(self)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 437, in _check_xml
raise err from None
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 428, in _check_xml
combined_arch = view._get_combined_arch()
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 991, in _get_combined_arch
arch = root.with_prefetch(tree_views._prefetch_ids)._combine(hierarchy)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 932, in _combine
combined_arch = view.apply_inheritance_specs(combined_arch, arch)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 869, in apply_inheritance_specs
self._raise_view_error(str(e), specs_tree)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 746, in _raise_view_error
raise err from from_exception
odoo.exceptions.ValidationError: Ocurrió un error al validar la vista:

El elemento '' no puede ser localizado en la vista padre

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 687, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 359, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 348, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 916, in call
return self.method(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 535, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1346, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1334, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 464, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 451, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "", line 2, in button_immediate_install
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 74, in check_and_log
return method(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 486, in button_immediate_install
return self._button_immediate_function(type(self).button_install)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 603, in _button_immediate_function
registry = modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 87, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 474, in load_modules
processed_modules += load_marked_modules(cr, graph,
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 363, in load_marked_modules
loaded, processed = load_module_graph(
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 222, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 69, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 748, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 814, in convert_xml_import
obj.parse(doc.getroot())
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 734, in parse
self._tag_root(de)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 694, in _tag_root
raise ParseError(msg) from None # Restart with "--log-handler odoo.tools.convert:DEBUG" for complete traceback
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 643, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 301, in _handle_exception
raise exception.with_traceback(None) from new_cause
odoo.tools.convert.ParseError: while parsing None:8
Ocurrió un error al validar la vista:

El elemento '' no puede ser localizado en la vista padre

View error context:
{'file': '/mnt/extra-addons/sale-reporting/sale_layout_category_hide_detail/views/invoice_report_templates.xml',
'line': 2,
'name': 'report_invoice_document_hide_detail',
'view': ir.ui.view(2428,),
'view.model': False,
'view.parent': ir.ui.view(1021,),
'xmlid': 'report_invoice_document_hide_detail'}

To Reproduce

15

Steps to reproduce the behavior:

  1. install

Expected behavior
th module working
Additional context

Migration to version 17.0

Todo

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

Modules to migrate

  • product_sold_by_delivery_week
  • sale_comment_template
  • sale_layout_category_hide_detail - By @jeroenev - #253
  • sale_order_line_position - By @xaviedoanhduy - #264
  • sale_order_product_recommendation_product_sold_by_delivery_week
  • sale_order_report_product_image
  • sale_packaging_report
  • sale_report_delivered
  • sale_report_delivered_subtotal
  • sale_report_delivered_volume

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

sale_layout_category_hide_detail error at install

Module

sale_layout_category_hide_detail

Describe the bug

The module generates an error when installed on a 16.0 database
image

To Reproduce

16.0:

Steps to reproduce the behavior:

  1. Install the module on a 16.0 sh database

Expected behavior
No installation errors

Additional context
The error seems to be a missing image file, this code is supposed to get a file using an xml_id but receives 'undefined' instead of an actual ID.

Incompatibility bug of the sale_order_invoice_date module with the POS module

Module

The name of the module that has a bug.
sale_order_invoice_date

Describe the bug

Incompatibility bug of the sale_order_invoice_date module with the POS module

To Reproduce

Affected versions: 14.0

Steps to reproduce the behavior:

  1. Install POS module
  2. Install sale_order_invoice_date, an error will appear

Expected behavior
To be able to install the module "sale_order_invoice_date" while POS module is installed

Additional context

The error message:
File "/usr/local/lib/python3.8/site-packages/odoo/addons/sale/report/sale_report.py", line 168, in init
self.env.cr.execute("""CREATE or REPLACE VIEW %s as (%s)""" % (self._table, self._query()))
File "", line 2, in execute
File "/usr/local/lib/python3.8/site-packages/odoo/sql_db.py", line 101, in check
return f(self, *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/odoo/sql_db.py", line 301, in execute
res = self._obj.execute(query, params)
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/odoo/http.py", line 652, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/local/lib/python3.8/site-packages/odoo/http.py", line 317, in _handle_exception
raise exception.with_traceback(None) from new_cause
psycopg2.errors.SyntaxError: each UNION query must have the same number of columns
LINE 71: -MIN(l.id) AS id,
^

Error Installation Sale layout category hide detail

Module

Sale layout category hide detail

Describe the bug

RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/opt/odoo16/odoo/odoo/http.py", line 1591, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/opt/odoo16/odoo/odoo/service/model.py", line 133, in retrying
result = func()
File "/opt/odoo16/odoo/odoo/http.py", line 1618, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/opt/odoo16/odoo/odoo/http.py", line 1822, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/opt/odoo16/odoo/addons/website/models/ir_http.py", line 237, in _dispatch
response = super()._dispatch(endpoint)
File "/opt/odoo16/odoo/odoo/addons/base/models/ir_http.py", line 154, in _dispatch
result = endpoint(**request.params)
File "/opt/odoo16/odoo/odoo/http.py", line 697, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/opt/odoo16/odoo/addons/web/controllers/dataset.py", line 46, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/opt/odoo16/odoo/addons/web/controllers/dataset.py", line 33, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo16/odoo/odoo/api.py", line 466, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/opt/odoo16/odoo/odoo/api.py", line 453, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "", line 2, in button_immediate_install
File "/opt/odoo16/odoo/odoo/addons/base/models/ir_module.py", line 74, in check_and_log
return method(self, *args, **kwargs)
File "/opt/odoo16/odoo/odoo/addons/base/models/ir_module.py", line 468, in button_immediate_install
return self._button_immediate_function(type(self).button_install)
File "/opt/odoo16/odoo/odoo/addons/base/models/ir_module.py", line 592, in _button_immediate_function
registry = modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "", line 2, in new
File "/opt/odoo16/odoo/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "/opt/odoo16/odoo/odoo/modules/registry.py", line 90, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/opt/odoo16/odoo/odoo/modules/loading.py", line 488, in load_modules
processed_modules += load_marked_modules(cr, graph,
File "/opt/odoo16/odoo/odoo/modules/loading.py", line 372, in load_marked_modules
loaded, processed = load_module_graph(
File "/opt/odoo16/odoo/odoo/modules/loading.py", line 231, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package)
File "/opt/odoo16/odoo/odoo/modules/loading.py", line 71, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
File "/opt/odoo16/odoo/odoo/tools/convert.py", line 763, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate)
File "/opt/odoo16/odoo/odoo/tools/convert.py", line 829, in convert_xml_import
obj.parse(doc.getroot())
File "/opt/odoo16/odoo/odoo/tools/convert.py", line 749, in parse
self._tag_root(de)
File "/opt/odoo16/odoo/odoo/tools/convert.py", line 709, in _tag_root
raise ParseError(msg) from None # Restart with "--log-handler odoo.tools.convert:DEBUG" for complete traceback
odoo.tools.convert.ParseError: while parsing None:8
Ocurrió un error al validar la vista:

El elemento '' no puede ser localizado en la vista padre

View error context:
{'file': '/opt/odoo16/odoo-custom-addons/sale_layout_category_hide_detail/views/invoice_report_templates.xml',
'line': 2,
'name': 'report_invoice_document_hide_detail',
'view': ir.ui.view(3563,),
'view.model': False,
'view.parent': ir.ui.view(771,),
'xmlid': 'report_invoice_document_hide_detail'}

The above server error caused the following client error:
RPC_ERROR://odoo.itechcloudservices.com/web/assets/5611-f888c5c/web.assets_backend.min.js:991:163)
at XMLHttpRequest. (https://odoo.itechcloudservices.com/web/assets/5611-f888c5c/web.assets_backend.min.js:999:13)

To Reproduce

Affected versions: 16.0

Error in report_saleorder.xml template

Module

sale_comment_template

Describe the bug

Installation is ok, but when you try to print a sale order with comments it raises an error because de template has an erroneous expression (

)

To Reproduce

Affected versions: 14.0

Steps to reproduce the behavior:

  1. Install module
  2. Create a template from Sales > Configuration > Comments..
  3. Create / edit a sale order and link created comments above.
  4. Print sale order report

Expected behavior
Sale order report must print configured "Comments" (on top/bottom as defined) but it raises an error:
Odoo Server Error
Traceback (most recent call last):
File "/odoo/odoo-server/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn
return compiled(self, append, new, options, log)
File "", line 1, in template_sale_report_saleorder_document_1838
File "", line 2, in body_call_content_1836
File "", line 1, in foreach_1835
AttributeError: 'sale.order' object has no attribute 'render_comment'

Additional context
There are other related modules (account_comment_template) running fine. The problem is in module template (sale_comment_template/views/report_saleorder.xml):

THIS ONE FAILS
THIS ONE RUNS

[14.0] [sale_comment_template] unable to generate invoice form order or quotation

Module

sale_comment_template

Describe the bug

A. Not possible to create a sale order
B. Not possible to generate an invoice from the sale order

To Reproduce

case A

  1. create an order.
  2. get error number 1

case B

  1. edit an existing order.
  2. add comments
  3. click on "create invoice"
  4. get error number 2

Expected behavior
an invoice is created with the comments defined in the order

Additional context

Error number 1:
Odoo Server Error

Traceback (most recent call last):
  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/home/odoo/src/odoo/odoo/http.py", line 684, in dispatch
    result = self._call_function(**self.params)
  File "/home/odoo/src/odoo/odoo/http.py", line 360, 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 348, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/odoo/src/odoo/odoo/http.py", line 913, in __call__
    return self.method(*args, **kw)
  File "/home/odoo/src/odoo/odoo/http.py", line 532, in response_wrap
    response = f(*args, **kw)
  File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 1392, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 1384, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/home/odoo/src/odoo/odoo/api.py", line 399, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/home/odoo/src/odoo/odoo/api.py", line 386, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/home/odoo/src/odoo/odoo/models.py", line 6253, in onchange
    record._onchange_eval(name, field_onchange[name], result)
  File "/home/odoo/src/odoo/odoo/models.py", line 5995, in _onchange_eval
    method_res = method(self)
  File "/home/odoo/src/user/sale_comment_template/models/sale_order.py", line 48, in onchange_partner_id_sale_comment
    comment_template = self.partner_id.property_comment_template_id
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/odoo/src/odoo/odoo/http.py", line 640, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/odoo/src/odoo/odoo/http.py", line 316, in _handle_exception
    raise exception.with_traceback(None) from new_cause
AttributeError: 'res.partner' object has no attribute 'property_comment_template_id'
Error number 2:
Odoo Server Error

Traceback (most recent call last):
  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/home/odoo/src/odoo/odoo/http.py", line 684, in dispatch
    result = self._call_function(**self.params)
  File "/home/odoo/src/odoo/odoo/http.py", line 360, 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 348, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/odoo/src/odoo/odoo/http.py", line 913, in __call__
    return self.method(*args, **kw)
  File "/home/odoo/src/odoo/odoo/http.py", line 532, in response_wrap
    response = f(*args, **kw)
  File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 1396, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 1384, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/home/odoo/src/odoo/odoo/api.py", line 399, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/home/odoo/src/odoo/odoo/api.py", line 386, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/home/odoo/src/odoo/addons/sale/wizard/sale_make_invoice_advance.py", line 161, in create_invoices
    sale_orders._create_invoices(final=self.deduct_down_payments)
  File "/home/odoo/src/odoo/addons/sale/models/sale.py", line 787, in _create_invoices
    moves = self.env['account.move'].sudo().with_context(default_move_type='out_invoice').create(invoice_vals_list)
  File "<decorator-gen-174>", line 2, in create
  File "/home/odoo/src/odoo/odoo/api.py", line 348, in _model_create_multi
    return create(self, arg)
  File "/home/odoo/src/odoo/addons/account/models/account_move.py", line 1968, in create
    vals_list = self._move_autocomplete_invoice_lines_create(vals_list)
  File "/home/odoo/src/odoo/addons/account/models/account_move.py", line 1918, in _move_autocomplete_invoice_lines_create
    move = self_ctx.new(vals)
  File "/home/odoo/src/odoo/odoo/models.py", line 5515, in new
    record._update_cache(values, validate=False)
  File "/home/odoo/src/odoo/odoo/models.py", line 5157, in _update_cache
    raise ValueError("Invalid field %r on model %r" % (e.args[0], self._name))
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/odoo/src/odoo/odoo/http.py", line 640, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/odoo/src/odoo/odoo/http.py", line 316, in _handle_exception
    raise exception.with_traceback(None) from new_cause
ValueError: Invalid field 'comment_template1_id' on model 'account.move'

[11.0 -> 12.0] Fail to migrate to 12.0

Hi guys!..when migrate my 11.0 backup and fix some own problems i got this problem with sale_layout_category_hide_detail:

Uncaught TypeError: Cannot read property 'options' of undefined
at Class.renderHeaderCell (web.assets_backend.js:3517)
at Class.renderHeaderCell (web.assets_common.js:3541)
at Function.
.map.
.collect (web.assets_common.js:13)
at Class._renderHeader (web.assets_backend.js:1963)
at Class._renderView (web.assets_backend.js:1973)
at Class.prototype.(anonymous function) (http://localhost:8069/web/content/6439-ac471f7/web.assets_common.js:3538:488)
at Class._renderView (web.assets_backend.js:1915)
at Class. (web.assets_common.js:3541)
at Class._renderView (web.assets_backend.js:3295)
at Class._renderView (web.assets_common.js:3541)

I suppose that this error comes from this module because the traceback in debugger console and a js file call the miss attribute 'options'. Any ideas?...thanks in advance

Installation Error

Ive tried multiple times to install the module and it keep getting errors

17.0-mig-sale_layout_category_hide_detail

ive tried to get the app installed but it just wont work- i had the hosting co update odoo and try install it and they also get the following error: https://prnt.sc/cS4Xb0Uo0LRE

Could you please tell me what update of odoo is required? i really really need this for our sales orders and ive been struggling for weeks and i just cant get it working?

[ADD] sale_backorder

This module adds the ability to view UIGD and Backordered products on Sales Oders. The quantity and the value of both UIGD and Backordered products is computed for sales order lines and then aggregated for display on the parent sales order.

Usage

  • Go to Sales > Sales
  • Select the SO Lines and Backorders menu option. This will display a tree view of all sale order lines with their UIGD and Backorder information as well as the last date delivered and the last date billed
  • Go to Sales > Reporting > Backorders to print a report

[14.0] - sale_comment_template wrong description

Description for sale_comment_template reads:
Comments are copied on the invoice when you will create invoice from sale order.

Description is not correct as tested on runbot (video)
Behavior in video is correct as comment is present in invoice only if "Journal Entry" is enabled in field IR Model for that customer

Describe the solution you'd like
Remove the line in description

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.