mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[IMP] account_mass_reconcile_by_sale_line: black, isort, prettier
This commit is contained in:
committed by
Don Kendall
parent
2381ed4edc
commit
489618e6f7
@@ -5,17 +5,12 @@
|
||||
"name": "Account Mass Reconcile by Sale Line",
|
||||
"summary": "Allows to reconcile based on the SO line",
|
||||
"version": "11.0.1.0.0",
|
||||
"author": "ForgeFlow S.L., "
|
||||
"Odoo Community Association (OCA)",
|
||||
"author": "ForgeFlow S.L., " "Odoo Community Association (OCA)",
|
||||
"website": "https://github.com/OCA/bank-statement-reconcile",
|
||||
"category": "Finance",
|
||||
"depends": ["account_mass_reconcile",
|
||||
"account_move_line_sale_info"
|
||||
],
|
||||
"depends": ["account_mass_reconcile", "account_move_line_sale_info"],
|
||||
"license": "AGPL-3",
|
||||
"data": [
|
||||
"views/mass_reconcile.xml",
|
||||
],
|
||||
"data": ["views/mass_reconcile.xml",],
|
||||
"installable": True,
|
||||
"auto_install": False,
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ from odoo import models
|
||||
|
||||
|
||||
class MassReconcileAdvancedByPurchaseLine(models.TransientModel):
|
||||
_name = 'mass.reconcile.advanced.by.sale.line'
|
||||
_inherit = 'mass.reconcile.advanced'
|
||||
_name = "mass.reconcile.advanced.by.sale.line"
|
||||
_inherit = "mass.reconcile.advanced"
|
||||
|
||||
@staticmethod
|
||||
def _skip_line(move_line):
|
||||
@@ -15,15 +15,16 @@ class MassReconcileAdvancedByPurchaseLine(models.TransientModel):
|
||||
will be skipped for reconciliation. Can be inherited to
|
||||
skip on some conditions. ie: ref or partner_id is empty.
|
||||
"""
|
||||
return not (move_line.get('product_id') and
|
||||
move_line.get('sale_line_id'))
|
||||
return not (move_line.get("product_id") and move_line.get("sale_line_id"))
|
||||
|
||||
@staticmethod
|
||||
def _matchers(move_line):
|
||||
return (('product_id', move_line['product_id']),
|
||||
('sale_line_id', move_line['sale_line_id']))
|
||||
return (
|
||||
("product_id", move_line["product_id"]),
|
||||
("sale_line_id", move_line["sale_line_id"]),
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def _opposite_matchers(move_line):
|
||||
yield ('product_id', move_line['product_id'])
|
||||
yield ('sale_line_id', move_line['sale_line_id'])
|
||||
yield ("product_id", move_line["product_id"])
|
||||
yield ("sale_line_id", move_line["sale_line_id"])
|
||||
|
||||
@@ -5,10 +5,10 @@ from odoo import models
|
||||
|
||||
|
||||
class MassReconcileAdvanced(models.AbstractModel):
|
||||
_inherit = 'mass.reconcile.advanced'
|
||||
_inherit = "mass.reconcile.advanced"
|
||||
|
||||
def _selection_columns(self):
|
||||
aml_cols = super(MassReconcileAdvanced, self)._selection_columns()
|
||||
aml_cols.append('account_move_line.sale_line_id')
|
||||
aml_cols.append('account_move_line.product_id')
|
||||
aml_cols.append("account_move_line.sale_line_id")
|
||||
aml_cols.append("account_move_line.product_id")
|
||||
return aml_cols
|
||||
|
||||
@@ -5,12 +5,14 @@ from odoo import models
|
||||
|
||||
|
||||
class AccountMassReconcileMethod(models.Model):
|
||||
_inherit = 'account.mass.reconcile.method'
|
||||
_inherit = "account.mass.reconcile.method"
|
||||
|
||||
def _selection_name(self):
|
||||
methods = super(AccountMassReconcileMethod, self)._selection_name()
|
||||
methods += [
|
||||
('mass.reconcile.advanced.by.sale.line',
|
||||
'Advanced. Product, sale order line.'),
|
||||
(
|
||||
"mass.reconcile.advanced.by.sale.line",
|
||||
"Advanced. Product, sale order line.",
|
||||
),
|
||||
]
|
||||
return methods
|
||||
|
||||
@@ -4,13 +4,19 @@
|
||||
<field name="name">account.mass.reconcile.form</field>
|
||||
<field name="priority">20</field>
|
||||
<field name="model">account.mass.reconcile</field>
|
||||
<field name="inherit_id" ref="account_mass_reconcile.account_mass_reconcile_form"/>
|
||||
<field
|
||||
name="inherit_id"
|
||||
ref="account_mass_reconcile.account_mass_reconcile_form"
|
||||
/>
|
||||
<field name="arch" type="xml">
|
||||
<page name="information" position="inside">
|
||||
<group colspan="2" col="2">
|
||||
<separator colspan="4" string="Advanced. Sale Order Line" />
|
||||
<label string="Match multiple debit vs multiple credit entries. Allow partial reconciliation.
|
||||
The lines should have the same partner, product and SO lines to be reconciled." colspan="4"/>
|
||||
<label
|
||||
string="Match multiple debit vs multiple credit entries. Allow partial reconciliation.
|
||||
The lines should have the same partner, product and SO lines to be reconciled."
|
||||
colspan="4"
|
||||
/>
|
||||
</group>
|
||||
</page>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user