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

[IMP][10.0] contract: Add templating #42

Merged
merged 6 commits into from
Apr 1, 2017

Conversation

lasley
Copy link
Contributor

@lasley lasley commented Nov 30, 2016

This PR adds template functionality to contract.

Depends:

@rafaelbn
Copy link
Member

rafaelbn commented Dec 1, 2016

Hi @lasley , contracts had templates in v8, have you recover that functionality?

@lasley
Copy link
Contributor Author

lasley commented Dec 1, 2016

It seems I did, yeah. Had no idea it was a pre-existing feature 😆

@rafaelbn
Copy link
Member

rafaelbn commented Dec 1, 2016

I ask, because we have customers in v8 using them and we will need it fits for the migration. cc @pedrobaeza

@lasley
Copy link
Contributor Author

lasley commented Dec 1, 2016

An overview of my changes:

  • Move most field declarations & onchanges from account.analytic.account to new model account.analytic.contract
  • _inherit account.analytic.contract from account.analytic.account
  • Add onchange on new field contract_template_id in account.analytic.account to set fields from selected account.analytic.contract

Works quite nicely and didn't take much code, I was pretty happy. Hopefully it fits migration 😉 - I can backport to 9 fairly easy.

@@ -0,0 +1,189 @@
# -*- coding: utf-8 -*-
Copy link
Contributor Author

Choose a reason for hiding this comment

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

File name typo

@lasley lasley force-pushed the feature/10.0/contract-template branch from 4bdb1ce to 5b3735f Compare December 5, 2016 16:58
@lasley lasley force-pushed the feature/10.0/contract-template branch from 5b3735f to 9e4a383 Compare December 20, 2016 07:09
* Add template functionality for contracts
@lasley lasley force-pushed the feature/10.0/contract-template branch 2 times, most recently from a269200 to 42e2907 Compare December 27, 2016 02:39
@lasley lasley force-pushed the feature/10.0/contract-template branch from 42e2907 to 3d294ce Compare December 27, 2016 02:49
@lasley
Copy link
Contributor Author

lasley commented Dec 28, 2016

Alright this is ready for review

Copy link

@tedsalmon tedsalmon left a comment

Choose a reason for hiding this comment

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

A couple changes requested :)

('company_id', '=', company_id)]
return self.env['account.journal'].search(domain, limit=1)

@api.onchange('partner_id')

Choose a reason for hiding this comment

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

partner_id is not defined as a field of this model.

@@ -3,151 +3,47 @@
# © 2014 Angel Moya <angel.moya@domatix.com>

Choose a reason for hiding this comment

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

This file is misspelled. s/account_anayltic_account.py/account_analytic_account.py

@lasley
Copy link
Contributor Author

lasley commented Jan 14, 2017

Does anyone have any thoughts on moving contracts into a subheader of its own? Right now it's under Invoicing => Sales => Contracts, but I'd like to maybe add an Invoicing => Contracts with the following:

  • Contracts - Same thing we have now
  • Invoices - Invoice view filtered to show only those generated from contracts
  • Templates - View for the contract templates that I added here (there's not a view right now)

@pedrobaeza
Copy link
Member

I prefer to not create another "Invoices" entry. Better to have a filter like "From contracts) in the existing one.

You need to have Contracts on Sales, because salesmen are the one who manage them. About templates, I think it's better to have it under Sales > Configuration > Contracts > Templates.

@@ -10,6 +10,7 @@
'license': 'AGPL-3',
'author': "OpenERP SA,"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should this OpenERP SA be Odoo SA?

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if they have switched already their legal part. They don't put author now in Odoo 10 manifests, so no clue...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmmm best to play it on the safe and leave it as is then. Thanks @pedrobaeza

@lasley
Copy link
Contributor Author

lasley commented Jan 17, 2017

@tedsalmon - thanks for the review

@pedrobaeza - I somewhat followed your suggestion on the menu placement. contract doesn't have any sale depenencies though, so I didn't want to bring that in just for the menu. Instead I just placed the "Contract Templates" in the Invoicing Configuration instead, which I think hits the intent well enough.

I'm torn on whether it should be above or below "Settings". I settled on below, but am definitely open to other placements.

@lasley lasley force-pushed the feature/10.0/contract-template branch 4 times, most recently from 6b3d02f to b08e4bb Compare January 17, 2017 20:29
sbejaoui pushed a commit to sbejaoui/contract that referenced this pull request Sep 30, 2019
Add template functionality for contracts
sbejaoui pushed a commit to sbejaoui/contract that referenced this pull request Sep 30, 2019
Add template functionality for contracts
sbejaoui pushed a commit to sbejaoui/contract that referenced this pull request Sep 30, 2019
Add template functionality for contracts
devCbssolutionsRo pushed a commit to devCbssolutionsRo/contract that referenced this pull request Dec 19, 2019
Add template functionality for contracts
AaronHForgeFlow pushed a commit to ForgeFlow/contract that referenced this pull request Apr 24, 2020
Add template functionality for contracts
pedrobaeza pushed a commit to Tecnativa/contract that referenced this pull request Jul 14, 2020
Add template functionality for contracts
CarlosRoca13 pushed a commit to Tecnativa/contract that referenced this pull request Oct 27, 2020
Add template functionality for contracts
ozono pushed a commit to ozono/contract that referenced this pull request Nov 7, 2020
Add template functionality for contracts
ozono pushed a commit to ozono/contract that referenced this pull request Nov 14, 2020
Add template functionality for contracts
dnplkndll pushed a commit to Kencove/contract that referenced this pull request Dec 6, 2020
Add template functionality for contracts
ozono pushed a commit to ozono/contract that referenced this pull request Apr 2, 2021
Add template functionality for contracts
victoralmau pushed a commit to Tecnativa/contract that referenced this pull request Sep 23, 2021
Add template functionality for contracts
jcdrubay pushed a commit to jcdrubay/contract that referenced this pull request Oct 28, 2021
Add template functionality for contracts
olgamarcocb pushed a commit to tegin/contract that referenced this pull request Nov 16, 2021
Add template functionality for contracts
olgamarcocb pushed a commit to tegin/contract that referenced this pull request Nov 16, 2021
Add template functionality for contracts
wpichler pushed a commit to wpichler/contract that referenced this pull request Oct 24, 2022
Add template functionality for contracts
victoralmau pushed a commit to Tecnativa/contract that referenced this pull request Nov 3, 2022
Add template functionality for contracts
victoralmau pushed a commit to Tecnativa/contract that referenced this pull request Nov 3, 2022
Add template functionality for contracts
pedrobaeza pushed a commit to wpichler/contract that referenced this pull request Mar 15, 2023
Add template functionality for contracts
heliaktiv pushed a commit to heliaktiv/contract that referenced this pull request Jun 6, 2023
Add template functionality for contracts
brian10048 pushed a commit to brian10048/contract that referenced this pull request Dec 1, 2023
Add template functionality for contracts
brian10048 pushed a commit to brian10048/contract that referenced this pull request Dec 1, 2023
Add template functionality for contracts
carolinafernandez-tecnativa pushed a commit to Tecnativa/contract that referenced this pull request Jan 5, 2024
Add template functionality for contracts
carolinafernandez-tecnativa pushed a commit to Tecnativa/contract that referenced this pull request Jan 5, 2024
Add template functionality for contracts
peluko00 pushed a commit to APSL/contract that referenced this pull request Feb 15, 2024
Add template functionality for contracts
jaydeep32 pushed a commit to archeti-org/contract that referenced this pull request Feb 15, 2024
Add template functionality for contracts
CRogos pushed a commit to c4a8-odoo/module-oca-contract that referenced this pull request Mar 23, 2024
Add template functionality for contracts
CRogos pushed a commit to c4a8-odoo/module-oca-contract that referenced this pull request Mar 23, 2024
Add template functionality for contracts
CRogos pushed a commit to c4a8-odoo/module-oca-contract that referenced this pull request Mar 23, 2024
Add template functionality for contracts
juanjosesegui-tecnativa pushed a commit to Tecnativa/contract that referenced this pull request Jul 22, 2024
Add template functionality for contracts
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

4 participants