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

[12.0] [MIG] Account Invoice Supplier Ref Unique #433

Open
wants to merge 27 commits into
base: 12.0
from

Conversation

Projects
None yet
@ThomasBinsfeld
Copy link
Contributor

commented Oct 2, 2018

Migration of account_invoice_supplier_ref_unique from 11.0 to 12.0.
#427

@ThomasBinsfeld ThomasBinsfeld force-pushed the acsone:12-mig_account_invoice_supplier_ref_unique_tbi branch from 8708590 to 918aa69 Oct 2, 2018

@acsonefho
Copy link
Contributor

left a comment

Only one comment otherwise LGTM (about code)

"""
if self.supplier_invoice_number and\
self.type in ('in_invoice', 'in_refund'):
same_supplier_inv_num = self.search([

This comment has been minimized.

Copy link
@acsonefho

acsonefho Oct 2, 2018

Contributor

api.one is not bad but you have a search inside of this function.
A good improvement could be to use api.multi and do only a unique search.

This comment has been minimized.

Copy link
@adrienpeiffer

adrienpeiffer Oct 12, 2018

Contributor

@acsonefho As some fields on the invoice record are given to the search method domain parameters, even with a api.multi we should call the search method for each invoice no ?

@tafaRU

This comment has been minimized.

Copy link
Member

commented Oct 4, 2018

@ThomasBinsfeld, please restart Travis build jobs now that branch 12.0 has been created.

@OCA-git-bot OCA-git-bot referenced this pull request Dec 27, 2018

Open

Migration to version 12.0 #427

14 of 25 tasks complete

@pedrobaeza pedrobaeza added this to the 12.0 milestone Dec 27, 2018

@jeroen7s

This comment has been minimized.

Copy link

commented Jan 2, 2019

can this be merged?

@pedrobaeza

This comment has been minimized.

Copy link
Member

commented Jan 2, 2019

@jeroen7s if you add your review to this PR, this will help to be merged.

@rven

This comment has been minimized.

Copy link
Contributor

commented Feb 11, 2019

@ThomasBinsfeld Can you please rebase this PR?

Marc Cassuto and others added some commits Jul 28, 2014

account_invoice_supplier_ref_unique : make constraint translation to …
…work with different langage within same instance + add bwrsandman code suggestion
account_invoice_supplier_ref_unique : fix wrong field name to apply t…
…he constraint against + make the error message to be translatable
account_invoice_customer_ref_unique, account_invoice_customer_ref_uni…
…que: the contraint is now applied to all records modified; not only the first one.
ilike -> =ilike, as suggested by Lorenzo
Add bugtracker section in README.rst
Migration of account_invoice_supplier_ref_unique to 9.0 (#161)
[MIG] account_invoice_supplier_ref_unique: Migration to 9.0

@ThomasBinsfeld ThomasBinsfeld force-pushed the acsone:12-mig_account_invoice_supplier_ref_unique_tbi branch from 918aa69 to 5af0d72 Feb 11, 2019

@oca-clabot

This comment has been minimized.

Copy link

commented Feb 11, 2019

Hey @ThomasBinsfeld, thank you for your Pull Request.

It looks like some users haven't signed our Contributor License Agreement, yet.
You can read and sign our full Contributor License Agreement here: http://odoo-community.org/page/cla
Here is a list of the users:

Appreciation of efforts,
OCA CLAbot

@ThomasBinsfeld

This comment has been minimized.

Copy link
Contributor Author

commented Feb 11, 2019

@rven Rebased

@rven

rven approved these changes Feb 11, 2019

@yung-wang

This comment has been minimized.

Copy link
Contributor

commented Jun 18, 2019

Do we still need this module? I tested it in Runbot V12 with standard Odoo CE and it works out of the box.
image

@sbidoul

This comment has been minimized.

Copy link
Member

commented Jun 18, 2019

Interesting that Odoo implemented such a check.
The problem is Odoo conflates the supplier invoice number and reference (usually used as payment reference).
This module reintroduce the supplier invoice number and implements the unicity check on that.
The reference remain free and is used as payment reference.

This is particularly useful in presence of structured payment communications.


@classmethod
def setUpClass(self):
super(TestAccountInvoiceSupplierRefUnique, self).setUpClass()

This comment has been minimized.

Copy link
@sebalix

sebalix Jun 19, 2019

Small points:

  • rename self to cls
  • super() parameters could be removed
  • very extra: tracking_disable context key could be added to env

But not blocking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.