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