Skip to content

Commit 45f0a6b

Browse files
authored
[IMP] tg_account: duplicate the invoice dates and instruction improvements (#108)
* [IMP] tg_account: copy the Invoice date and Invoice due date upon duplication * [FIX] tg_account: improve the module documentation
1 parent ff895e8 commit 45f0a6b

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

tg_account/README.rst

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,39 @@
33
==============================================
44

55
* Removes "Recipient Bank" from invoice report template
6+
* Allows to duplicate the invoice(s) by linking them to another company according
7+
to predefined mappings
8+
69

710
Duplicate to fiscal invoice
811
---------------------------
912

1013
- Login as admin
11-
- Enable developers mode
12-
- Settings -> Users -> Groups
14+
- Enable the developers mode
15+
- Go to Settings -> Users -> Groups menu
1316
- Search for "Show Full Accounting Features" and open record
1417
- Add admin user to this group
15-
- Settings -> Users -> Groups
18+
- Go to Settings -> Users -> Groups menu
1619
- Search for "Multi Companies" and open record
1720
- Add admin user to this group
1821

19-
- Open any company form (Settings -> Users -> Company). Let is be "Company 1"
20-
- In company form set fiscal company. For example "Company 2"
21-
- In "Fiscal Company Mappings" add mappings
22+
- Open any company form (in Settings -> Users -> Company menu). Let's call it
23+
"Company 1"
24+
- In the company form set a so-called fiscal company. For example "Company 2"
25+
- In the "Fiscal Company Mappings" tab add mappings for:
26+
27+
- Journals
28+
- Accounts
29+
- Taxes
30+
- Payment Terms
31+
2232
- Save
2333

24-
- In company switcher choose "Company 1" and add tick on "Company 2"
25-
- Open or create any customer invoice, that is related to "Company 1"
34+
- In the company switcher choose "Company 1" and add tick on "Company 2"
35+
- Open or create any customer invoice that is related to "Company 1"
2636
- Make sure, that there are some products/services in "Invoice lines"
27-
- Actions -> "Duplicate to fiscal invoice"
28-
- RESULT: invoice related to "Company 2" is created
37+
- Click on Actions -> "Duplicate to fiscal invoice"
38+
- RESULT: The invoice related to the "Company 2" is created according to the mappings
2939

3040
Credits
3141
=======
@@ -34,6 +44,7 @@ Contributors
3444
------------
3545

3646
* `Eugene Molotov <https://github.com/em230418>`__
47+
* `Ilmir Karamov <https://github.com/ilmir-k>`__
3748

3849
Sponsors
3950
--------

tg_account/models/account_move.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ def copy_data(self, default=None):
9797
JournalMappings = self.sudo().env["res.company.fiscal.mapping.journal"]
9898
BankAccountMappings = self.sudo().env["res.company.fiscal.mapping.bank.account"]
9999
PaymentTermMappings = self.sudo().env["res.company.fiscal.mapping.payment.term"]
100+
invoice_date = self.invoice_date
101+
invoice_date_due = self.invoice_date_due
100102

101103
for move, data in zip(self, data_list, strict=False):
102104
data["company_id"] = fiscal_company_id
@@ -136,4 +138,8 @@ def copy_data(self, default=None):
136138

137139
data["partner_bank_id"] = new_bank_account.id
138140

141+
data["invoice_date"] = invoice_date
142+
143+
data["invoice_date_due"] = invoice_date_due
144+
139145
return data_list

0 commit comments

Comments
 (0)