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_import #93

Closed
wants to merge 141 commits into from

Conversation

rubdos
Copy link

@rubdos rubdos commented Mar 9, 2019

Depends on:

Currently this is the initial git format-patch --keep-subject --stdout origin/12.0..origin/11.0 -- $MODULE | git am -3 --keep.

alexis-via and others added 30 commits March 4, 2019 14:12
…voice dict, cleaner organisation)

Code refactoring: move code in base_business_document_import, factorise code for tax matching (it was duplicated in UBL and ZUGFeRD)
Now support PDF with embedded UBL XML file
Enable unittests on account_invoice_import_ubl
More absolute xpath in account_invoice_import_ubl instead of relative xpath

WARNING: these are big changes, I may have broken a few details
Adapt module account_invoice_import_ubl to use the new base_ubl module
Small fixes
Better generation of address block in UBL (make it coherent with the datamodel of Odoo)
Add generation of several UBL blocks: language, delivery, payment terms, customer party, spplier party
Add parsing of zip in UBL party (will be used in the future for delivery partner match)
Use country code and state code to match partners
UBL: Add delivery terms and line item UBL XML block generation
UBL: add parsing of delivery block
Add unitests in base_business_document_import
Small code enhancements/simplifications
Code cleanup/minor changes
Rename key 'quantity' to 'qty' in all parsing dicts['lines']
Add common methods compare_lines() and post_create_or_update()
Make sure price_unit is always untaxed in UBL XML files
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
[FIX] LINT

Use try/except when importing external libs
Remove self.ensure_one() that has nothing to do in an api.model method
Rename __openerp__.py to __manifest__.py and set installable to False
Add match for accounts and journals
Improve match for journals and accounts
Also port all the modules that generate the XML documents: account_invoice_ubl, account_invoice_zugferd, purchase_order_ubl and sale_order_ubl
… module

Fix spelling mistake and other remarks on README by Tarteo
…o v10.0

base_business_document_import: Add support for the creation of res.bank
Add support for insertion of title in error messages
Add method to create SO in sale.order.import accessible via JSON-RPC
alexis-via and others added 16 commits March 9, 2019 22:41
Update the account_invoice_download_weboob following the changes in account_invoice_download
Add README.rst for the 2 modules
Add weboob module management
Improve log handling (explicit error when wrong pwd)
account_invoice_import: by default, set tax to default tax of account when invoice_line_method = 1line_no_product
Update text displayed in the invoice import wizard and make list of
supported formats modular (like in bank statement import)
… in multi-company environnement

Fix my previous commit on sequence field on invoice import config (caused a crash when creating a new record)
Usability improvements on download config
…iness document is imported in the right company
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
@oca-clabot
Copy link

Hey @rubdos, 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

@rubdos rubdos changed the title [12.0] mig account_invoice_import_ubl [12.0] mig account_invoice_import Mar 9, 2019
'onchange_helper',
# add bank_payment dependency to have commercial_partner_id on invoice
# PR in odoo will be create soon
'account_payment_partner',
Copy link
Member

Choose a reason for hiding this comment

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

I think this dependency is not needed anymore. Could you check?

'license': 'AGPL-3',
'summary': 'Import supplier invoices/refunds as PDF or XML files',
'author': 'Akretion,Odoo Community Association (OCA)',
'website': 'http://www.akretion.com',
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
'website': 'http://www.akretion.com',
'website': 'https://github.com/OCA/edi',

# 'lines': [{
# 'product': {
# 'barcode': '4123456000021',
# 'code': 'GZ250',
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# 'code': 'GZ250',
# 'default_code': 'GZ250',

assert self.import_config_id
import_config = self.import_config_id.convert_to_import_config()
invoice = self.create_invoice(parsed_inv, import_config)
invoice.message_post(_(
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
invoice.message_post(_(
invoice.message_post(body=_(

Otherwise I get an error.

parsed_inv['amount_untaxed']
invoice.tax_line_ids[0].amount = tax_amount
cur_symbol = invoice.currency_id.symbol
invoice.message_post(_(
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
invoice.message_post(_(
invoice.message_post(body=_(

<field name="model">res.config.settings</field>
<field name="inherit_id" ref="account.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@data-key='account_invoicing']" position="inside">
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<xpath expr="//div[@data-key='account_invoicing']" position="inside">
<xpath expr="//div[@data-key='account']" position="inside">

'date_start': '2017-08-01',
'date_end': '2017-08-31',
'partner': {
'name': 'ASUSTeK',
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
'name': 'ASUSTeK',
'name': 'Wood Corner',

},
'description': 'New hi-tech gadget',
'lines': [{
'product': {'code': 'AII-TEST-PRODUCT'},
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
'product': {'code': 'AII-TEST-PRODUCT'},
'product': {'default_code': 'AII-TEST-PRODUCT'},

'type': 'out_invoice',
'date_invoice': '2017-08-16',
'partner': {
'name': 'Agrolait',
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
'name': 'Agrolait',
'name': 'Deco Addict',

'name': 'Agrolait',
},
'lines': [{
'product': {'code': 'AII-TEST-PRODUCT'},
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
'product': {'code': 'AII-TEST-PRODUCT'},
'product': {'default_code': 'AII-TEST-PRODUCT'},

@TheCloneMaster
Copy link

Hi, is this PR still alive?
How could we help?

@astirpe
Copy link
Member

astirpe commented May 8, 2019

@TheCloneMaster this PR depends on #85 that is not yet merged. You may want to review that one first.
@rubdos could you accept the changes I proposed?

@emagdalenaC2i emagdalenaC2i mentioned this pull request Jun 1, 2019
18 tasks
@pedrobaeza pedrobaeza added this to the 12.0 milestone Jun 4, 2019
@mgielissen
Copy link

#85 is merged into 12.0

@njeudy
Copy link
Collaborator

njeudy commented Jan 2, 2020

how can we help on it ?

@astirpe astirpe mentioned this pull request Jan 3, 2020
1 task
@astirpe
Copy link
Member

astirpe commented Jan 3, 2020

Superseded by #162 due to inactivity

@astirpe astirpe closed this Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet