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

[UPD] add company_id for account and journal #230

Open
wants to merge 10 commits into
base: 14.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .docker_files/main/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"old_accounts",
"payment_list_not_sent",
"payment_stripe_not_silenced",
"account_sale_invoice_date_required"
# "account_sale_invoice_date_required"
],
"installable": True,
}
1 change: 1 addition & 0 deletions .docker_files/test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
freezegun==0.3.4
ddt==1.4.2
pytest-odoo==2.1.1
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ COPY account_payment_term_usage_sale /mnt/extra-addons/account_payment_term_usag
COPY account_payment_widget_link /mnt/extra-addons/account_payment_widget_link
COPY account_report_line_menu /mnt/extra-addons/account_report_line_menu
COPY account_report_trial_balance /mnt/extra-addons/account_report_trial_balance
COPY account_sale_invoice_date_required /mnt/extra-addons/account_sale_invoice_date_required
#COPY account_sale_invoice_date_required /mnt/extra-addons/account_sale_invoice_date_required
COPY account_search_by_amount /mnt/extra-addons/account_search_by_amount
COPY account_show_full_features /mnt/extra-addons/account_show_full_features
COPY account_type_archive /mnt/extra-addons/account_type_archive
Expand Down
10 changes: 5 additions & 5 deletions account_check_deposit_enhanced/models/account_check_deposit.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

class AccountCheckDeposit(models.Model):
_inherit = "account.check.deposit"

@api.model
def _prepare_counterpart_move_lines_vals(self, *args, **kwargs):
vals = super()._prepare_counterpart_move_lines_vals(*args, **kwargs)
vals["partner_id"] = self.company_id.partner_id.id
def _prepare_move_vals(self):
vals = super()._prepare_move_vals()
for line in vals["line_ids"]:
line["partner_id"] = self.company_id.partner_id.id
return vals
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ def setUpClass(cls):
"code": "210110",
"reconcile": True,
"user_type_id": cls.env.ref("account.data_account_type_payable").id,
"company_id": cls.main_company.id,
}
)
cls.partner = cls.env["res.partner"].create(
{
"name": "Partner",
"property_account_payable_id": cls.payable.id,
"company_id": cls.main_company.id,
}
)

Expand All @@ -31,13 +33,15 @@ def setUpClass(cls):
"name": "Check Journal",
"type": "bank",
"code": "CH",
"company_id": cls.main_company.id,
}
)
cls.bank_journal = cls.env["account.journal"].create(
{
"name": "Bank Journal",
"type": "bank",
"code": "BNK",
"company_id": cls.main_company.id,
}
)
cls.payment = cls.env["account.payment"].create(
Expand Down Expand Up @@ -70,7 +74,7 @@ def setUpClass(cls):

def test_debit_move_line_has_company(self):
self.deposit.validate_deposit()
debit = self.deposit.line_ids.filtered(lambda l: l.debit)
debit = self.deposit.move_id.line_ids.filtered(lambda l: l.debit)
assert debit.partner_id == self.env.user.company_id.partner_id
credit = self.deposit.line_ids.filtered(lambda l: l.credit)
credit = self.deposit.move_id.line_ids.filtered(lambda l: l.credit)
assert credit.partner_id == self.partner
20 changes: 0 additions & 20 deletions account_sale_invoice_date_required/README.rst

This file was deleted.

4 changes: 0 additions & 4 deletions account_sale_invoice_date_required/__init__.py

This file was deleted.

14 changes: 0 additions & 14 deletions account_sale_invoice_date_required/__manifest__.py

This file was deleted.

42 changes: 0 additions & 42 deletions account_sale_invoice_date_required/i18n/fr.po

This file was deleted.

4 changes: 0 additions & 4 deletions account_sale_invoice_date_required/models/__init__.py

This file was deleted.

19 changes: 0 additions & 19 deletions account_sale_invoice_date_required/models/account_move.py

This file was deleted.

Binary file not shown.
Binary file not shown.
4 changes: 0 additions & 4 deletions account_sale_invoice_date_required/tests/__init__.py

This file was deleted.

35 changes: 0 additions & 35 deletions account_sale_invoice_date_required/tests/test_account_move.py

This file was deleted.

Loading