-
Notifications
You must be signed in to change notification settings - Fork 116
18.0 rd accounting onboarding jugac #4862
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
Changes from all commits
e0a1783
5b799d0
1bee02e
ea1f606
9f3ee72
9dab714
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -164,7 +164,7 @@ class ResCompany(models.Model): | |
| 'padding': 5, | ||
| 'use_date_range': True, | ||
| 'company_id': self.id, | ||
| 'prefix': 'BATCH/%(year)s/', | ||
| 'prefix': 'PAY/%(year)s/', | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change is good but i think that if runbot was working like a normal pr, you would have a lot of test failing 👀 Take a look at addons/account/tests/test_account_payment_register.py 😄 Run the tests and check the ones that fails and fix them 😄 |
||
| }), | ||
| ) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -306,6 +306,7 @@ | |
| <field name="name" string="Journal Item" filter_domain="[ | ||
| '|', '|', '|', | ||
| ('name', 'ilike', self), ('ref', 'ilike', self), ('account_id', 'ilike', self), ('partner_id', 'ilike', self)]"/> | ||
| <field name="amount_currency" filter_domain="[('amount_currency', '>=', self)]" /> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You used the amount_currency but i don't think that really what we want 👀 The amount currency will be the same as the balance or debit and credit when we have the same currency but it could happen that you do a transaction in dollars when your company is in euro and so the amount_currency will be different. Here we want to be able to search on the balance or debit and credit together 😄 |
||
| <field name="name"/> | ||
| <field name="ref"/> | ||
| <field name="invoice_date"/> | ||
|
|
@@ -523,7 +524,7 @@ | |
| <field name="invoice_date" optional="show" column_invisible="context.get('default_move_type') not in ('in_invoice', 'in_refund', 'in_receipt')" readonly="state != 'draft'" string="Bill Date" decoration-warning="abnormal_date_warning"/> | ||
| <field name="invoice_date" optional="show" column_invisible="context.get('default_move_type') not in ('out_invoice', 'out_refund', 'out_receipt')" readonly="state != 'draft'" string="Invoice Date" decoration-warning="abnormal_date_warning"/> | ||
| <field name="date" optional="hide" string="Accounting Date" readonly="state in ['cancel', 'posted']"/> | ||
| <field name="invoice_date_due" widget="remaining_days" optional="show" invisible="payment_state in ('paid', 'in_payment', 'reversed')"/> | ||
| <field name="invoice_date_due" widget="remaining_days" optional="show" invisible="payment_state in ('paid', 'in_payment', 'reversed') or state == 'cancel'"/> | ||
| <field name="invoice_origin" optional="hide" string="Source Document"/> | ||
| <field name="payment_reference" optional="hide" column_invisible="context.get('default_move_type') in ('out_invoice', 'out_refund', 'out_receipt')"/> | ||
| <field name="ref" optional="hide"/> | ||
|
|
@@ -549,6 +550,7 @@ | |
| invisible="payment_state == 'invoicing_legacy' or move_type == 'entry'" | ||
| optional="show" | ||
| /> | ||
| <field name="invoice_sent_status" string="Sent" optional="hide" widget="badge" decoration-success="is_move_sent" decoration-warning="not is_move_sent"/> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe it would be nice to have a filter for the invoice sent, look at <filter name="not_sent" 👀 |
||
| <field name="move_type" column_invisible="context.get('default_move_type', True)"/> | ||
| <field name="abnormal_amount_warning" column_invisible="1"/> | ||
| <field name="abnormal_date_warning" column_invisible="1"/> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,20 @@ def _get_view(self, view_id=None, view_type='form', **options): | |
| shipping_fields[0].attrib.pop("groups", None) | ||
| return arch, view | ||
|
|
||
| @api.depends('country_code', 'move_type') | ||
| def _compute_show_delivery_date(self): | ||
| # EXTENDS 'account' | ||
| super()._compute_show_delivery_date() | ||
| for move in self: | ||
| if move.country_code == 'FR': | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's use l10n_fr_is_company_french instead 👀 Check why and tell me 😄 |
||
| move.show_delivery_date = move.is_sale_document() | ||
|
|
||
| def _post(self, soft=True): | ||
| for move in self: | ||
| if move.country_code == 'FR' and move.is_sale_document() and not move.delivery_date: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you can use show_delivery_date 👀 |
||
| move.delivery_date = move.invoice_date or fields.Date.context_today(self) | ||
| return super()._post(soft) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In general we put the super on top of the function, because it would happens that the delivery date is modified else where and so the change will not work, also always add the comment for the extend when doing an extension 😄 |
||
|
|
||
| @api.depends('company_id.country_code') | ||
| def _compute_l10n_fr_is_company_french(self): | ||
| for record in self: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rule of thumbs in python, use double quotes when it's something the user will see otherwise use single quotes