Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][MIG] stock_picking_invoicing: Migration to 17.0 #1756

Draft
wants to merge 144 commits into
base: 17.0
Choose a base branch
from

Conversation

Abranes
Copy link
Member

@Abranes Abranes commented Jul 9, 2024

Standard migration to 17.0

mileo and others added 30 commits July 9, 2024 16:20
* Loading
* Onchanges
Etc
* Good Price with pricelist
* Good Taxes
* group works
* Everything is filtered with company
* Get the correct taxes and account regarding Fiscal Position
[IMP]Add the availability to choose the company that will invoice
OCA-git-bot and others added 25 commits July 9, 2024 16:20
Currently translated at 100.0% (46 of 46 strings)

Translation: account-invoicing-14.0/account-invoicing-14.0-stock_picking_invoicing
Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-14-0/account-invoicing-14-0-stock_picking_invoicing/pt_BR/
…tion of Invoice and check if those fields are being filled.
…group(s)' when field has parameter Groups and are used in for defined an attribute/attrs in the Views and included the dependency of base_view_inheritance_extension module.
…voice consider the value of Product Pricelist or the Seller Price, changed Demo Data for tests.
…al=Hide), to allow users view or, if necessary, change the value.
…o the users be able setting Invoice State to Invoiced or Not Billable, also included onchange method to update this field in Move Lines when changed in Picking.
…d error of Tracking by Lot when MRP module are installed, but use a Product with BoM and Route Buy.
…licate code and included tests for the cases when Price Unit are Informed by User, Sellers and Pricelist.
…Line when Grouping Pickings by Partner/Product.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: account-invoicing-16.0/account-invoicing-16.0-stock_picking_invoicing
Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-stock_picking_invoicing/
Currently translated at 100.0% (51 of 51 strings)

Translation: account-invoicing-16.0/account-invoicing-16.0-stock_picking_invoicing
Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-stock_picking_invoicing/es/
Currently translated at 100.0% (51 of 51 strings)

Translation: account-invoicing-16.0/account-invoicing-16.0-stock_picking_invoicing
Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-stock_picking_invoicing/pt_BR/
Currently translated at 49.0% (25 of 51 strings)

Translation: account-invoicing-16.0/account-invoicing-16.0-stock_picking_invoicing
Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-stock_picking_invoicing/hr/
@Abranes Abranes marked this pull request as draft July 9, 2024 16:56
@Abranes Abranes force-pushed the 17.0-mig-stock_picking_invoicing branch from dd1d67a to 6e55107 Compare July 10, 2024 09:46
@Abranes
Copy link
Member Author

Abranes commented Jul 10, 2024

Hello, I'm trying to fix the test issue but couldn't identify the exact problem. It seems to stem from the demo data not being installed, as I received this warning:

WARNING stock_picking_invoicing odoo.modules.loading: Module stock_picking_invoicing demo data failed to install, installed without demo data 
Traceback (most recent call last):
  File "/opt/odoo/src/odoo/odoo/odoo/tools/convert.py", line 556, in _tag_root
    f(rec)
  File "/opt/odoo/src/odoo/odoo/odoo/tools/convert.py", line 456, in _tag_record
    record = model._load_records([data], self.mode == 'update')
  File "/opt/odoo/src/odoo/odoo/odoo/models.py", line 5048, in _load_records
    data['record']._load_records_write(data['values'])
  File "/opt/odoo/src/odoo/odoo/odoo/models.py", line 4979, in _load_records_write
    self.write(values)
  File "/opt/odoo/src/addons/stock/models/stock_picking.py", line 859, in write
    raise UserError(_("Changing the operation type of this record is forbidden at this point."))
odoo.exceptions.UserError: Changing the operation type of this record is forbidden at this point.

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

Traceback (most recent call last):
  File "/opt/odoo/src/odoo/odoo/odoo/modules/loading.py", line 89, in load_demo
    load_data(env(su=True), idref, mode, kind='demo', package=package)
  File "/opt/odoo/src/odoo/odoo/odoo/modules/loading.py", line 71, in load_data
    tools.convert_file(env, package.name, filename, idref, mode, noupdate, kind)
  File "/opt/odoo/src/odoo/odoo/odoo/tools/convert.py", line 627, in convert_file
    convert_xml_import(env, module, fp, idref, mode, noupdate)
  File "/opt/odoo/src/odoo/odoo/odoo/tools/convert.py", line 693, in convert_xml_import
    obj.parse(doc.getroot())
  File "/opt/odoo/src/odoo/odoo/odoo/tools/convert.py", line 613, in parse
    self._tag_root(de)
  File "/opt/odoo/src/odoo/odoo/odoo/tools/convert.py", line 569, in _tag_root
    raise ParseError('while parsing %s:%s, somewhere inside\n%s' % (
odoo.tools.convert.ParseError: while parsing /opt/odoo/src/addons/stock_picking_invoicing/demo/stock_picking_demo.xml:42, somewhere inside
<record id="stock_picking_invoicing_2" model="stock.picking">
        <field name="partner_id" ref="base.res_partner_2"/>
        <field name="picking_type_id" ref="stock.picking_type_out"/>
        <field name="invoice_state">2binvoiced</field>
        <field name="origin">stock_picking_invoicing demo</field>
        <field name="location_id" ref="stock.stock_location_stock"/>
        <field name="location_dest_id" ref="stock.stock_location_customers"/>
    </record>

I don’t see the reason for the error since the picking_type_id field is set directly in the test data file and not afterward.

Any suggestions would be welcome, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.