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

[8.0] Add account invoice split modules #97

Closed
wants to merge 16 commits into from

Conversation

adrienpeiffer
Copy link
Contributor

This PR adds invoice split functionality.
First, account_invoice_split module which is the main module that allow to split invoice.
After that, there are several auto_install modules that provide a compatibility with other Odoo/OCA modules :

  • account_invoice_split_purchase adds compatibility with purchase order workflow
  • account_invoice_split_sale adds compatibility with sale order workflow
  • account_invoice_split_sale_stock adds compatibility with sale order workflow but specifics for sale_stock module
  • account_invoice_split_payment that consider fields on account_payment_partner from OCA/bank-payment

I propose all modules directly because they are all necessary for efficiency with an installation of all modules

@adrienpeiffer adrienpeiffer force-pushed the 8.0-add-account-invoice-split-ape branch 2 times, most recently from d4c9aca to 70d4ee9 Compare August 27, 2015 16:30
- TESTS="1" ODOO_REPO="odoo/odoo" INCLUDE="account_invoice_validation_workflow"
- TESTS="1" ODOO_REPO="OCA/OCB" INCLUDE="account_invoice_validation_workflow"
- TESTS="1" ODOO_REPO="odoo/odoo" INCLUDE="account_invoice_split_sale,account_invoice_split"
Copy link
Member

Choose a reason for hiding this comment

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

Why this can't be tested together with the rest?

@adrienpeiffer adrienpeiffer force-pushed the 8.0-add-account-invoice-split-ape branch 3 times, most recently from 2505c2b to 785cfda Compare September 4, 2015 15:06
@sbidoul
Copy link
Member

sbidoul commented Sep 16, 2015

I did a functional test for a purchase and sale workflow on runbot. It works well.

In the split wizard, the notebook is not necessary: a label would be nicer.

Otherwise can you look ater @pedrobaeza 's comments and check why travis is red?

if vals['invoice_line']:
new_invoice = self.env['account.invoice'].create(vals)
if not new_invoice:
raise exceptions.Warning(_('Nothing to split'))
Copy link
Member

Choose a reason for hiding this comment

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

Can you write: "There is nothing to split. Please fill the 'quantities to split' column." This would be more explicit for the user.

@adrienpeiffer adrienpeiffer force-pushed the 8.0-add-account-invoice-split-ape branch from 781a360 to c0403bc Compare September 17, 2015 13:48
FIELD_MAPPING = [('id', 'origin_invoice_line_id'),
('product_id', 'product_id'),
('name', 'name'),
('quantity', 'total_quantity')]
Copy link
Member

Choose a reason for hiding this comment

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

It's better to have globals immutables. Make FIELD_MAPPING a tuple instead of a list.

Copy link
Member

Choose a reason for hiding this comment

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

If you make it inmutable, then you can't extend it, which is the purpose I think

Copy link
Member

Choose a reason for hiding this comment

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

#98 (comment) wisely taught us that its not a good way to extend. So making it immutable will force us to resist the temptation.

Copy link
Member

Choose a reason for hiding this comment

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

OK, I remember. Well then

@sbidoul
Copy link
Member

sbidoul commented Sep 18, 2015

Travis is red because of odoo/odoo#8593

@adrienpeiffer adrienpeiffer force-pushed the 8.0-add-account-invoice-split-ape branch 2 times, most recently from 41c048a to e6f0cf4 Compare October 1, 2015 11:30
@adrienpeiffer adrienpeiffer force-pushed the 8.0-add-account-invoice-split-ape branch from df70d0d to 4d9fa0b Compare September 14, 2016 16:12
@eLBati
Copy link
Member

eLBati commented Dec 30, 2016

Hi @adrienpeiffer what's the state of this?

@elicoidal
Copy link

@adrienpeiffer Can you have a look?
Otherwise we might close this PR.

@github-actions
Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Oct 24, 2021
@github-actions github-actions bot closed this Nov 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.0 needs review stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants