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

[16.0][MIG] contract: Migration to 16.0 #887

Merged
merged 226 commits into from
Mar 15, 2023

Conversation

wpichler
Copy link
Contributor

@wpichler wpichler commented Oct 24, 2022

@max3903 max3903 added this to the 16.0 milestone Oct 24, 2022
@wpichler wpichler force-pushed the 16.0-mig-contract branch 2 times, most recently from 9b9f136 to c869e1a Compare October 24, 2022 18:24
@wpichler
Copy link
Contributor Author

One check is still not working - but i assume this is an error on odoo side - look at: odoo/odoo#104009

I could need help a the pre-commit steps - i don't get the point what should be wrong here...

@pedrobaeza
Copy link
Member

Please cherry-pick eda6d54

@pedrobaeza
Copy link
Member

You can integrate #894 as well. Can you please check the tests in the CI?

@wpichler
Copy link
Contributor Author

wpichler commented Nov 4, 2022

Done. There is only one test which fails - and this test does fail because of a bug in odoo core (imho). I can disable this test for now....

Here is my bug report for this odoo bug
odoo/odoo#104009

@wpichler
Copy link
Contributor Author

wpichler commented Nov 4, 2022

I did take an other look on the failed test - and i don't get the point what is wrong here. In the test test_cron_recurring_create_invoice_multi_company it just creates the first account.move Form - this does try to access the member name - which is a compute field - so the compute functions triggers with a NewId Object - but in the compute function it does try to compute the name for all the NewId Objects from the past as it seems. And this does fail, because it can't compare agains't NewId.

Why are there that many NewId records in the compute function ?

Can we add some sort of flush / invalidate before the test to get rid of the NewId Objects ? Why are they don't get closed on the other tests ?

<field
name="contract_line_ids"
widget="section_and_note_one2many"
nolabel="1"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

colspan="2"
Looks much better taking whole form width.

@rafaelbn
Copy link
Member

rafaelbn commented Dec 2, 2022

/ocabot migration contract

@victoralmau
Copy link
Member

Please cherry-pick #902

@wpichler
Copy link
Contributor Author

wpichler commented Dec 7, 2022

@pedrobaeza There is just one test failing - and i am not able to fix it - because i think that it is because of a bug in the odoo account module directly. See odoo/odoo#104009

Should i disable this test so that we can merge this ?

contract/views/res_partner_view.xml Outdated Show resolved Hide resolved
contract/models/contract.py Outdated Show resolved Hide resolved
contract/models/contract_line.py Outdated Show resolved Hide resolved
contract/models/contract_line.py Outdated Show resolved Hide resolved
@pedrobaeza
Copy link
Member

There is just one test failing - and i am not able to fix it - because i think that it is because of a bug in the odoo account module directly. See odoo/odoo#104009

Should i disable this test so that we can merge this ?

I think we should push for the solution. It has been already tagged, so I expect a response from Odoo soon. You can also push through an enterprise ticket.

About the analytic thing, you should convert it to the new format.

@flotho
Copy link
Member

flotho commented Dec 27, 2022

hi @rousseldenis any chance to have a final review ?

@pedrobaeza
Copy link
Member

#894 should be cherry-picked as well

@pedrobaeza
Copy link
Member

Another investigation line is that now invoices can't be created through Form, but through pure code, like it has been done in OCA/commission@2cd32a6

@wpichler
Copy link
Contributor Author

@pedrobaeza It does look good now - is something missing for the final merge ? Reviews ?

@wpichler
Copy link
Contributor Author

What is missing on this PR to get approived and merged ?

@wpichler wpichler requested review from rousseldenis and pedrobaeza and removed request for rousseldenis and pedrobaeza January 30, 2023 14:49
tate11 and others added 21 commits March 15, 2023 12:38
Currently translated at 91.0% (285 of 313 strings)

Translation: contract-15.0/contract-15.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-15-0/contract-15-0-contract/tr/
- Improve invoice generation through cron
  Avoid too much sql queries by iterating on first search
  Avoid performances problems through invoices ids isntead
  of recordset
- Improve tests
  Adds multi company tests
- Add a generation type on contract
  Add a generation type on contract that allows to generate other
  document than invoice (e.g. sale order)
- Allows to get several functions to create recurring documents
- Set visibility on button to show invoices
- Add generation_type field
- Update button visibility
- Simplify test flow
- Use Odoo conventions for methods
- Add explicit cron create type for invoices
- Improve function call for cron recurring creates
- Improve multi-company tests / don't break former tests structure
- Fix forwardport from 14.0 OCA#741
Currently translated at 100.0% (316 of 316 strings)

Translation: contract-15.0/contract-15.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-15-0/contract-15-0-contract/es_AR/
Currently translated at 93.3% (295 of 316 strings)

Translation: contract-15.0/contract-15.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-15-0/contract-15-0-contract/fr/
Currently translated at 100.0% (317 of 317 strings)

Translation: contract-15.0/contract-15.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-15-0/contract-15-0-contract/es_AR/
Currently translated at 93.0% (295 of 317 strings)

Translation: contract-15.0/contract-15.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-15-0/contract-15-0-contract/fr/
Currently translated at 68.7% (218 of 317 strings)

Translation: contract-15.0/contract-15.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-15-0/contract-15-0-contract/de/
Currently translated at 79.8% (253 of 317 strings)

Translation: contract-15.0/contract-15.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-15-0/contract-15-0-contract/pt_BR/
Currently translated at 91.7% (291 of 317 strings)

Translation: contract-15.0/contract-15.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-15-0/contract-15-0-contract/es/
…rrect values of other fields (team_id for example).

TT39934
In v14, the `string` attribute of the buttons is shown directly in UI.
The tooltips are now put through `title` attribute. As that was the
original intention, let's switch `string` to `title`.
@pedrobaeza
Copy link
Member

Squash done, so merging:

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 16.0-ocabot-merge-pr-887-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 715370a into OCA:16.0 Mar 15, 2023
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 70f8bca. Thanks a lot for contributing to OCA. ❤️

@wpichler wpichler deleted the 16.0-mig-contract branch March 15, 2023 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet