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

ADD contract_sale_generation module #87

Merged
merged 1 commit into from
Oct 22, 2017

Conversation

angelmoya
Copy link
Member

@angelmoya angelmoya commented Aug 10, 2017

Contracts for recurrent sales

This module extends functionality of contracts to be able to generate sales
orders instead of invoices.

Usage

To use this module, you need to:

  • Go to Accounting -> Contracts and select or create a new contract.
  • Check Generate recurring invoices automatically.
  • Fill fields for selecting the recurrency and invoice parameters:
    • Type defines document that contract will generate, can be "Sales" or "Invoices"
    • Sale Autoconfirm, validate Sales Orders if type is "Sales"

@angelmoya angelmoya mentioned this pull request Aug 10, 2017
@angelmoya angelmoya force-pushed the 10.0-ADD-contract_sale_generation branch from 77b34c1 to 5cec93b Compare August 10, 2017 12:51
@lasley lasley added this to the 10.0 milestone Aug 11, 2017
@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Pesol (<http://pesol.es>)
# Angel Moya <angel.moya@pesol.es>
Copy link
Contributor

Choose a reason for hiding this comment

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

This creates ambiguity of your copyright. Either put them on the same line, or rewrite the Copyright 2017. My preferred is the latter.

# © 2014 Angel Moya <angel.moya@domatix.com>
# © 2015 Pedro M. Baeza <pedro.baeza@tecnativa.com>
# © 2016 Carlos Dauden <carlos.dauden@tecnativa.com>
# Copyright 2016-2017 LasLabs Inc.
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this a new module? Why so many copyrights, including mine?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because I copy a lot of code from contract module

'company_id': self.company_id.id,
'contract_id': self.id,
'user_id': self.partner_id.user_id.id,
'project_id': self.id
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this introduced in project_sale?

Copy link
Member Author

Choose a reason for hiding this comment

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

'date_order': self.recurring_next_date,
'origin': self.name,
'company_id': self.company_id.id,
'contract_id': self.id,
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is contract_id introduced?

Copy link
Member Author

Choose a reason for hiding this comment

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

copy&paste error, I will update

'origin': self.name,
'company_id': self.company_id.id,
'contract_id': self.id,
'user_id': self.partner_id.user_id.id,
Copy link
Contributor

Choose a reason for hiding this comment

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

This is setting the salesperson as the customer's user.

Copy link
Member Author

Choose a reason for hiding this comment

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

user_id is Salesperson

@angelmoya angelmoya force-pushed the 10.0-ADD-contract_sale_generation branch from 5cec93b to c0a415a Compare August 21, 2017 09:07
@angelmoya
Copy link
Member Author

Thanks @lasley for you review, I just update code

Copy link
Contributor

@lasley lasley left a comment

Choose a reason for hiding this comment

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

Weird - tests were failing, but only on OCB. I rebuilt

@angelmoya
Copy link
Member Author

@lasley it's ok?

@lasley
Copy link
Contributor

lasley commented Oct 19, 2017

Thanks @angelmoya.

@lasley lasley merged commit 09e1be5 into OCA:10.0 Oct 22, 2017
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.

3 participants