Skip to content

Commit

Permalink
[17.0][MIG] purchase_deposit
Browse files Browse the repository at this point in the history
  • Loading branch information
MS-OSI committed Mar 22, 2024
1 parent b814aeb commit 14bec6a
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions purchase_deposit/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Contributors
- Kitti Upariphutthiphong <[email protected]>
- Rattapong Chokmasermkul <[email protected]>
- Joan Mateu <[email protected]>
- Murtuza Saleh <[email protected]>
- `Quartile <https://www.quartile.co>`__:

- Aung Ko Ko Lin
Expand Down
1 change: 1 addition & 0 deletions purchase_deposit/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
- Kitti Upariphutthiphong \<<[email protected]>\>
- Rattapong Chokmasermkul \<<[email protected]>\>
- Joan Mateu \<<[email protected]>\>
- Murtuza Saleh \<<[email protected]>\>
- [Quartile](https://www.quartile.co):
- Aung Ko Ko Lin
1 change: 1 addition & 0 deletions purchase_deposit/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<li>Kitti Upariphutthiphong &lt;<a class="reference external" href="mailto:kittiu&#64;ecosoft.co.th">kittiu&#64;ecosoft.co.th</a>&gt;</li>
<li>Rattapong Chokmasermkul &lt;<a class="reference external" href="mailto:rattapongc&#64;ecosoft.co.th">rattapongc&#64;ecosoft.co.th</a>&gt;</li>
<li>Joan Mateu &lt;<a class="reference external" href="mailto:joan.mateu&#64;forgeflow.com">joan.mateu&#64;forgeflow.com</a>&gt;</li>
<li>Murtuza Saleh &lt;<a class="reference external" href="mailto:msaleh&#64;opensourceintegrators.com">msaleh&#64;opensourceintegrators.com</a>&gt;</li>
<li><a class="reference external" href="https://www.quartile.co">Quartile</a>:<ul>
<li>Aung Ko Ko Lin</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion purchase_deposit/views/purchase_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<xpath expr="//button[@name='button_cancel']" position="before">
<button
name="%(purchase_deposit.action_view_purchase_advance_payment_inv)d"
states="purchase"
invisible="state != 'purchase'"
type="action"
string="Register Deposit"
/>
Expand Down
9 changes: 5 additions & 4 deletions purchase_deposit/wizard/purchase_make_invoice_advance.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ def _create_invoice(self, order, po_line, amount):
Invoice = self.env["account.move"]
deposit_val = self._prepare_deposit_val(order, po_line, amount)
invoice = Invoice.create(deposit_val)
invoice.message_post_with_view(
invoice.message_post_with_source(
"mail.message_origin_link",
values={"self": invoice, "origin": order},
subtype_id=self.env.ref("mail.mt_note").id,
render_values={"self": invoice, "origin": order},
subtype_xmlid="mail.mt_note",
)
return invoice

Expand Down Expand Up @@ -190,7 +190,8 @@ def create_invoices(self):
)
)
taxes = product.supplier_taxes_id.filtered(
lambda r: not order.company_id or r.company_id == order.company_id
lambda r, order=order: not order.company_id
or r.company_id == order.company_id
)
if order.fiscal_position_id and taxes:
tax_ids = order.fiscal_position_id.map_tax(taxes).ids
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@
<div>
<field name="amount" class="oe_inline" widget="monetary" />
<span
attrs="{'invisible': [('advance_payment_method', '!=', 'percentage')]}"
class="oe_inline"
invisible="advance_payment_method != 'percentage'"
>%</span>
</div>
<field
name="deposit_account_id"
class="oe_inline"
attrs="{'invisible': [('purchase_deposit_product_id', '!=', False)]}"
invisible="not purchase_deposit_product_id"
/>
<field
name="deposit_taxes_id"
class="oe_inline"
widget="many2many_tags"
domain="[('type_tax_use','=','purchase')]"
attrs="{'invisible': [('purchase_deposit_product_id', '!=', False)]}"
invisible="not purchase_deposit_product_id"
/>
</group>
<footer>
Expand Down

0 comments on commit 14bec6a

Please sign in to comment.